Update tests
This commit is contained in:
parent
e3e5d27f23
commit
78e0ab53fb
13 changed files with 123 additions and 230 deletions
|
@ -11,7 +11,6 @@ impl<T: Copy> Copy for CopyIfEq<T, T> {}
|
|||
type E<'a, 'b> = impl Sized;
|
||||
|
||||
fn foo<'a, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> {
|
||||
//~^ ERROR lifetime may not live long enough
|
||||
let v = CopyIfEq::<*mut _, *mut _>(&mut { x }, &mut y);
|
||||
|
||||
// This assignment requires that `x` and `y` have the same type due to the
|
||||
|
@ -22,6 +21,7 @@ fn foo<'a, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> {
|
|||
let _: *mut &'a i32 = u.1;
|
||||
unsafe {
|
||||
let _: &'b i32 = *u.0;
|
||||
//~^ ERROR lifetime may not live long enough
|
||||
}
|
||||
u.0
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue