Update E0714 to E0716 in tests output
This commit is contained in:
parent
ea4d934c32
commit
2af199d58e
34 changed files with 97 additions and 97 deletions
|
|
@ -1,4 +1,4 @@
|
|||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/union_promotion.rs:19:29
|
||||
|
|
||||
LL | let x: &'static bool = &unsafe { //~ borrowed value does not live long enough
|
||||
|
|
@ -13,4 +13,4 @@ LL | }
|
|||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0714`.
|
||||
For more information about this error, try `rustc --explain E0716`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/const-int-conversion.rs:14:28
|
||||
|
|
||||
LL | let x: &'static i32 = &(5_i32.reverse_bits());
|
||||
|
|
@ -9,7 +9,7 @@ LL | }
|
|||
|
|
||||
= note: borrowed value must be valid for the static lifetime...
|
||||
|
||||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/const-int-conversion.rs:16:28
|
||||
|
|
||||
LL | let y: &'static i32 = &(i32::from_be_bytes([0x12, 0x34, 0x56, 0x78]));
|
||||
|
|
@ -20,7 +20,7 @@ LL | }
|
|||
|
|
||||
= note: borrowed value must be valid for the static lifetime...
|
||||
|
||||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/const-int-conversion.rs:18:28
|
||||
|
|
||||
LL | let z: &'static i32 = &(i32::from_le_bytes([0x12, 0x34, 0x56, 0x78]));
|
||||
|
|
@ -31,7 +31,7 @@ LL | }
|
|||
|
|
||||
= note: borrowed value must be valid for the static lifetime...
|
||||
|
||||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/const-int-conversion.rs:20:28
|
||||
|
|
||||
LL | let a: &'static i32 = &(i32::from_be(i32::from_ne_bytes([0x80, 0, 0, 0])));
|
||||
|
|
@ -42,7 +42,7 @@ LL | }
|
|||
|
|
||||
= note: borrowed value must be valid for the static lifetime...
|
||||
|
||||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/const-int-conversion.rs:22:29
|
||||
|
|
||||
LL | let b: &'static [u8] = &(0x12_34_56_78_i32.to_be_bytes());
|
||||
|
|
@ -53,7 +53,7 @@ LL | }
|
|||
|
|
||||
= note: borrowed value must be valid for the static lifetime...
|
||||
|
||||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/const-int-conversion.rs:24:29
|
||||
|
|
||||
LL | let c: &'static [u8] = &(0x12_34_56_78_i32.to_le_bytes());
|
||||
|
|
@ -64,7 +64,7 @@ LL | }
|
|||
|
|
||||
= note: borrowed value must be valid for the static lifetime...
|
||||
|
||||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/const-int-conversion.rs:26:29
|
||||
|
|
||||
LL | let d: &'static [u8] = &(i32::min_value().to_be().to_ne_bytes());
|
||||
|
|
@ -77,4 +77,4 @@ LL | }
|
|||
|
||||
error: aborting due to 7 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0714`.
|
||||
For more information about this error, try `rustc --explain E0716`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/const-int-overflowing.rs:12:36
|
||||
|
|
||||
LL | let x: &'static (i32, bool) = &(5_i32.overflowing_add(3)); //~ ERROR does not live long enough
|
||||
|
|
@ -9,7 +9,7 @@ LL | }
|
|||
|
|
||||
= note: borrowed value must be valid for the static lifetime...
|
||||
|
||||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/const-int-overflowing.rs:13:36
|
||||
|
|
||||
LL | let y: &'static (i32, bool) = &(5_i32.overflowing_sub(3)); //~ ERROR does not live long enough
|
||||
|
|
@ -20,7 +20,7 @@ LL | }
|
|||
|
|
||||
= note: borrowed value must be valid for the static lifetime...
|
||||
|
||||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/const-int-overflowing.rs:14:36
|
||||
|
|
||||
LL | let z: &'static (i32, bool) = &(5_i32.overflowing_mul(3)); //~ ERROR does not live long enough
|
||||
|
|
@ -32,4 +32,4 @@ LL | }
|
|||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0714`.
|
||||
For more information about this error, try `rustc --explain E0716`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/const-int-rotate.rs:12:28
|
||||
|
|
||||
LL | let x: &'static i32 = &(5_i32.rotate_left(3)); //~ ERROR does not live long enough
|
||||
|
|
@ -9,7 +9,7 @@ LL | }
|
|||
|
|
||||
= note: borrowed value must be valid for the static lifetime...
|
||||
|
||||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/const-int-rotate.rs:13:28
|
||||
|
|
||||
LL | let y: &'static i32 = &(5_i32.rotate_right(3)); //~ ERROR does not live long enough
|
||||
|
|
@ -21,4 +21,4 @@ LL | }
|
|||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0714`.
|
||||
For more information about this error, try `rustc --explain E0716`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/const-int-sign.rs:12:29
|
||||
|
|
||||
LL | let x: &'static bool = &(5_i32.is_negative()); //~ ERROR does not live long enough
|
||||
|
|
@ -9,7 +9,7 @@ LL | }
|
|||
|
|
||||
= note: borrowed value must be valid for the static lifetime...
|
||||
|
||||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/const-int-sign.rs:13:29
|
||||
|
|
||||
LL | let y: &'static bool = &(5_i32.is_positive()); //~ ERROR does not live long enough
|
||||
|
|
@ -21,4 +21,4 @@ LL | }
|
|||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0714`.
|
||||
For more information about this error, try `rustc --explain E0716`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/const-int-wrapping.rs:12:28
|
||||
|
|
||||
LL | let x: &'static i32 = &(5_i32.wrapping_add(3)); //~ ERROR does not live long enough
|
||||
|
|
@ -9,7 +9,7 @@ LL | }
|
|||
|
|
||||
= note: borrowed value must be valid for the static lifetime...
|
||||
|
||||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/const-int-wrapping.rs:13:28
|
||||
|
|
||||
LL | let y: &'static i32 = &(5_i32.wrapping_sub(3)); //~ ERROR does not live long enough
|
||||
|
|
@ -20,7 +20,7 @@ LL | }
|
|||
|
|
||||
= note: borrowed value must be valid for the static lifetime...
|
||||
|
||||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/const-int-wrapping.rs:14:28
|
||||
|
|
||||
LL | let z: &'static i32 = &(5_i32.wrapping_mul(3)); //~ ERROR does not live long enough
|
||||
|
|
@ -31,7 +31,7 @@ LL | }
|
|||
|
|
||||
= note: borrowed value must be valid for the static lifetime...
|
||||
|
||||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/const-int-wrapping.rs:15:28
|
||||
|
|
||||
LL | let a: &'static i32 = &(5_i32.wrapping_shl(3)); //~ ERROR does not live long enough
|
||||
|
|
@ -42,7 +42,7 @@ LL | }
|
|||
|
|
||||
= note: borrowed value must be valid for the static lifetime...
|
||||
|
||||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/const-int-wrapping.rs:16:28
|
||||
|
|
||||
LL | let b: &'static i32 = &(5_i32.wrapping_shr(3)); //~ ERROR does not live long enough
|
||||
|
|
@ -54,4 +54,4 @@ LL | }
|
|||
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0714`.
|
||||
For more information about this error, try `rustc --explain E0716`.
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ error: trait bounds other than `Sized` on const fn parameters are unstable
|
|||
LL | const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/min_const_fn.rs:144:64
|
||||
|
|
||||
LL | const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() }
|
||||
|
|
@ -220,5 +220,5 @@ LL | const fn no_fn_ptrs2() -> fn() { fn foo() {} foo }
|
|||
|
||||
error: aborting due to 36 previous errors
|
||||
|
||||
Some errors occurred: E0493, E0714.
|
||||
Some errors occurred: E0493, E0716.
|
||||
For more information about an error, try `rustc --explain E0493`.
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ error: trait bounds other than `Sized` on const fn parameters are unstable
|
|||
LL | const fn no_inner_dyn_trait_ret() -> Hide { Hide(HasDyn { field: &0 }) }
|
||||
| ^^
|
||||
|
||||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/min_const_fn_dyn.rs:24:67
|
||||
|
|
||||
LL | const fn no_inner_dyn_trait_ret() -> Hide { Hide(HasDyn { field: &0 }) }
|
||||
|
|
@ -22,4 +22,4 @@ LL | const fn no_inner_dyn_trait_ret() -> Hide { Hide(HasDyn { field: &0 }) }
|
|||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0714`.
|
||||
For more information about this error, try `rustc --explain E0716`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/issue-11681.rs:22:20
|
||||
|
|
||||
LL | let testValue = &Test; //~ ERROR borrowed value does not live long enough
|
||||
|
|
@ -15,4 +15,4 @@ LL | fn createTest<'a>() -> &'a Test {
|
|||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0714`.
|
||||
For more information about this error, try `rustc --explain E0716`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/issue-17545.rs:17:10
|
||||
|
|
||||
LL | &id(()), //~ ERROR borrowed value does not live long enough
|
||||
|
|
@ -14,4 +14,4 @@ LL | pub fn foo<'a, F: Fn(&'a ())>(bar: F) {
|
|||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0714`.
|
||||
For more information about this error, try `rustc --explain E0716`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/issue-17718-constants-not-static.rs:15:31
|
||||
|
|
||||
LL | fn foo() -> &'static usize { &id(FOO) }
|
||||
|
|
@ -10,4 +10,4 @@ LL | fn foo() -> &'static usize { &id(FOO) }
|
|||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0714`.
|
||||
For more information about this error, try `rustc --explain E0716`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/issue-27592.rs:26:27
|
||||
|
|
||||
LL | write(|| format_args!("{}", String::from("Hello world")));
|
||||
|
|
@ -6,7 +6,7 @@ LL | write(|| format_args!("{}", String::from("Hello world")));
|
|||
| |
|
||||
| creates a temporary which is freed while still in use
|
||||
|
||||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/issue-27592.rs:26:33
|
||||
|
|
||||
LL | write(|| format_args!("{}", String::from("Hello world")));
|
||||
|
|
@ -16,4 +16,4 @@ LL | write(|| format_args!("{}", String::from("Hello world")));
|
|||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0714`.
|
||||
For more information about this error, try `rustc --explain E0716`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/issue-30438-a.rs:22:17
|
||||
|
|
||||
LL | return &Test { s: &self.s};
|
||||
|
|
@ -17,4 +17,4 @@ LL | | }
|
|||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0714`.
|
||||
For more information about this error, try `rustc --explain E0716`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/issue-30438-b.rs:23:10
|
||||
|
|
||||
LL | &Test { s: &self.s}
|
||||
|
|
@ -18,4 +18,4 @@ LL | | }
|
|||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0714`.
|
||||
For more information about this error, try `rustc --explain E0716`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/issue-36082.rs:23:19
|
||||
|
|
||||
LL | let val: &_ = x.borrow().0;
|
||||
|
|
@ -13,4 +13,4 @@ LL | println!("{}", val);
|
|||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0714`.
|
||||
For more information about this error, try `rustc --explain E0716`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/issue-44373.rs:15:42
|
||||
|
|
||||
LL | let _val: &'static [&'static u32] = &[&FOO]; //~ ERROR borrowed value does not live long enough
|
||||
|
|
@ -10,4 +10,4 @@ LL | }
|
|||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0714`.
|
||||
For more information about this error, try `rustc --explain E0716`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/issue-52049.rs:16:10
|
||||
|
|
||||
LL | foo(&unpromotable(5u32));
|
||||
|
|
@ -10,4 +10,4 @@ LL | }
|
|||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0714`.
|
||||
For more information about this error, try `rustc --explain E0716`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/borrowck-let-suggestion.rs:12:17
|
||||
|
|
||||
LL | let mut x = vec![1].iter();
|
||||
|
|
@ -14,4 +14,4 @@ LL | x.use_mut();
|
|||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0714`.
|
||||
For more information about this error, try `rustc --explain E0716`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/regions-creating-enums.rs:33:17
|
||||
|
|
||||
LL | return &ast::num((*f)(x)); //~ ERROR borrowed value does not live long enough
|
||||
|
|
@ -12,7 +12,7 @@ note: borrowed value must be valid for the lifetime 'a as defined on the functio
|
|||
LL | fn map_nums<'a,'b, F>(x: &ast, f: &mut F) -> &'a ast<'b> where F: FnMut(usize) -> usize {
|
||||
| ^^
|
||||
|
||||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/regions-creating-enums.rs:38:17
|
||||
|
|
||||
LL | return &ast::add(m_x, m_y); //~ ERROR borrowed value does not live long enough
|
||||
|
|
@ -28,4 +28,4 @@ LL | fn map_nums<'a,'b, F>(x: &ast, f: &mut F) -> &'a ast<'b> where F: FnMut(usi
|
|||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0714`.
|
||||
For more information about this error, try `rustc --explain E0716`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/regions-free-region-ordering-caller1.rs:19:27
|
||||
|
|
||||
LL | let z: &'a & usize = &(&y);
|
||||
|
|
@ -15,4 +15,4 @@ LL | fn call1<'a>(x: &'a usize) {
|
|||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0714`.
|
||||
For more information about this error, try `rustc --explain E0716`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/regions-lifetime-of-struct-or-enum-variant.rs:24:20
|
||||
|
|
||||
LL | let testValue = &id(Test);
|
||||
|
|
@ -13,7 +13,7 @@ note: borrowed value must be valid for the lifetime 'a as defined on the functio
|
|||
LL | fn structLifetime<'a>() -> &'a Test {
|
||||
| ^^
|
||||
|
||||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/regions-lifetime-of-struct-or-enum-variant.rs:30:20
|
||||
|
|
||||
LL | let testValue = &id(MyEnum::Variant1);
|
||||
|
|
@ -30,4 +30,4 @@ LL | fn variantLifetime<'a>() -> &'a MyEnum {
|
|||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0714`.
|
||||
For more information about this error, try `rustc --explain E0716`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/regions-ref-in-fn-arg.rs:14:13
|
||||
|
|
||||
LL | fn arg_item(box ref x: Box<isize>) -> &'static isize {
|
||||
|
|
@ -9,7 +9,7 @@ LL | }
|
|||
|
|
||||
= note: borrowed value must be valid for the static lifetime...
|
||||
|
||||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/regions-ref-in-fn-arg.rs:21:11
|
||||
|
|
||||
LL | with(|box ref x| x) //~ ERROR borrowed value does not live long enough
|
||||
|
|
@ -19,4 +19,4 @@ LL | with(|box ref x| x) //~ ERROR borrowed value does not live long enough
|
|||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0714`.
|
||||
For more information about this error, try `rustc --explain E0716`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/regions-ret.rs:14:13
|
||||
|
|
||||
LL | return &id(3); //~ ERROR borrowed value does not live long enough
|
||||
|
|
@ -16,4 +16,4 @@ LL | | }
|
|||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0714`.
|
||||
For more information about this error, try `rustc --explain E0716`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/regions-return-stack-allocated-vec.rs:14:6
|
||||
|
|
||||
LL | &[x] //~ ERROR borrowed value does not live long enough
|
||||
|
|
@ -10,4 +10,4 @@ LL | }
|
|||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0714`.
|
||||
For more information about this error, try `rustc --explain E0716`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/regions-var-type-out-of-scope.rs:19:14
|
||||
|
|
||||
LL | x = &id(3); //~ ERROR borrowed value does not live long enough
|
||||
|
|
@ -13,4 +13,4 @@ LL | assert_eq!(*x, 3);
|
|||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0714`.
|
||||
For more information about this error, try `rustc --explain E0716`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/borrowck-let-suggestion-suffixes.rs:28:14
|
||||
|
|
||||
LL | v3.push(&id('x')); // statement 6
|
||||
|
|
@ -11,7 +11,7 @@ LL | (v1, v2, v3, /* v4 is above. */ v5).use_ref();
|
|||
|
|
||||
= note: consider using a `let` binding to create a longer lived value
|
||||
|
||||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/borrowck-let-suggestion-suffixes.rs:38:18
|
||||
|
|
||||
LL | v4.push(&id('y'));
|
||||
|
|
@ -24,7 +24,7 @@ LL | v4.use_ref();
|
|||
|
|
||||
= note: consider using a `let` binding to create a longer lived value
|
||||
|
||||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/borrowck-let-suggestion-suffixes.rs:49:14
|
||||
|
|
||||
LL | v5.push(&id('z'));
|
||||
|
|
@ -39,4 +39,4 @@ LL | (v1, v2, v3, /* v4 is above. */ v5).use_ref();
|
|||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0714`.
|
||||
For more information about this error, try `rustc --explain E0716`.
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
error[E0597]: borrowed value does not live long enough
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/borrowck-ref-into-rvalue.rs:13:11
|
||||
|
|
||||
LL | match Some("Hello".to_string()) {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use
|
||||
...
|
||||
LL | }
|
||||
| - temporary value only lives until here
|
||||
| - temporary value is freed at the end of this statement
|
||||
LL | println!("{}", *msg);
|
||||
| ---- borrow later used here
|
||||
|
|
||||
|
|
@ -13,4 +13,4 @@ LL | println!("{}", *msg);
|
|||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0597`.
|
||||
For more information about this error, try `rustc --explain E0716`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/issue-15480.rs:15:10
|
||||
|
|
||||
LL | &id(3)
|
||||
|
|
@ -13,4 +13,4 @@ LL | for &&x in &v {
|
|||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0714`.
|
||||
For more information about this error, try `rustc --explain E0716`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/regions-close-over-borrowed-ref-in-obj.rs:22:27
|
||||
|
|
||||
LL | let ss: &isize = &id(1);
|
||||
|
|
@ -13,4 +13,4 @@ LL | }
|
|||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0714`.
|
||||
For more information about this error, try `rustc --explain E0716`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/slice-borrow.rs:16:28
|
||||
|
|
||||
LL | let x: &[isize] = &vec![1, 2, 3, 4, 5];
|
||||
|
|
@ -14,4 +14,4 @@ LL | y.use_ref();
|
|||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0714`.
|
||||
For more information about this error, try `rustc --explain E0716`.
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ error[E0493]: destructors cannot be evaluated at compile-time
|
|||
LL | static PROMOTION_FAIL_S: Option<&'static WithDtor> = Some(&WithDtor);
|
||||
| ^^^^^^^^ statics cannot evaluate destructors
|
||||
|
||||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/static-drop-scope.rs:19:60
|
||||
|
|
||||
LL | static PROMOTION_FAIL_S: Option<&'static WithDtor> = Some(&WithDtor);
|
||||
|
|
@ -20,7 +20,7 @@ error[E0493]: destructors cannot be evaluated at compile-time
|
|||
LL | const PROMOTION_FAIL_C: Option<&'static WithDtor> = Some(&WithDtor);
|
||||
| ^^^^^^^^ constants cannot evaluate destructors
|
||||
|
||||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/static-drop-scope.rs:23:59
|
||||
|
|
||||
LL | const PROMOTION_FAIL_C: Option<&'static WithDtor> = Some(&WithDtor);
|
||||
|
|
@ -56,5 +56,5 @@ LL | (x, ()).1
|
|||
|
||||
error: aborting due to 8 previous errors
|
||||
|
||||
Some errors occurred: E0493, E0714.
|
||||
Some errors occurred: E0493, E0716.
|
||||
For more information about an error, try `rustc --explain E0493`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/static-reference-to-fn-2.rs:28:22
|
||||
|
|
||||
LL | self_.statefn = &id(state2 as StateMachineFunc);
|
||||
|
|
@ -16,7 +16,7 @@ LL | | return Some("state1");
|
|||
LL | | }
|
||||
| |_^
|
||||
|
||||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/static-reference-to-fn-2.rs:34:22
|
||||
|
|
||||
LL | self_.statefn = &id(state3 as StateMachineFunc);
|
||||
|
|
@ -34,7 +34,7 @@ LL | | return Some("state2");
|
|||
LL | | }
|
||||
| |_^
|
||||
|
||||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/static-reference-to-fn-2.rs:40:22
|
||||
|
|
||||
LL | self_.statefn = &id(finished as StateMachineFunc);
|
||||
|
|
@ -52,7 +52,7 @@ LL | | return Some("state3");
|
|||
LL | | }
|
||||
| |_^
|
||||
|
||||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/static-reference-to-fn-2.rs:51:19
|
||||
|
|
||||
LL | statefn: &id(state1 as StateMachineFunc)
|
||||
|
|
@ -65,4 +65,4 @@ LL | }
|
|||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0714`.
|
||||
For more information about this error, try `rustc --explain E0716`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/static-region-bound.rs:20:14
|
||||
|
|
||||
LL | let x = &id(3); //~ ERROR borrowed value does not live long enough
|
||||
|
|
@ -11,4 +11,4 @@ LL | }
|
|||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0714`.
|
||||
For more information about this error, try `rustc --explain E0716`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/wf-misc-methods-issue-28609.rs:32:31
|
||||
|
|
||||
LL | s.transmute_inherent(&mut 42) //~ ERROR does not live long enough
|
||||
|
|
@ -55,7 +55,7 @@ LL | | &*s
|
|||
LL | | }
|
||||
| |_^
|
||||
|
||||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/wf-misc-methods-issue-28609.rs:63:15
|
||||
|
|
||||
LL | s << &mut 3 //~ ERROR does not live long enough
|
||||
|
|
@ -72,7 +72,7 @@ LL | | s << &mut 3 //~ ERROR does not live long enough
|
|||
LL | | }
|
||||
| |_^
|
||||
|
||||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/wf-misc-methods-issue-28609.rs:68:16
|
||||
|
|
||||
LL | s.shl(&mut 3) //~ ERROR does not live long enough
|
||||
|
|
@ -89,7 +89,7 @@ LL | | s.shl(&mut 3) //~ ERROR does not live long enough
|
|||
LL | | }
|
||||
| |_^
|
||||
|
||||
error[E0714]: temporary value dropped while borrowed
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/wf-misc-methods-issue-28609.rs:73:21
|
||||
|
|
||||
LL | S2::shl(s, &mut 3) //~ ERROR does not live long enough
|
||||
|
|
@ -108,5 +108,5 @@ LL | | }
|
|||
|
||||
error: aborting due to 6 previous errors
|
||||
|
||||
Some errors occurred: E0597, E0714.
|
||||
Some errors occurred: E0597, E0716.
|
||||
For more information about an error, try `rustc --explain E0597`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue