Skip to content

Commit 0a8cf67

Browse files
committed
Added note referencing issue which added error.
1 parent 8c92cbe commit 0a8cf67

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

src/librustc_passes/ast_validation.rs

+3
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,9 @@ impl<'a> AstValidator<'a> {
180180
err.note(
181181
"this will be a error until the `let_chains` feature is stabilized"
182182
);
183+
err.note(
184+
"see rust-lang/rust#53668 for more information"
185+
);
183186

184187
if let Ok(snippet) = self.session.source_map().span_to_snippet(span) {
185188
err.span_suggestion(

src/test/ui/rfc-2497-if-let-chains/syntax-ambiguity-2015.stderr

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ LL | if let Range { start: _, end: _ } = true..true && false { }
55
| ^^^^^^^^^^^^^ help: consider adding parentheses: `(true && false)`
66
|
77
= note: this will be a error until the `let_chains` feature is stabilized
8+
= note: see rust-lang/rust#53668 for more information
89

910
error: ambigious use of `||`
1011
--> $DIR/syntax-ambiguity-2015.rs:24:47
@@ -13,6 +14,7 @@ LL | if let Range { start: _, end: _ } = true..true || false { }
1314
| ^^^^^^^^^^^^^ help: consider adding parentheses: `(true || false)`
1415
|
1516
= note: this will be a error until the `let_chains` feature is stabilized
17+
= note: see rust-lang/rust#53668 for more information
1618

1719
error: ambigious use of `&&`
1820
--> $DIR/syntax-ambiguity-2015.rs:27:50
@@ -21,6 +23,7 @@ LL | while let Range { start: _, end: _ } = true..true && false { }
2123
| ^^^^^^^^^^^^^ help: consider adding parentheses: `(true && false)`
2224
|
2325
= note: this will be a error until the `let_chains` feature is stabilized
26+
= note: see rust-lang/rust#53668 for more information
2427

2528
error: ambigious use of `||`
2629
--> $DIR/syntax-ambiguity-2015.rs:30:50
@@ -29,6 +32,7 @@ LL | while let Range { start: _, end: _ } = true..true || false { }
2932
| ^^^^^^^^^^^^^ help: consider adding parentheses: `(true || false)`
3033
|
3134
= note: this will be a error until the `let_chains` feature is stabilized
35+
= note: see rust-lang/rust#53668 for more information
3236

3337
error: ambigious use of `&&`
3438
--> $DIR/syntax-ambiguity-2015.rs:33:19
@@ -37,6 +41,7 @@ LL | if let true = false && false { }
3741
| ^^^^^^^^^^^^^^ help: consider adding parentheses: `(false && false)`
3842
|
3943
= note: this will be a error until the `let_chains` feature is stabilized
44+
= note: see rust-lang/rust#53668 for more information
4045

4146
error: ambigious use of `&&`
4247
--> $DIR/syntax-ambiguity-2015.rs:36:22
@@ -45,6 +50,7 @@ LL | while let true = (1 == 2) && false { }
4550
| ^^^^^^^^^^^^^^^^^ help: consider adding parentheses: `((1 == 2) && false)`
4651
|
4752
= note: this will be a error until the `let_chains` feature is stabilized
53+
= note: see rust-lang/rust#53668 for more information
4854

4955
error: aborting due to 6 previous errors
5056

src/test/ui/rfc-2497-if-let-chains/syntax-ambiguity-2018.stderr

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ LL | if let Range { start: _, end: _ } = true..true && false { }
55
| ^^^^^^^^^^^^^ help: consider adding parentheses: `(true && false)`
66
|
77
= note: this will be a error until the `let_chains` feature is stabilized
8+
= note: see rust-lang/rust#53668 for more information
89

910
error: ambigious use of `||`
1011
--> $DIR/syntax-ambiguity-2018.rs:24:47
@@ -13,6 +14,7 @@ LL | if let Range { start: _, end: _ } = true..true || false { }
1314
| ^^^^^^^^^^^^^ help: consider adding parentheses: `(true || false)`
1415
|
1516
= note: this will be a error until the `let_chains` feature is stabilized
17+
= note: see rust-lang/rust#53668 for more information
1618

1719
error: ambigious use of `&&`
1820
--> $DIR/syntax-ambiguity-2018.rs:27:50
@@ -21,6 +23,7 @@ LL | while let Range { start: _, end: _ } = true..true && false { }
2123
| ^^^^^^^^^^^^^ help: consider adding parentheses: `(true && false)`
2224
|
2325
= note: this will be a error until the `let_chains` feature is stabilized
26+
= note: see rust-lang/rust#53668 for more information
2427

2528
error: ambigious use of `||`
2629
--> $DIR/syntax-ambiguity-2018.rs:30:50
@@ -29,6 +32,7 @@ LL | while let Range { start: _, end: _ } = true..true || false { }
2932
| ^^^^^^^^^^^^^ help: consider adding parentheses: `(true || false)`
3033
|
3134
= note: this will be a error until the `let_chains` feature is stabilized
35+
= note: see rust-lang/rust#53668 for more information
3236

3337
error: ambigious use of `&&`
3438
--> $DIR/syntax-ambiguity-2018.rs:33:19
@@ -37,6 +41,7 @@ LL | if let true = false && false { }
3741
| ^^^^^^^^^^^^^^ help: consider adding parentheses: `(false && false)`
3842
|
3943
= note: this will be a error until the `let_chains` feature is stabilized
44+
= note: see rust-lang/rust#53668 for more information
4045

4146
error: ambigious use of `&&`
4247
--> $DIR/syntax-ambiguity-2018.rs:36:22
@@ -45,6 +50,7 @@ LL | while let true = (1 == 2) && false { }
4550
| ^^^^^^^^^^^^^^^^^ help: consider adding parentheses: `((1 == 2) && false)`
4651
|
4752
= note: this will be a error until the `let_chains` feature is stabilized
53+
= note: see rust-lang/rust#53668 for more information
4854

4955
error: aborting due to 6 previous errors
5056

0 commit comments

Comments
 (0)