about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Wood <david@davidtw.co>2018-09-07 00:37:44 +0200
committerDavid Wood <david@davidtw.co>2018-09-07 00:37:44 +0200
commit0a8cf67e61c884f63f471d3ab7094e383a0d97b3 (patch)
treee154542e981a84442ef02d5437c9957e51f08189
parent8c92cbe90e5453c684b6cbc71377af84758ea01e (diff)
downloadrust-0a8cf67e61c884f63f471d3ab7094e383a0d97b3.tar.gz
rust-0a8cf67e61c884f63f471d3ab7094e383a0d97b3.zip
Added note referencing issue which added error.
-rw-r--r--src/librustc_passes/ast_validation.rs3
-rw-r--r--src/test/ui/rfc-2497-if-let-chains/syntax-ambiguity-2015.stderr6
-rw-r--r--src/test/ui/rfc-2497-if-let-chains/syntax-ambiguity-2018.stderr6
3 files changed, 15 insertions, 0 deletions
diff --git a/src/librustc_passes/ast_validation.rs b/src/librustc_passes/ast_validation.rs
index 3981d9f0c64..52d61792ed2 100644
--- a/src/librustc_passes/ast_validation.rs
+++ b/src/librustc_passes/ast_validation.rs
@@ -180,6 +180,9 @@ impl<'a> AstValidator<'a> {
             err.note(
                 "this will be a error until the `let_chains` feature is stabilized"
             );
+            err.note(
+                "see rust-lang/rust#53668 for more information"
+            );
 
             if let Ok(snippet) = self.session.source_map().span_to_snippet(span) {
                 err.span_suggestion(
diff --git a/src/test/ui/rfc-2497-if-let-chains/syntax-ambiguity-2015.stderr b/src/test/ui/rfc-2497-if-let-chains/syntax-ambiguity-2015.stderr
index 0e6ccb5d9d8..8597294913f 100644
--- a/src/test/ui/rfc-2497-if-let-chains/syntax-ambiguity-2015.stderr
+++ b/src/test/ui/rfc-2497-if-let-chains/syntax-ambiguity-2015.stderr
@@ -5,6 +5,7 @@ LL |     if let Range { start: _, end: _ } = true..true && false { }
    |                                               ^^^^^^^^^^^^^ help: consider adding parentheses: `(true && false)`
    |
    = note: this will be a error until the `let_chains` feature is stabilized
+   = note: see rust-lang/rust#53668 for more information
 
 error: ambigious use of `||`
   --> $DIR/syntax-ambiguity-2015.rs:24:47
@@ -13,6 +14,7 @@ LL |     if let Range { start: _, end: _ } = true..true || false { }
    |                                               ^^^^^^^^^^^^^ help: consider adding parentheses: `(true || false)`
    |
    = note: this will be a error until the `let_chains` feature is stabilized
+   = note: see rust-lang/rust#53668 for more information
 
 error: ambigious use of `&&`
   --> $DIR/syntax-ambiguity-2015.rs:27:50
@@ -21,6 +23,7 @@ LL |     while let Range { start: _, end: _ } = true..true && false { }
    |                                                  ^^^^^^^^^^^^^ help: consider adding parentheses: `(true && false)`
    |
    = note: this will be a error until the `let_chains` feature is stabilized
+   = note: see rust-lang/rust#53668 for more information
 
 error: ambigious use of `||`
   --> $DIR/syntax-ambiguity-2015.rs:30:50
@@ -29,6 +32,7 @@ LL |     while let Range { start: _, end: _ } = true..true || false { }
    |                                                  ^^^^^^^^^^^^^ help: consider adding parentheses: `(true || false)`
    |
    = note: this will be a error until the `let_chains` feature is stabilized
+   = note: see rust-lang/rust#53668 for more information
 
 error: ambigious use of `&&`
   --> $DIR/syntax-ambiguity-2015.rs:33:19
@@ -37,6 +41,7 @@ LL |     if let true = false && false { }
    |                   ^^^^^^^^^^^^^^ help: consider adding parentheses: `(false && false)`
    |
    = note: this will be a error until the `let_chains` feature is stabilized
+   = note: see rust-lang/rust#53668 for more information
 
 error: ambigious use of `&&`
   --> $DIR/syntax-ambiguity-2015.rs:36:22
@@ -45,6 +50,7 @@ LL |     while let true = (1 == 2) && false { }
    |                      ^^^^^^^^^^^^^^^^^ help: consider adding parentheses: `((1 == 2) && false)`
    |
    = note: this will be a error until the `let_chains` feature is stabilized
+   = note: see rust-lang/rust#53668 for more information
 
 error: aborting due to 6 previous errors
 
diff --git a/src/test/ui/rfc-2497-if-let-chains/syntax-ambiguity-2018.stderr b/src/test/ui/rfc-2497-if-let-chains/syntax-ambiguity-2018.stderr
index 2bbeda360d7..86ee04747b2 100644
--- a/src/test/ui/rfc-2497-if-let-chains/syntax-ambiguity-2018.stderr
+++ b/src/test/ui/rfc-2497-if-let-chains/syntax-ambiguity-2018.stderr
@@ -5,6 +5,7 @@ LL |     if let Range { start: _, end: _ } = true..true && false { }
    |                                               ^^^^^^^^^^^^^ help: consider adding parentheses: `(true && false)`
    |
    = note: this will be a error until the `let_chains` feature is stabilized
+   = note: see rust-lang/rust#53668 for more information
 
 error: ambigious use of `||`
   --> $DIR/syntax-ambiguity-2018.rs:24:47
@@ -13,6 +14,7 @@ LL |     if let Range { start: _, end: _ } = true..true || false { }
    |                                               ^^^^^^^^^^^^^ help: consider adding parentheses: `(true || false)`
    |
    = note: this will be a error until the `let_chains` feature is stabilized
+   = note: see rust-lang/rust#53668 for more information
 
 error: ambigious use of `&&`
   --> $DIR/syntax-ambiguity-2018.rs:27:50
@@ -21,6 +23,7 @@ LL |     while let Range { start: _, end: _ } = true..true && false { }
    |                                                  ^^^^^^^^^^^^^ help: consider adding parentheses: `(true && false)`
    |
    = note: this will be a error until the `let_chains` feature is stabilized
+   = note: see rust-lang/rust#53668 for more information
 
 error: ambigious use of `||`
   --> $DIR/syntax-ambiguity-2018.rs:30:50
@@ -29,6 +32,7 @@ LL |     while let Range { start: _, end: _ } = true..true || false { }
    |                                                  ^^^^^^^^^^^^^ help: consider adding parentheses: `(true || false)`
    |
    = note: this will be a error until the `let_chains` feature is stabilized
+   = note: see rust-lang/rust#53668 for more information
 
 error: ambigious use of `&&`
   --> $DIR/syntax-ambiguity-2018.rs:33:19
@@ -37,6 +41,7 @@ LL |     if let true = false && false { }
    |                   ^^^^^^^^^^^^^^ help: consider adding parentheses: `(false && false)`
    |
    = note: this will be a error until the `let_chains` feature is stabilized
+   = note: see rust-lang/rust#53668 for more information
 
 error: ambigious use of `&&`
   --> $DIR/syntax-ambiguity-2018.rs:36:22
@@ -45,6 +50,7 @@ LL |     while let true = (1 == 2) && false { }
    |                      ^^^^^^^^^^^^^^^^^ help: consider adding parentheses: `((1 == 2) && false)`
    |
    = note: this will be a error until the `let_chains` feature is stabilized
+   = note: see rust-lang/rust#53668 for more information
 
 error: aborting due to 6 previous errors