-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messagesE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.Call for participation: Medium difficulty level problem and requires some initial experience.L-suggestionLint: Improving, adding or fixing lint suggestionsLint: Improving, adding or fixing lint suggestions
Description
It would be nice if borrowed_box
suggested a fix for the returned value in addition to the function signature.
Example from #6723:
pub trait Inner{}
pub struct Wrapper(Box<dyn Inner>);
pub unsafe fn get_inner(wrapper: *mut Wrapper) -> &'static Box<dyn Inner> {
&(*wrapper).0
}
ThibsG and bgrieder
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messagesE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.Call for participation: Medium difficulty level problem and requires some initial experience.L-suggestionLint: Improving, adding or fixing lint suggestionsLint: Improving, adding or fixing lint suggestions