1
Fork 0

Update tests

This commit is contained in:
Matthew Jasper 2020-01-11 17:18:58 +00:00
parent e3e5d27f23
commit 78e0ab53fb
13 changed files with 123 additions and 230 deletions

View file

@ -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
}