-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
A-diagnosticsdiagnostics / error reportingdiagnostics / error reportingC-featureCategory: feature requestCategory: feature requestS-actionableSomeone could pick this issue up and work on it right nowSomeone could pick this issue up and work on it right now
Description
It's not uncommon to accidentally write code like this:
fn main() {
let b = Box::new(0);
let ptr = b.into_raw();
}
But Box::into_raw
is an associated function, not a method. It would be nice to detect this and offer an assist. A diagnostic + quickfix would also be possible (though maybe there's some use case in converting this, even if it is a method, in which case it should probably be a normal assist?)
Metadata
Metadata
Assignees
Labels
A-diagnosticsdiagnostics / error reportingdiagnostics / error reportingC-featureCategory: feature requestCategory: feature requestS-actionableSomeone could pick this issue up and work on it right nowSomeone could pick this issue up and work on it right now