Add .nll.stderr output
This commit is contained in:
parent
797d8ea478
commit
60a649ef6e
25
src/test/ui/consts/const-ptr-nonnull.nll.stderr
Normal file
25
src/test/ui/consts/const-ptr-nonnull.nll.stderr
Normal file
@ -0,0 +1,25 @@
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/const-ptr-nonnull.rs:4:37
|
||||
|
|
||||
LL | let x: &'static NonNull<u32> = &(NonNull::dangling());
|
||||
| --------------------- ^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use
|
||||
| |
|
||||
| type annotation requires that borrow lasts for `'static`
|
||||
...
|
||||
LL | }
|
||||
| - temporary value is freed at the end of this statement
|
||||
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/const-ptr-nonnull.rs:9:37
|
||||
|
|
||||
LL | let x: &'static NonNull<u32> = &(non_null.cast());
|
||||
| --------------------- ^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use
|
||||
| |
|
||||
| type annotation requires that borrow lasts for `'static`
|
||||
LL | //~^ ERROR borrowed value does not live long enough
|
||||
LL | }
|
||||
| - temporary value is freed at the end of this statement
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0716`.
|
14
src/test/ui/consts/const-ptr-unique.nll.stderr
Normal file
14
src/test/ui/consts/const-ptr-unique.nll.stderr
Normal file
@ -0,0 +1,14 @@
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/const-ptr-unique.rs:8:33
|
||||
|
|
||||
LL | let x: &'static *mut u32 = &(unique.as_ptr());
|
||||
| ----------------- ^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use
|
||||
| |
|
||||
| type annotation requires that borrow lasts for `'static`
|
||||
LL | //~^ ERROR borrowed value does not live long enough
|
||||
LL | }
|
||||
| - temporary value is freed at the end of this statement
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0716`.
|
Loading…
x
Reference in New Issue
Block a user