Add .nll.stderr output

This commit is contained in:
Tim 2019-03-03 23:43:46 +01:00
parent 797d8ea478
commit 60a649ef6e
2 changed files with 39 additions and 0 deletions

View 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`.

View 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`.