forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove crate_level_only from ELIDED_LIFETIMES_IN_PATHS
- Loading branch information
1 parent
006c8df
commit e657773
Showing
3 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
struct Foo<'a>(&'a ()); | ||
|
||
fn test(_: Foo) {} | ||
|
||
#[deny(elided_lifetimes_in_paths)] | ||
mod w { | ||
fn test2(_: super::Foo) {} | ||
//~^ ERROR hidden lifetime parameters in types are deprecated | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
error: hidden lifetime parameters in types are deprecated | ||
--> $DIR/elided-lint-in-mod.rs:7:24 | ||
| | ||
LL | fn test2(_: super::Foo) {} | ||
| -------^^^ | ||
| | | ||
| expected lifetime parameter | ||
| | ||
note: the lint level is defined here | ||
--> $DIR/elided-lint-in-mod.rs:5:8 | ||
| | ||
LL | #[deny(elided_lifetimes_in_paths)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
help: indicate the anonymous lifetime | ||
| | ||
LL | fn test2(_: super::Foo<'_>) {} | ||
| ++++ | ||
|
||
error: aborting due to 1 previous error | ||
|