From ea4d934c32e49bdcf7578e1bb147ce5f62ac5d38 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Tue, 25 Sep 2018 16:06:28 +0200 Subject: [PATCH] Change the diagnostic number from 714 to 716. --- src/librustc_mir/diagnostics.rs | 4 ++-- src/librustc_mir/util/borrowck_errors.rs | 2 +- .../borrowck-borrow-from-temporary.nll.stderr | 4 ++-- .../borrowck-borrowed-uniq-rvalue-2.nll.stderr | 4 ++-- .../borrowck-borrowed-uniq-rvalue.nll.stderr | 4 ++-- .../promote-ref-mut-in-let-issue-46557.nll.stderr | 12 ++++++------ .../dont_promote_unstable_const_fn.nll.stderr | 8 ++++---- ..._promote_unstable_const_fn_cross_crate.nll.stderr | 6 +++--- .../const-eval/promoted_raw_ptr_ops.nll.stderr | 8 ++++---- .../const-eval/transmute-const-promotion.nll.stderr | 4 ++-- src/test/ui/issues/issue-36082.mir.stderr | 4 ++-- src/test/ui/issues/issue-36082.rs | 2 +- src/test/ui/issues/issue-46472.rs | 2 +- src/test/ui/issues/issue-46472.stderr | 4 ++-- src/test/ui/issues/issue-47184.rs | 2 +- src/test/ui/issues/issue-47184.stderr | 4 ++-- src/test/ui/nll/borrowed-temporary-error.rs | 2 +- src/test/ui/nll/borrowed-temporary-error.stderr | 6 +++--- src/test/ui/nll/borrowed-universal-error.rs | 2 +- src/test/ui/nll/borrowed-universal-error.stderr | 6 +++--- src/test/ui/nll/issue-52534-1.stderr | 4 ++-- src/test/ui/nll/return-ref-mut-issue-46557.rs | 2 +- src/test/ui/nll/return-ref-mut-issue-46557.stderr | 6 +++--- src/test/ui/nll/user-annotations/patterns.rs | 6 +++--- src/test/ui/nll/user-annotations/patterns.stderr | 8 ++++---- 25 files changed, 58 insertions(+), 58 deletions(-) diff --git a/src/librustc_mir/diagnostics.rs b/src/librustc_mir/diagnostics.rs index aac5fc5ed7e9..75745849290e 100644 --- a/src/librustc_mir/diagnostics.rs +++ b/src/librustc_mir/diagnostics.rs @@ -2263,13 +2263,13 @@ lifetime, which would again violate the `&mut`-borrow's exclusive access. "##, -E0714: r##" +E0716: r##" This error indicates that a temporary value is being dropped while a borrow is still in active use. Erroneous code example: -```compile_fail,E0714 +```compile_fail,E0716 # #![feature(nll)] fn foo() -> i32 { 22 } fn bar(x: &i32) -> &i32 { x } diff --git a/src/librustc_mir/util/borrowck_errors.rs b/src/librustc_mir/util/borrowck_errors.rs index c78020a26097..2616d0cd9640 100644 --- a/src/librustc_mir/util/borrowck_errors.rs +++ b/src/librustc_mir/util/borrowck_errors.rs @@ -739,7 +739,7 @@ pub trait BorrowckErrors<'cx>: Sized + Copy { let err = struct_span_err!( self, span, - E0714, + E0716, "temporary value dropped while borrowed{OGN}", OGN = o ); diff --git a/src/test/ui/borrowck/borrowck-borrow-from-temporary.nll.stderr b/src/test/ui/borrowck/borrowck-borrow-from-temporary.nll.stderr index 894eb4cc4a2e..fe2bc0ca79b2 100644 --- a/src/test/ui/borrowck/borrowck-borrow-from-temporary.nll.stderr +++ b/src/test/ui/borrowck/borrowck-borrow-from-temporary.nll.stderr @@ -1,4 +1,4 @@ -error[E0714]: temporary value dropped while borrowed +error[E0716]: temporary value dropped while borrowed --> $DIR/borrowck-borrow-from-temporary.rs:19:24 | LL | let &Foo(ref x) = &id(Foo(3)); //~ ERROR borrowed value does not live long enough @@ -15,4 +15,4 @@ LL | fn foo<'a>() -> &'a isize { 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`. diff --git a/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.nll.stderr b/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.nll.stderr index 1b5a1f4b29bf..80c71b8e2820 100644 --- a/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.nll.stderr +++ b/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.nll.stderr @@ -1,4 +1,4 @@ -error[E0714]: temporary value dropped while borrowed +error[E0716]: temporary value dropped while borrowed --> $DIR/borrowck-borrowed-uniq-rvalue-2.rs:32:20 | LL | let x = defer(&vec!["Goodbye", "world!"]); @@ -13,4 +13,4 @@ LL | x.x[0]; 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`. diff --git a/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue.nll.stderr b/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue.nll.stderr index 9236e9e22883..0c71ac793df7 100644 --- a/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue.nll.stderr +++ b/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue.nll.stderr @@ -1,4 +1,4 @@ -error[E0714]: temporary value dropped while borrowed +error[E0716]: temporary value dropped while borrowed --> $DIR/borrowck-borrowed-uniq-rvalue.rs:20:28 | LL | buggy_map.insert(42, &*Box::new(1)); //~ ERROR borrowed value does not live long enough @@ -13,4 +13,4 @@ LL | buggy_map.insert(43, &*tmp); 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`. diff --git a/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.nll.stderr b/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.nll.stderr index a4fc91f208df..101fb530a910 100644 --- a/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.nll.stderr +++ b/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.nll.stderr @@ -1,4 +1,4 @@ -error[E0714]: temporary value dropped while borrowed +error[E0716]: temporary value dropped while borrowed --> $DIR/promote-ref-mut-in-let-issue-46557.rs:15:21 | LL | let ref mut x = 1234543; //~ ERROR @@ -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/promote-ref-mut-in-let-issue-46557.rs:20:25 | LL | let (ref mut x, ) = (1234543, ); //~ ERROR @@ -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/promote-ref-mut-in-let-issue-46557.rs:25:11 | LL | match 1234543 { @@ -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/promote-ref-mut-in-let-issue-46557.rs:31:11 | LL | match (123443,) { @@ -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/promote-ref-mut-in-let-issue-46557.rs:37:10 | LL | &mut 1234543 //~ ERROR @@ -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`. diff --git a/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn.nll.stderr b/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn.nll.stderr index e257fdb31e76..fe7187af5f59 100644 --- a/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn.nll.stderr +++ b/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn.nll.stderr @@ -6,7 +6,7 @@ LL | const fn bar() -> u32 { foo() } //~ ERROR `foo` is not yet stable as a cons | = help: in Nightly builds, add `#![feature(foo)]` to the crate attributes to enable -error[E0714]: temporary value dropped while borrowed +error[E0716]: temporary value dropped while borrowed --> $DIR/dont_promote_unstable_const_fn.rs:28:28 | LL | let _: &'static u32 = &foo(); //~ ERROR does not live long enough @@ -16,7 +16,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/dont_promote_unstable_const_fn.rs:32:28 | LL | let _: &'static u32 = &meh(); //~ ERROR does not live long enough @@ -27,7 +27,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/dont_promote_unstable_const_fn.rs:33:26 | LL | let x: &'static _ = &std::time::Duration::from_millis(42).subsec_millis(); @@ -40,4 +40,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`. diff --git a/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.nll.stderr b/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.nll.stderr index 6ec073364096..c4feb1129014 100644 --- a/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.nll.stderr +++ b/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.nll.stderr @@ -1,4 +1,4 @@ -error[E0714]: temporary value dropped while borrowed +error[E0716]: temporary value dropped while borrowed --> $DIR/dont_promote_unstable_const_fn_cross_crate.rs:18:28 | LL | let _: &'static u32 = &foo(); //~ 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/dont_promote_unstable_const_fn_cross_crate.rs:19:29 | LL | let _x: &'static u32 = &foo(); //~ 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`. diff --git a/src/test/ui/consts/const-eval/promoted_raw_ptr_ops.nll.stderr b/src/test/ui/consts/const-eval/promoted_raw_ptr_ops.nll.stderr index acc6104d9e21..bc8a99f55483 100644 --- a/src/test/ui/consts/const-eval/promoted_raw_ptr_ops.nll.stderr +++ b/src/test/ui/consts/const-eval/promoted_raw_ptr_ops.nll.stderr @@ -1,4 +1,4 @@ -error[E0714]: temporary value dropped while borrowed +error[E0716]: temporary value dropped while borrowed --> $DIR/promoted_raw_ptr_ops.rs:14:29 | LL | let x: &'static bool = &(42 as *const i32 == 43 as *const i32); @@ -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/promoted_raw_ptr_ops.rs:16:30 | LL | let y: &'static usize = &(&1 as *const i32 as usize + 1); //~ 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/promoted_raw_ptr_ops.rs:17:28 | LL | let z: &'static i32 = &(unsafe { *(42 as *const i32) }); //~ 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`. diff --git a/src/test/ui/consts/const-eval/transmute-const-promotion.nll.stderr b/src/test/ui/consts/const-eval/transmute-const-promotion.nll.stderr index e11f589b1052..cf3678e7d60d 100644 --- a/src/test/ui/consts/const-eval/transmute-const-promotion.nll.stderr +++ b/src/test/ui/consts/const-eval/transmute-const-promotion.nll.stderr @@ -1,4 +1,4 @@ -error[E0714]: temporary value dropped while borrowed +error[E0716]: temporary value dropped while borrowed --> $DIR/transmute-const-promotion.rs:16:37 | LL | let x: &'static u32 = unsafe { &mem::transmute(3.0f32) }; @@ -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`. diff --git a/src/test/ui/issues/issue-36082.mir.stderr b/src/test/ui/issues/issue-36082.mir.stderr index 4a481da6522c..7fa7cee0aec1 100644 --- a/src/test/ui/issues/issue-36082.mir.stderr +++ b/src/test/ui/issues/issue-36082.mir.stderr @@ -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`. diff --git a/src/test/ui/issues/issue-36082.rs b/src/test/ui/issues/issue-36082.rs index 018d5bf09188..b8a498a4dc85 100644 --- a/src/test/ui/issues/issue-36082.rs +++ b/src/test/ui/issues/issue-36082.rs @@ -25,7 +25,7 @@ fn main() { //[ast]~| NOTE temporary value dropped here while still borrowed //[ast]~| NOTE temporary value does not live long enough //[ast]~| NOTE consider using a `let` binding to increase its lifetime - //[mir]~^^^^^ ERROR temporary value dropped while borrowed [E0714] + //[mir]~^^^^^ ERROR temporary value dropped while borrowed [E0716] //[mir]~| NOTE temporary value is freed at the end of this statement //[mir]~| NOTE creates a temporary which is freed while still in use //[mir]~| NOTE consider using a `let` binding to create a longer lived value diff --git a/src/test/ui/issues/issue-46472.rs b/src/test/ui/issues/issue-46472.rs index 79e805c5356c..84e30a4d2916 100644 --- a/src/test/ui/issues/issue-46472.rs +++ b/src/test/ui/issues/issue-46472.rs @@ -13,7 +13,7 @@ fn bar<'a>() -> &'a mut u32 { &mut 4 //~^ ERROR borrowed value does not live long enough (Ast) [E0597] - //~| ERROR temporary value dropped while borrowed (Mir) [E0714] + //~| ERROR temporary value dropped while borrowed (Mir) [E0716] } fn main() { } diff --git a/src/test/ui/issues/issue-46472.stderr b/src/test/ui/issues/issue-46472.stderr index 39c4e091fd2a..4c0e6544a939 100644 --- a/src/test/ui/issues/issue-46472.stderr +++ b/src/test/ui/issues/issue-46472.stderr @@ -13,7 +13,7 @@ note: borrowed value must be valid for the lifetime 'a as defined on the functio LL | fn bar<'a>() -> &'a mut u32 { | ^^ -error[E0714]: temporary value dropped while borrowed (Mir) +error[E0716]: temporary value dropped while borrowed (Mir) --> $DIR/issue-46472.rs:14:10 | LL | &mut 4 @@ -30,5 +30,5 @@ LL | fn bar<'a>() -> &'a mut u32 { error: aborting due to 2 previous errors -Some errors occurred: E0597, E0714. +Some errors occurred: E0597, E0716. For more information about an error, try `rustc --explain E0597`. diff --git a/src/test/ui/issues/issue-47184.rs b/src/test/ui/issues/issue-47184.rs index fbf67a3b4fc0..95d9d858ecdb 100644 --- a/src/test/ui/issues/issue-47184.rs +++ b/src/test/ui/issues/issue-47184.rs @@ -12,5 +12,5 @@ fn main() { let _vec: Vec<&'static String> = vec![&String::new()]; - //~^ ERROR temporary value dropped while borrowed [E0714] + //~^ ERROR temporary value dropped while borrowed [E0716] } diff --git a/src/test/ui/issues/issue-47184.stderr b/src/test/ui/issues/issue-47184.stderr index 1a4b7ae16bff..4a8e9255723c 100644 --- a/src/test/ui/issues/issue-47184.stderr +++ b/src/test/ui/issues/issue-47184.stderr @@ -1,4 +1,4 @@ -error[E0714]: temporary value dropped while borrowed +error[E0716]: temporary value dropped while borrowed --> $DIR/issue-47184.rs:14:44 | LL | let _vec: Vec<&'static String> = vec![&String::new()]; @@ -10,4 +10,4 @@ LL | let _vec: Vec<&'static String> = vec![&String::new()]; 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`. diff --git a/src/test/ui/nll/borrowed-temporary-error.rs b/src/test/ui/nll/borrowed-temporary-error.rs index d0b53359cd0e..3bfb319ff318 100644 --- a/src/test/ui/nll/borrowed-temporary-error.rs +++ b/src/test/ui/nll/borrowed-temporary-error.rs @@ -18,7 +18,7 @@ fn main() { let x = gimme({ let v = 22; &(v,) - //~^ ERROR temporary value dropped while borrowed [E0714] + //~^ ERROR temporary value dropped while borrowed [E0716] }); println!("{:?}", x); } diff --git a/src/test/ui/nll/borrowed-temporary-error.stderr b/src/test/ui/nll/borrowed-temporary-error.stderr index a929914d8df7..7f62f2ee52a9 100644 --- a/src/test/ui/nll/borrowed-temporary-error.stderr +++ b/src/test/ui/nll/borrowed-temporary-error.stderr @@ -1,9 +1,9 @@ -error[E0714]: temporary value dropped while borrowed +error[E0716]: temporary value dropped while borrowed --> $DIR/borrowed-temporary-error.rs:20:10 | LL | &(v,) | ^^^^ creates a temporary which is freed while still in use -LL | //~^ ERROR temporary value dropped while borrowed [E0714] +LL | //~^ ERROR temporary value dropped while borrowed [E0716] LL | }); | - temporary value is freed at the end of this statement LL | println!("{:?}", x); @@ -13,4 +13,4 @@ LL | println!("{:?}", x); 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`. diff --git a/src/test/ui/nll/borrowed-universal-error.rs b/src/test/ui/nll/borrowed-universal-error.rs index 5ea91d3618af..016a4f49e504 100644 --- a/src/test/ui/nll/borrowed-universal-error.rs +++ b/src/test/ui/nll/borrowed-universal-error.rs @@ -18,7 +18,7 @@ fn gimme(x: &(u32,)) -> &u32 { fn foo<'a>(x: &'a (u32,)) -> &'a u32 { let v = 22; gimme(&(v,)) - //~^ ERROR temporary value dropped while borrowed [E0714] + //~^ ERROR temporary value dropped while borrowed [E0716] } fn main() {} diff --git a/src/test/ui/nll/borrowed-universal-error.stderr b/src/test/ui/nll/borrowed-universal-error.stderr index a65a396d2ab6..d7ab5cec4a84 100644 --- a/src/test/ui/nll/borrowed-universal-error.stderr +++ b/src/test/ui/nll/borrowed-universal-error.stderr @@ -1,9 +1,9 @@ -error[E0714]: temporary value dropped while borrowed +error[E0716]: temporary value dropped while borrowed --> $DIR/borrowed-universal-error.rs:20:12 | LL | gimme(&(v,)) | ^^^^ creates a temporary which is freed while still in use -LL | //~^ ERROR temporary value dropped while borrowed [E0714] +LL | //~^ ERROR temporary value dropped while borrowed [E0716] LL | } | - temporary value is freed at the end of this statement | @@ -15,4 +15,4 @@ LL | fn foo<'a>(x: &'a (u32,)) -> &'a u32 { 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`. diff --git a/src/test/ui/nll/issue-52534-1.stderr b/src/test/ui/nll/issue-52534-1.stderr index 9bb32c3ed3dc..0d071915a3b8 100644 --- a/src/test/ui/nll/issue-52534-1.stderr +++ b/src/test/ui/nll/issue-52534-1.stderr @@ -52,7 +52,7 @@ LL | } = note: functions cannot return a borrow to data owned within the function's scope, functions can only return borrows to data passed as arguments = note: to learn more, visit -error[E0714]: temporary value dropped while borrowed +error[E0716]: temporary value dropped while borrowed --> $DIR/issue-52534-1.rs:30:6 | LL | &&x @@ -137,5 +137,5 @@ LL | } error: aborting due to 8 previous errors -Some errors occurred: E0597, E0714. +Some errors occurred: E0597, E0716. For more information about an error, try `rustc --explain E0597`. diff --git a/src/test/ui/nll/return-ref-mut-issue-46557.rs b/src/test/ui/nll/return-ref-mut-issue-46557.rs index 82222530335e..e598147bdab7 100644 --- a/src/test/ui/nll/return-ref-mut-issue-46557.rs +++ b/src/test/ui/nll/return-ref-mut-issue-46557.rs @@ -14,7 +14,7 @@ #![allow(dead_code)] fn gimme_static_mut() -> &'static mut u32 { - let ref mut x = 1234543; //~ ERROR temporary value dropped while borrowed [E0714] + let ref mut x = 1234543; //~ ERROR temporary value dropped while borrowed [E0716] x } diff --git a/src/test/ui/nll/return-ref-mut-issue-46557.stderr b/src/test/ui/nll/return-ref-mut-issue-46557.stderr index 1e8224c8ddbd..368cc6774718 100644 --- a/src/test/ui/nll/return-ref-mut-issue-46557.stderr +++ b/src/test/ui/nll/return-ref-mut-issue-46557.stderr @@ -1,7 +1,7 @@ -error[E0714]: temporary value dropped while borrowed +error[E0716]: temporary value dropped while borrowed --> $DIR/return-ref-mut-issue-46557.rs:17:21 | -LL | let ref mut x = 1234543; //~ ERROR temporary value dropped while borrowed [E0714] +LL | let ref mut x = 1234543; //~ ERROR temporary value dropped while borrowed [E0716] | ^^^^^^^ creates a temporary which is freed while still in use LL | x LL | } @@ -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`. diff --git a/src/test/ui/nll/user-annotations/patterns.rs b/src/test/ui/nll/user-annotations/patterns.rs index 971a73770249..e3bac513fa87 100644 --- a/src/test/ui/nll/user-annotations/patterns.rs +++ b/src/test/ui/nll/user-annotations/patterns.rs @@ -51,13 +51,13 @@ fn underscore_with_initializer() { let _: &'static u32 = &x; //~ ERROR let _: Vec<&'static String> = vec![&String::new()]; - //~^ ERROR temporary value dropped while borrowed [E0714] + //~^ ERROR temporary value dropped while borrowed [E0716] let (_, a): (Vec<&'static String>, _) = (vec![&String::new()], 44); - //~^ ERROR temporary value dropped while borrowed [E0714] + //~^ ERROR temporary value dropped while borrowed [E0716] let (_a, b): (Vec<&'static String>, _) = (vec![&String::new()], 44); - //~^ ERROR temporary value dropped while borrowed [E0714] + //~^ ERROR temporary value dropped while borrowed [E0716] } fn pair_underscores_with_initializer() { diff --git a/src/test/ui/nll/user-annotations/patterns.stderr b/src/test/ui/nll/user-annotations/patterns.stderr index 0e3109413bdf..b01dc65fc5f9 100644 --- a/src/test/ui/nll/user-annotations/patterns.stderr +++ b/src/test/ui/nll/user-annotations/patterns.stderr @@ -40,7 +40,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/patterns.rs:53:41 | LL | let _: Vec<&'static String> = vec![&String::new()]; @@ -50,7 +50,7 @@ LL | let _: Vec<&'static String> = vec![&String::new()]; | = 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/patterns.rs:56:52 | LL | let (_, a): (Vec<&'static String>, _) = (vec![&String::new()], 44); @@ -60,7 +60,7 @@ LL | let (_, a): (Vec<&'static String>, _) = (vec![&String::new()], 44); | = 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/patterns.rs:59:53 | LL | let (_a, b): (Vec<&'static String>, _) = (vec![&String::new()], 44); @@ -140,5 +140,5 @@ LL | let (y, _z): (&'static u32, u32) = (x, 44); //~ ERROR error: aborting due to 14 previous errors -Some errors occurred: E0597, E0714. +Some errors occurred: E0597, E0716. For more information about an error, try `rustc --explain E0597`.