Skip to content

Commit 40deec8

Browse files
authored
Rollup merge of rust-lang#66155 - GuillaumeGomez:long-err-explanation-E0594, r=Dylan-DPC
Add long error explanation for E0594 Part of rust-lang#61137. r? @Dylan-DPC
2 parents 49077c5 + c981c99 commit 40deec8

File tree

47 files changed

+88
-22
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+88
-22
lines changed

src/librustc_error_codes/error_codes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@ E0590: include_str!("./error_codes/E0590.md"),
318318
E0591: include_str!("./error_codes/E0591.md"),
319319
E0592: include_str!("./error_codes/E0592.md"),
320320
E0593: include_str!("./error_codes/E0593.md"),
321+
E0594: include_str!("./error_codes/E0594.md"),
321322
E0595: include_str!("./error_codes/E0595.md"),
322323
E0596: include_str!("./error_codes/E0596.md"),
323324
E0597: include_str!("./error_codes/E0597.md"),
@@ -566,7 +567,6 @@ E0744: include_str!("./error_codes/E0744.md"),
566567
// E0563, // cannot determine a type for this `impl Trait` removed in 6383de15
567568
// E0564, // only named lifetimes are allowed in `impl Trait`,
568569
// but `{}` was found in the type `{}`
569-
E0594, // cannot assign to {}
570570
// E0598, // lifetime of {} is too short to guarantee its contents can be...
571571
// E0611, // merged into E0616
572572
// E0612, // merged into E0609
Lines changed: 23 additions & 0 deletions

src/test/ui/borrowck/borrow-immutable-upvar-mutation.stderr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,5 @@ LL | let _h = to_fn_mut(move || { set(&mut z); to_fn(move || z = 42); })
7272

7373
error: aborting due to 6 previous errors
7474

75-
For more information about this error, try `rustc --explain E0596`.
75+
Some errors have detailed explanations: E0594, E0596.
76+
For more information about an error, try `rustc --explain E0594`.

src/test/ui/borrowck/borrowck-assign-to-andmut-in-aliasable-loc.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ LL | *s.pointer += 1;
1616

1717
error: aborting due to 2 previous errors
1818

19+
For more information about this error, try `rustc --explain E0594`.

src/test/ui/borrowck/borrowck-assign-to-constants.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ LL | foo = 6;
66

77
error: aborting due to previous error
88

9+
For more information about this error, try `rustc --explain E0594`.

src/test/ui/borrowck/borrowck-borrow-mut-base-ptr-in-aliasable-loc.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ LL | let x: &mut isize = &mut **t0;
2727

2828
error: aborting due to 3 previous errors
2929

30-
Some errors have detailed explanations: E0502, E0596.
30+
Some errors have detailed explanations: E0502, E0594, E0596.
3131
For more information about an error, try `rustc --explain E0502`.

src/test/ui/borrowck/borrowck-borrow-overloaded-auto-deref.stderr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,5 @@ LL | *x.y_mut() = 3;
112112

113113
error: aborting due to 14 previous errors
114114

115-
For more information about this error, try `rustc --explain E0596`.
115+
Some errors have detailed explanations: E0594, E0596.
116+
For more information about an error, try `rustc --explain E0594`.

src/test/ui/borrowck/borrowck-borrow-overloaded-deref.stderr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,5 @@ LL | **x = 3;
5656

5757
error: aborting due to 7 previous errors
5858

59-
For more information about this error, try `rustc --explain E0596`.
59+
Some errors have detailed explanations: E0594, E0596.
60+
For more information about an error, try `rustc --explain E0594`.

src/test/ui/borrowck/borrowck-closures-unique.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,5 @@ LL | let c1 = |y: &'static mut isize| x = y;
5050

5151
error: aborting due to 4 previous errors
5252

53-
Some errors have detailed explanations: E0500, E0524.
53+
Some errors have detailed explanations: E0500, E0524, E0594.
5454
For more information about an error, try `rustc --explain E0500`.

src/test/ui/borrowck/borrowck-issue-14498.stderr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,5 @@ LL | drop(p);
9696

9797
error: aborting due to 9 previous errors
9898

99-
For more information about this error, try `rustc --explain E0506`.
99+
Some errors have detailed explanations: E0506, E0594.
100+
For more information about an error, try `rustc --explain E0506`.

src/test/ui/borrowck/borrowck-overloaded-index-ref-index.stderr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@ LL | s[2] = 20;
3131

3232
error: aborting due to 3 previous errors
3333

34-
For more information about this error, try `rustc --explain E0502`.
34+
Some errors have detailed explanations: E0502, E0594.
35+
For more information about an error, try `rustc --explain E0502`.

src/test/ui/borrowck/index-mut-help.stderr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ LL | let _ = &mut map["peter"];
2424

2525
error: aborting due to 3 previous errors
2626

27-
For more information about this error, try `rustc --explain E0596`.
27+
Some errors have detailed explanations: E0594, E0596.
28+
For more information about an error, try `rustc --explain E0594`.

src/test/ui/borrowck/issue-45983.nll.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ LL | give_any(|y| x = Some(y));
1818

1919
error: aborting due to 2 previous errors
2020

21+
For more information about this error, try `rustc --explain E0594`.

src/test/ui/borrowck/issue-54499-field-mutation-of-moved-out.stderr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,5 @@ LL | v.y = 2;
8484

8585
error: aborting due to 9 previous errors
8686

87-
For more information about this error, try `rustc --explain E0382`.
87+
Some errors have detailed explanations: E0382, E0594.
88+
For more information about an error, try `rustc --explain E0382`.

src/test/ui/borrowck/issue-55492-borrowck-migrate-scans-parents.migrate.stderr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,5 @@ LL | || { &mut x.0; };
5050

5151
error: aborting due to 6 previous errors
5252

53-
For more information about this error, try `rustc --explain E0596`.
53+
Some errors have detailed explanations: E0594, E0596.
54+
For more information about an error, try `rustc --explain E0594`.

src/test/ui/borrowck/issue-55492-borrowck-migrate-scans-parents.nll.stderr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,5 @@ LL | || { &mut x.0; };
5050

5151
error: aborting due to 6 previous errors
5252

53-
For more information about this error, try `rustc --explain E0596`.
53+
Some errors have detailed explanations: E0594, E0596.
54+
For more information about an error, try `rustc --explain E0594`.

src/test/ui/borrowck/mutability-errors.stderr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,4 +375,5 @@ LL | &mut X.0;
375375

376376
error: aborting due to 38 previous errors
377377

378-
For more information about this error, try `rustc --explain E0596`.
378+
Some errors have detailed explanations: E0594, E0596.
379+
For more information about an error, try `rustc --explain E0594`.

src/test/ui/borrowck/reassignment_immutable_fields_overlapping.stderr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ LL | x.b = 22;
1515

1616
error: aborting due to 2 previous errors
1717

18-
For more information about this error, try `rustc --explain E0381`.
18+
Some errors have detailed explanations: E0381, E0594.
19+
For more information about an error, try `rustc --explain E0381`.

src/test/ui/borrowck/reassignment_immutable_fields_twice.stderr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ LL | x.0 = 1;
1515

1616
error: aborting due to 2 previous errors
1717

18-
For more information about this error, try `rustc --explain E0381`.
18+
Some errors have detailed explanations: E0381, E0594.
19+
For more information about an error, try `rustc --explain E0381`.

src/test/ui/cannot-mutate-captured-non-mut-var.stderr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ LL | to_fn_once(move|| { s.read_to_end(&mut Vec::new()); });
1616

1717
error: aborting due to 2 previous errors
1818

19-
For more information about this error, try `rustc --explain E0596`.
19+
Some errors have detailed explanations: E0594, E0596.
20+
For more information about an error, try `rustc --explain E0594`.

src/test/ui/closures/closure-immutable-outer-variable.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ LL | foo(Box::new(move || y = false) as Box<_>);
88

99
error: aborting due to previous error
1010

11+
For more information about this error, try `rustc --explain E0594`.

src/test/ui/consts/miri_unleashed/mutable_references.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,4 @@ LL | *OH_YES = 99;
3636

3737
error: aborting due to previous error
3838

39+
For more information about this error, try `rustc --explain E0594`.

src/test/ui/did_you_mean/issue-35937.stderr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ LL | s.x += 1;
2424

2525
error: aborting due to 3 previous errors
2626

27-
For more information about this error, try `rustc --explain E0596`.
27+
Some errors have detailed explanations: E0594, E0596.
28+
For more information about an error, try `rustc --explain E0594`.

src/test/ui/did_you_mean/issue-39544.stderr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,5 @@ LL | *x.0 = 1;
9898

9999
error: aborting due to 12 previous errors
100100

101-
For more information about this error, try `rustc --explain E0596`.
101+
Some errors have detailed explanations: E0594, E0596.
102+
For more information about an error, try `rustc --explain E0594`.

src/test/ui/error-codes/E0389.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ LL | fancy_ref.num = 6;
88

99
error: aborting due to previous error
1010

11+
For more information about this error, try `rustc --explain E0594`.

src/test/ui/error-codes/E0594.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ LL | NUM = 20;
66

77
error: aborting due to previous error
88

9+
For more information about this error, try `rustc --explain E0594`.

src/test/ui/fn/fn-closure-mutable-capture.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ LL | bar(move || x = 1);
1212

1313
error: aborting due to previous error
1414

15+
For more information about this error, try `rustc --explain E0594`.

src/test/ui/immut-function-arguments.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ LL | let _frob = |q: Box<isize>| { *q = 2; };
1616

1717
error: aborting due to 2 previous errors
1818

19+
For more information about this error, try `rustc --explain E0594`.

src/test/ui/issues/issue-46023.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ LL | x = 1;
99

1010
error: aborting due to previous error
1111

12+
For more information about this error, try `rustc --explain E0594`.

src/test/ui/issues/issue-46604.stderr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ LL | buf[0]=2;
1212

1313
error: aborting due to 2 previous errors
1414

15-
For more information about this error, try `rustc --explain E0017`.
15+
Some errors have detailed explanations: E0017, E0594.
16+
For more information about an error, try `rustc --explain E0017`.

src/test/ui/issues/issue-51244.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ LL | *my_ref = 0;
88

99
error: aborting due to previous error
1010

11+
For more information about this error, try `rustc --explain E0594`.

src/test/ui/issues/issue-51515.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ LL | *bar = 64;
1818

1919
error: aborting due to 2 previous errors
2020

21+
For more information about this error, try `rustc --explain E0594`.

src/test/ui/mut/mutable-class-fields-2.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ LL | self.how_hungry -= 5;
88

99
error: aborting due to previous error
1010

11+
For more information about this error, try `rustc --explain E0594`.

src/test/ui/mut/mutable-class-fields.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ LL | nyan.how_hungry = 0;
88

99
error: aborting due to previous error
1010

11+
For more information about this error, try `rustc --explain E0594`.

src/test/ui/nll/closure-captures.stderr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,4 +156,5 @@ LL | | *x = 1;});
156156

157157
error: aborting due to 12 previous errors
158158

159-
For more information about this error, try `rustc --explain E0596`.
159+
Some errors have detailed explanations: E0594, E0596.
160+
For more information about an error, try `rustc --explain E0594`.

src/test/ui/nll/constant-thread-locals-issue-47053.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ LL | FOO = 6;
66

77
error: aborting due to previous error
88

9+
For more information about this error, try `rustc --explain E0594`.

src/test/ui/nll/generator-upvar-mutability.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ LL | x = 1;
99

1010
error: aborting due to previous error
1111

12+
For more information about this error, try `rustc --explain E0594`.

src/test/ui/nll/issue-47388.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ LL | fancy_ref.num = 6;
88

99
error: aborting due to previous error
1010

11+
For more information about this error, try `rustc --explain E0594`.

src/test/ui/nll/issue-51244.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ LL | *my_ref = 0;
88

99
error: aborting due to previous error
1010

11+
For more information about this error, try `rustc --explain E0594`.

src/test/ui/nll/issue-57989.stderr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ LL | g;
2020

2121
error: aborting due to 2 previous errors
2222

23-
For more information about this error, try `rustc --explain E0506`.
23+
Some errors have detailed explanations: E0506, E0594.
24+
For more information about an error, try `rustc --explain E0506`.

src/test/ui/rfc-2005-default-binding-mode/enum.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ LL | *x += 1;
1818

1919
error: aborting due to 3 previous errors
2020

21+
For more information about this error, try `rustc --explain E0594`.

src/test/ui/rfc-2005-default-binding-mode/explicit-mut.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ LL | *n += 1;
1818

1919
error: aborting due to 3 previous errors
2020

21+
For more information about this error, try `rustc --explain E0594`.

src/test/ui/suggestions/suggest-ref-mut.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ LL | ref quo => { *quo = 32; },
3535

3636
error: aborting due to 4 previous errors
3737

38+
For more information about this error, try `rustc --explain E0594`.

src/test/ui/thread-local-mutation.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ LL | S = "after";
66

77
error: aborting due to previous error
88

9+
For more information about this error, try `rustc --explain E0594`.

src/test/ui/unboxed-closures/unboxed-closure-immutable-capture.stderr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,5 @@ LL | || set(&mut x);
7171

7272
error: aborting due to 8 previous errors
7373

74-
For more information about this error, try `rustc --explain E0596`.
74+
Some errors have detailed explanations: E0594, E0596.
75+
For more information about an error, try `rustc --explain E0594`.

src/test/ui/unboxed-closures/unboxed-closures-mutate-upvar.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,4 @@ LL | | });
4242

4343
error: aborting due to 4 previous errors
4444

45+
For more information about this error, try `rustc --explain E0594`.

src/test/ui/unboxed-closures/unboxed-closures-mutated-upvar-from-fn-closure.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ LL | | });
1616

1717
error: aborting due to previous error
1818

19+
For more information about this error, try `rustc --explain E0594`.

0 commit comments

Comments
 (0)