-
Notifications
You must be signed in to change notification settings - Fork 13.4k
cargo fix --broken-code does not generate stubs for trait impls despite the error message containing the appropriate stubs #100284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for the report! Can you possibly share the code or put together some kind of reproduction? I'm curious if the |
This: pub struct RootDeserializer<Der> {
_der: std::marker::PhantomData<Der>,
}
impl<'de, Der: serde::Deserializer<'de>> RootDeserializer<Der> {
pub fn new(der: Der, max_calls: usize) -> Self {
Self {
_der: todo!()
}
}
}
impl<'de, Der> serde::Deserializer<'de> for RootDeserializer<Der>
where
Der: serde::Deserializer<'de>
{
type Error = Der::Error;
} produces this error:
which we strongly believe we know |
Yea, it's known that I'm more curious how it got to say |
isn't and no, the the only fix it did apply, was removing an unused use crate::vm;
pub struct RootDeserializer<Der> {
_der: std::marker::PhantomData<Der>,
}
impl<'de, Der: serde::Deserializer<'de>> RootDeserializer<Der> {
pub fn new(der: Der, max_calls: usize) -> Self {
Self {
_der: todo!()
}
}
}
impl<'de, Der> serde::Deserializer<'de> for RootDeserializer<Der>
where
Der: serde::Deserializer<'de>
{
type Error = Der::Error;
} |
Ah, thanks for the clarification. The issue is that suggestions fall into different classes. Some are marked as "machine applicable" where they can be automatically applied. Others can be "maybe incorrect" or otherwise require human intervention. I'm going to close in favor of these other issues which are tracking what you are seeing here:
|
The suggestions here do compile (mostly). They're valid code, tho they do need small adjustments to take imports (or lack thereof) into account. For all intents and purposes, these should be machine-applicable. |
Meta
rustc --version --verbose
:(this also applies to 1.62.1 but it doesn't suggest making a bug report for it)
Backtrace
The text was updated successfully, but these errors were encountered: