-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Tracking Issue for enabling elided_lifetimes_in_paths lints #91639
Copy link
Copy link
Open
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCE-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.L-elided_lifetimes_in_pathsLint: elided_lifetimes_in_pathsLint: elided_lifetimes_in_pathsS-tracking-impl-incompleteStatus: The implementation is incomplete.Status: The implementation is incomplete.T-langRelevant to the language teamRelevant to the language team
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCE-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.L-elided_lifetimes_in_pathsLint: elided_lifetimes_in_pathsLint: elided_lifetimes_in_pathsS-tracking-impl-incompleteStatus: The implementation is incomplete.Status: The implementation is incomplete.T-langRelevant to the language teamRelevant to the language team
Type
Fields
Give feedbackNo fields configured for Tracking Issue.
Projects
Status
Rejected/Not lang
This issue tracks getting the currently-allow-by-default
elided_lifetimes_in_pathslint https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html#elided-lifetimes-in-paths into a place where it can be enabled by default.Context
(This was formerly in the in-band lifetimes tracking issue, #44524, but is being split out because it doesn't actually depend on in-band specifically now that
'_is stable.)There seems to be general agreement amongst lang that lifetimes that participate in elision should be visible. That means things like
and
However, there's less agreement whether they're needed in other places. For example, whether it's valuable to require showing the lifetime in
impl fmt::Debug for StrWrap { - fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { fmt.write_str(self.0) } }A comment against needing that kind of
'_: #44524 (comment)And one saying it's helpful to show it: #44524 (comment)
(If anyone remembers where lang discussed this and has notes about it, please post or edit this comment!)
Perhaps one way to make progress is to start splitting up the lint to isolate the different cases?
Related discussions
rust_2018_idiomslint is very noisy and results in dramatically degraded APIs for Bevy #131725Current status
elided_lifetimes_in_pathsinto two separate lints under the same lint group: Split elided_lifetime_in_paths into finer-grained lints #120808Unresolved questions