Handle allow(elided_lifetimes_in_paths).
This commit is contained in:
parent
c07a6d2ef0
commit
72dc29c260
4 changed files with 44 additions and 31 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue