Handle allow(elided_lifetimes_in_paths).

This commit is contained in:
Camille GILLOT 2021-10-31 18:39:39 +01:00
parent c07a6d2ef0
commit 72dc29c260
4 changed files with 44 additions and 31 deletions

View file

@ -96,6 +96,14 @@ macro_rules! anytuple_ref_ty {
}
}
#[allow(elided_lifetimes_in_paths)]
mod blah {
struct Thing<'a>(&'a i32);
struct Bar<T>(T);
fn foo(b: Bar<Thing>) {}
}
fn main() {
let honesty = RefCell::new((4, 'e'));
let loyalty: Ref<'_, (u32, char)> = honesty.borrow();

View file

@ -96,6 +96,14 @@ macro_rules! anytuple_ref_ty {
}
}
#[allow(elided_lifetimes_in_paths)]
mod blah {
struct Thing<'a>(&'a i32);
struct Bar<T>(T);
fn foo(b: Bar<Thing>) {}
}
fn main() {
let honesty = RefCell::new((4, 'e'));
let loyalty: Ref<(u32, char)> = honesty.borrow();

View file

@ -90,7 +90,7 @@ LL | fn $fn_name(gift: &str) -> $type_name<'_> {
| ~~~~~~~~~~~~~~
error: hidden lifetime parameters in types are deprecated
--> $DIR/elided-lifetimes.rs:101:22
--> $DIR/elided-lifetimes.rs:109:22
|
LL | let loyalty: Ref<(u32, char)> = honesty.borrow();
| ^ expected named lifetime parameter