File tree Expand file tree Collapse file tree 3 files changed +32
-2
lines changed
compiler/rustc_lint_defs/src Expand file tree Collapse file tree 3 files changed +32
-2
lines changed Original file line number Diff line number Diff line change @@ -1834,8 +1834,7 @@ declare_lint! {
18341834 /// [placeholder lifetime]: https://doc.rust-lang.org/reference/lifetime-elision.html#lifetime-elision-in-functions
18351835 pub ELIDED_LIFETIMES_IN_PATHS ,
18361836 Allow ,
1837- "hidden lifetime parameters in types are deprecated" ,
1838- crate_level_only
1837+ "hidden lifetime parameters in types are deprecated"
18391838}
18401839
18411840declare_lint ! {
Original file line number Diff line number Diff line change 1+ struct Foo < ' a > ( & ' a ( ) ) ;
2+
3+ fn test ( _: Foo ) { }
4+
5+ #[ deny( elided_lifetimes_in_paths) ]
6+ mod w {
7+ fn test2 ( _: super :: Foo ) { }
8+ //~^ ERROR hidden lifetime parameters in types are deprecated
9+ }
10+
11+ fn main ( ) { }
Original file line number Diff line number Diff line change 1+ error: hidden lifetime parameters in types are deprecated
2+ --> $DIR/elided-lint-in-mod.rs:7:24
3+ |
4+ LL | fn test2(_: super::Foo) {}
5+ | -------^^^
6+ | |
7+ | expected lifetime parameter
8+ |
9+ note: the lint level is defined here
10+ --> $DIR/elided-lint-in-mod.rs:5:8
11+ |
12+ LL | #[deny(elided_lifetimes_in_paths)]
13+ | ^^^^^^^^^^^^^^^^^^^^^^^^^
14+ help: indicate the anonymous lifetime
15+ |
16+ LL | fn test2(_: super::Foo<'_>) {}
17+ | ++++
18+
19+ error: aborting due to 1 previous error
20+
You can’t perform that action at this time.
0 commit comments