Skip to content

Commit ea4d934

Browse files
pnkfelixmikhail-m1
authored andcommitted
Change the diagnostic number from 714 to 716.
1 parent 5fc0b74 commit ea4d934

25 files changed

+58
-58
lines changed

src/librustc_mir/diagnostics.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2263,13 +2263,13 @@ lifetime, which would again violate the `&mut`-borrow's exclusive
22632263
access.
22642264
"##,
22652265

2266-
E0714: r##"
2266+
E0716: r##"
22672267
This error indicates that a temporary value is being dropped
22682268
while a borrow is still in active use.
22692269
22702270
Erroneous code example:
22712271
2272-
```compile_fail,E0714
2272+
```compile_fail,E0716
22732273
# #![feature(nll)]
22742274
fn foo() -> i32 { 22 }
22752275
fn bar(x: &i32) -> &i32 { x }

src/librustc_mir/util/borrowck_errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ pub trait BorrowckErrors<'cx>: Sized + Copy {
739739
let err = struct_span_err!(
740740
self,
741741
span,
742-
E0714,
742+
E0716,
743743
"temporary value dropped while borrowed{OGN}",
744744
OGN = o
745745
);

src/test/ui/borrowck/borrowck-borrow-from-temporary.nll.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0714]: temporary value dropped while borrowed
1+
error[E0716]: temporary value dropped while borrowed
22
--> $DIR/borrowck-borrow-from-temporary.rs:19:24
33
|
44
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 {
1515

1616
error: aborting due to previous error
1717

18-
For more information about this error, try `rustc --explain E0714`.
18+
For more information about this error, try `rustc --explain E0716`.

src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.nll.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0714]: temporary value dropped while borrowed
1+
error[E0716]: temporary value dropped while borrowed
22
--> $DIR/borrowck-borrowed-uniq-rvalue-2.rs:32:20
33
|
44
LL | let x = defer(&vec!["Goodbye", "world!"]);
@@ -13,4 +13,4 @@ LL | x.x[0];
1313

1414
error: aborting due to previous error
1515

16-
For more information about this error, try `rustc --explain E0714`.
16+
For more information about this error, try `rustc --explain E0716`.

src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue.nll.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0714]: temporary value dropped while borrowed
1+
error[E0716]: temporary value dropped while borrowed
22
--> $DIR/borrowck-borrowed-uniq-rvalue.rs:20:28
33
|
44
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);
1313

1414
error: aborting due to previous error
1515

16-
For more information about this error, try `rustc --explain E0714`.
16+
For more information about this error, try `rustc --explain E0716`.

src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.nll.stderr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0714]: temporary value dropped while borrowed
1+
error[E0716]: temporary value dropped while borrowed
22
--> $DIR/promote-ref-mut-in-let-issue-46557.rs:15:21
33
|
44
LL | let ref mut x = 1234543; //~ ERROR
@@ -9,7 +9,7 @@ LL | }
99
|
1010
= note: borrowed value must be valid for the static lifetime...
1111

12-
error[E0714]: temporary value dropped while borrowed
12+
error[E0716]: temporary value dropped while borrowed
1313
--> $DIR/promote-ref-mut-in-let-issue-46557.rs:20:25
1414
|
1515
LL | let (ref mut x, ) = (1234543, ); //~ ERROR
@@ -20,7 +20,7 @@ LL | }
2020
|
2121
= note: borrowed value must be valid for the static lifetime...
2222

23-
error[E0714]: temporary value dropped while borrowed
23+
error[E0716]: temporary value dropped while borrowed
2424
--> $DIR/promote-ref-mut-in-let-issue-46557.rs:25:11
2525
|
2626
LL | match 1234543 {
@@ -31,7 +31,7 @@ LL | }
3131
|
3232
= note: borrowed value must be valid for the static lifetime...
3333

34-
error[E0714]: temporary value dropped while borrowed
34+
error[E0716]: temporary value dropped while borrowed
3535
--> $DIR/promote-ref-mut-in-let-issue-46557.rs:31:11
3636
|
3737
LL | match (123443,) {
@@ -42,7 +42,7 @@ LL | }
4242
|
4343
= note: borrowed value must be valid for the static lifetime...
4444

45-
error[E0714]: temporary value dropped while borrowed
45+
error[E0716]: temporary value dropped while borrowed
4646
--> $DIR/promote-ref-mut-in-let-issue-46557.rs:37:10
4747
|
4848
LL | &mut 1234543 //~ ERROR
@@ -54,4 +54,4 @@ LL | }
5454

5555
error: aborting due to 5 previous errors
5656

57-
For more information about this error, try `rustc --explain E0714`.
57+
For more information about this error, try `rustc --explain E0716`.

src/test/ui/consts/const-eval/dont_promote_unstable_const_fn.nll.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | const fn bar() -> u32 { foo() } //~ ERROR `foo` is not yet stable as a cons
66
|
77
= help: in Nightly builds, add `#![feature(foo)]` to the crate attributes to enable
88

9-
error[E0714]: temporary value dropped while borrowed
9+
error[E0716]: temporary value dropped while borrowed
1010
--> $DIR/dont_promote_unstable_const_fn.rs:28:28
1111
|
1212
LL | let _: &'static u32 = &foo(); //~ ERROR does not live long enough
@@ -16,7 +16,7 @@ LL | }
1616
|
1717
= note: borrowed value must be valid for the static lifetime...
1818

19-
error[E0714]: temporary value dropped while borrowed
19+
error[E0716]: temporary value dropped while borrowed
2020
--> $DIR/dont_promote_unstable_const_fn.rs:32:28
2121
|
2222
LL | let _: &'static u32 = &meh(); //~ ERROR does not live long enough
@@ -27,7 +27,7 @@ LL | }
2727
|
2828
= note: borrowed value must be valid for the static lifetime...
2929

30-
error[E0714]: temporary value dropped while borrowed
30+
error[E0716]: temporary value dropped while borrowed
3131
--> $DIR/dont_promote_unstable_const_fn.rs:33:26
3232
|
3333
LL | let x: &'static _ = &std::time::Duration::from_millis(42).subsec_millis();
@@ -40,4 +40,4 @@ LL | }
4040

4141
error: aborting due to 4 previous errors
4242

43-
For more information about this error, try `rustc --explain E0714`.
43+
For more information about this error, try `rustc --explain E0716`.

src/test/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.nll.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0714]: temporary value dropped while borrowed
1+
error[E0716]: temporary value dropped while borrowed
22
--> $DIR/dont_promote_unstable_const_fn_cross_crate.rs:18:28
33
|
44
LL | let _: &'static u32 = &foo(); //~ ERROR does not live long enough
@@ -9,7 +9,7 @@ LL | }
99
|
1010
= note: borrowed value must be valid for the static lifetime...
1111

12-
error[E0714]: temporary value dropped while borrowed
12+
error[E0716]: temporary value dropped while borrowed
1313
--> $DIR/dont_promote_unstable_const_fn_cross_crate.rs:19:29
1414
|
1515
LL | let _x: &'static u32 = &foo(); //~ ERROR does not live long enough
@@ -21,4 +21,4 @@ LL | }
2121

2222
error: aborting due to 2 previous errors
2323

24-
For more information about this error, try `rustc --explain E0714`.
24+
For more information about this error, try `rustc --explain E0716`.

src/test/ui/consts/const-eval/promoted_raw_ptr_ops.nll.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0714]: temporary value dropped while borrowed
1+
error[E0716]: temporary value dropped while borrowed
22
--> $DIR/promoted_raw_ptr_ops.rs:14:29
33
|
44
LL | let x: &'static bool = &(42 as *const i32 == 43 as *const i32);
@@ -9,7 +9,7 @@ LL | }
99
|
1010
= note: borrowed value must be valid for the static lifetime...
1111

12-
error[E0714]: temporary value dropped while borrowed
12+
error[E0716]: temporary value dropped while borrowed
1313
--> $DIR/promoted_raw_ptr_ops.rs:16:30
1414
|
1515
LL | let y: &'static usize = &(&1 as *const i32 as usize + 1); //~ ERROR does not live long enough
@@ -20,7 +20,7 @@ LL | }
2020
|
2121
= note: borrowed value must be valid for the static lifetime...
2222

23-
error[E0714]: temporary value dropped while borrowed
23+
error[E0716]: temporary value dropped while borrowed
2424
--> $DIR/promoted_raw_ptr_ops.rs:17:28
2525
|
2626
LL | let z: &'static i32 = &(unsafe { *(42 as *const i32) }); //~ ERROR does not live long enough
@@ -32,4 +32,4 @@ LL | }
3232

3333
error: aborting due to 3 previous errors
3434

35-
For more information about this error, try `rustc --explain E0714`.
35+
For more information about this error, try `rustc --explain E0716`.

src/test/ui/consts/const-eval/transmute-const-promotion.nll.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0714]: temporary value dropped while borrowed
1+
error[E0716]: temporary value dropped while borrowed
22
--> $DIR/transmute-const-promotion.rs:16:37
33
|
44
LL | let x: &'static u32 = unsafe { &mem::transmute(3.0f32) };
@@ -11,4 +11,4 @@ LL | }
1111

1212
error: aborting due to previous error
1313

14-
For more information about this error, try `rustc --explain E0714`.
14+
For more information about this error, try `rustc --explain E0716`.

0 commit comments

Comments
 (0)