about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-06-17 05:41:45 +0200
committerMazdak Farrokhzad <twingoow@gmail.com>2019-06-23 01:29:29 +0200
commit10234d286ac0b74a3bfe1581df91137a21f66033 (patch)
tree31f8e0ec331e77dcb550293b1008e9ca5cf5355e /src
parenteb4f54a58d0247dbd830165fd2ff214e07890964 (diff)
downloadrust-10234d286ac0b74a3bfe1581df91137a21f66033.tar.gz
rust-10234d286ac0b74a3bfe1581df91137a21f66033.zip
let_chains: Adjust tests for pre-expansion gating.
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/rfc-2497-if-let-chains/disallowed-positions.rs5
-rw-r--r--src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr120
-rw-r--r--src/test/ui/rfc-2497-if-let-chains/feature-gate.rs7
-rw-r--r--src/test/ui/rfc-2497-if-let-chains/feature-gate.stderr33
4 files changed, 103 insertions, 62 deletions
diff --git a/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.rs b/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.rs
index 2977b71e596..43e0ee8a86c 100644
--- a/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.rs
+++ b/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.rs
@@ -17,7 +17,10 @@
 //
 // To that end, we check some positions which is not part of the language above.
 
-#![feature(const_generics)] //~ WARN the feature `const_generics` is incomplete
+#![feature(const_generics)]
+//~^ WARN the feature `const_generics` is incomplete
+#![feature(let_chains)] // Avoid inflating `.stderr` with overzealous gates in this test.
+//~^ WARN the feature `let_chains` is incomplete
 
 #![allow(irrefutable_let_patterns)]
 
diff --git a/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr b/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr
index bfd55af69c9..86baa038c0b 100644
--- a/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr
+++ b/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr
@@ -1,5 +1,5 @@
 error: expected one of `,` or `>`, found `&&`
-  --> $DIR/disallowed-positions.rs:187:14
+  --> $DIR/disallowed-positions.rs:190:14
    |
 LL |         true && let 1 = 1
    |              ^^ expected one of `,` or `>` here
@@ -10,8 +10,14 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
 
+warning: the feature `let_chains` is incomplete and may cause the compiler to crash
+  --> $DIR/disallowed-positions.rs:22:12
+   |
+LL | #![feature(let_chains)] // Avoid inflating `.stderr` with overzealous gates in this test.
+   |            ^^^^^^^^^^
+
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:29:9
+  --> $DIR/disallowed-positions.rs:32:9
    |
 LL |     if &let 0 = 0 {}
    |         ^^^^^^^^^
@@ -20,7 +26,7 @@ LL |     if &let 0 = 0 {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:32:9
+  --> $DIR/disallowed-positions.rs:35:9
    |
 LL |     if !let 0 = 0 {}
    |         ^^^^^^^^^
@@ -29,7 +35,7 @@ LL |     if !let 0 = 0 {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:33:9
+  --> $DIR/disallowed-positions.rs:36:9
    |
 LL |     if *let 0 = 0 {}
    |         ^^^^^^^^^
@@ -38,7 +44,7 @@ LL |     if *let 0 = 0 {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:34:9
+  --> $DIR/disallowed-positions.rs:37:9
    |
 LL |     if -let 0 = 0 {}
    |         ^^^^^^^^^
@@ -47,7 +53,7 @@ LL |     if -let 0 = 0 {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:40:9
+  --> $DIR/disallowed-positions.rs:43:9
    |
 LL |     if (let 0 = 0)? {}
    |         ^^^^^^^^^
@@ -56,7 +62,7 @@ LL |     if (let 0 = 0)? {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:42:16
+  --> $DIR/disallowed-positions.rs:45:16
    |
 LL |     if true || let 0 = 0 {}
    |                ^^^^^^^^^
@@ -65,7 +71,7 @@ LL |     if true || let 0 = 0 {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:43:17
+  --> $DIR/disallowed-positions.rs:46:17
    |
 LL |     if (true || let 0 = 0) {}
    |                 ^^^^^^^^^
@@ -74,7 +80,7 @@ LL |     if (true || let 0 = 0) {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:44:25
+  --> $DIR/disallowed-positions.rs:47:25
    |
 LL |     if true && (true || let 0 = 0) {}
    |                         ^^^^^^^^^
@@ -83,7 +89,7 @@ LL |     if true && (true || let 0 = 0) {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:45:25
+  --> $DIR/disallowed-positions.rs:48:25
    |
 LL |     if true || (true && let 0 = 0) {}
    |                         ^^^^^^^^^
@@ -92,7 +98,7 @@ LL |     if true || (true && let 0 = 0) {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:48:12
+  --> $DIR/disallowed-positions.rs:51:12
    |
 LL |     if x = let 0 = 0 {}
    |            ^^^^^^^^^
@@ -101,7 +107,7 @@ LL |     if x = let 0 = 0 {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:50:15
+  --> $DIR/disallowed-positions.rs:53:15
    |
 LL |     if true..(let 0 = 0) {}
    |               ^^^^^^^^^
@@ -110,7 +116,7 @@ LL |     if true..(let 0 = 0) {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:51:11
+  --> $DIR/disallowed-positions.rs:54:11
    |
 LL |     if ..(let 0 = 0) {}
    |           ^^^^^^^^^
@@ -119,7 +125,7 @@ LL |     if ..(let 0 = 0) {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:52:9
+  --> $DIR/disallowed-positions.rs:55:9
    |
 LL |     if (let 0 = 0).. {}
    |         ^^^^^^^^^
@@ -128,7 +134,7 @@ LL |     if (let 0 = 0).. {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:55:8
+  --> $DIR/disallowed-positions.rs:58:8
    |
 LL |     if let Range { start: _, end: _ } = true..true && false {}
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -137,7 +143,7 @@ LL |     if let Range { start: _, end: _ } = true..true && false {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:57:8
+  --> $DIR/disallowed-positions.rs:60:8
    |
 LL |     if let Range { start: _, end: _ } = true..true || false {}
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -146,7 +152,7 @@ LL |     if let Range { start: _, end: _ } = true..true || false {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:62:8
+  --> $DIR/disallowed-positions.rs:65:8
    |
 LL |     if let Range { start: F, end } = F..|| true {}
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -155,7 +161,7 @@ LL |     if let Range { start: F, end } = F..|| true {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:67:8
+  --> $DIR/disallowed-positions.rs:70:8
    |
 LL |     if let Range { start: true, end } = t..&&false {}
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -164,7 +170,7 @@ LL |     if let Range { start: true, end } = t..&&false {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:70:19
+  --> $DIR/disallowed-positions.rs:73:19
    |
 LL |     if let true = let true = true {}
    |                   ^^^^^^^^^^^^^^^
@@ -173,7 +179,7 @@ LL |     if let true = let true = true {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:74:12
+  --> $DIR/disallowed-positions.rs:77:12
    |
 LL |     while &let 0 = 0 {}
    |            ^^^^^^^^^
@@ -182,7 +188,7 @@ LL |     while &let 0 = 0 {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:76:12
+  --> $DIR/disallowed-positions.rs:79:12
    |
 LL |     while !let 0 = 0 {}
    |            ^^^^^^^^^
@@ -191,7 +197,7 @@ LL |     while !let 0 = 0 {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:77:12
+  --> $DIR/disallowed-positions.rs:80:12
    |
 LL |     while *let 0 = 0 {}
    |            ^^^^^^^^^
@@ -200,7 +206,7 @@ LL |     while *let 0 = 0 {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:78:12
+  --> $DIR/disallowed-positions.rs:81:12
    |
 LL |     while -let 0 = 0 {}
    |            ^^^^^^^^^
@@ -209,7 +215,7 @@ LL |     while -let 0 = 0 {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:84:12
+  --> $DIR/disallowed-positions.rs:87:12
    |
 LL |     while (let 0 = 0)? {}
    |            ^^^^^^^^^
@@ -218,7 +224,7 @@ LL |     while (let 0 = 0)? {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:86:19
+  --> $DIR/disallowed-positions.rs:89:19
    |
 LL |     while true || let 0 = 0 {}
    |                   ^^^^^^^^^
@@ -227,7 +233,7 @@ LL |     while true || let 0 = 0 {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:87:20
+  --> $DIR/disallowed-positions.rs:90:20
    |
 LL |     while (true || let 0 = 0) {}
    |                    ^^^^^^^^^
@@ -236,7 +242,7 @@ LL |     while (true || let 0 = 0) {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:88:28
+  --> $DIR/disallowed-positions.rs:91:28
    |
 LL |     while true && (true || let 0 = 0) {}
    |                            ^^^^^^^^^
@@ -245,7 +251,7 @@ LL |     while true && (true || let 0 = 0) {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:89:28
+  --> $DIR/disallowed-positions.rs:92:28
    |
 LL |     while true || (true && let 0 = 0) {}
    |                            ^^^^^^^^^
@@ -254,7 +260,7 @@ LL |     while true || (true && let 0 = 0) {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:92:15
+  --> $DIR/disallowed-positions.rs:95:15
    |
 LL |     while x = let 0 = 0 {}
    |               ^^^^^^^^^
@@ -263,7 +269,7 @@ LL |     while x = let 0 = 0 {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:94:18
+  --> $DIR/disallowed-positions.rs:97:18
    |
 LL |     while true..(let 0 = 0) {}
    |                  ^^^^^^^^^
@@ -272,7 +278,7 @@ LL |     while true..(let 0 = 0) {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:95:14
+  --> $DIR/disallowed-positions.rs:98:14
    |
 LL |     while ..(let 0 = 0) {}
    |              ^^^^^^^^^
@@ -281,7 +287,7 @@ LL |     while ..(let 0 = 0) {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:96:12
+  --> $DIR/disallowed-positions.rs:99:12
    |
 LL |     while (let 0 = 0).. {}
    |            ^^^^^^^^^
@@ -290,7 +296,7 @@ LL |     while (let 0 = 0).. {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:99:11
+  --> $DIR/disallowed-positions.rs:102:11
    |
 LL |     while let Range { start: _, end: _ } = true..true && false {}
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -299,7 +305,7 @@ LL |     while let Range { start: _, end: _ } = true..true && false {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:101:11
+  --> $DIR/disallowed-positions.rs:104:11
    |
 LL |     while let Range { start: _, end: _ } = true..true || false {}
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -308,7 +314,7 @@ LL |     while let Range { start: _, end: _ } = true..true || false {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:106:11
+  --> $DIR/disallowed-positions.rs:109:11
    |
 LL |     while let Range { start: F, end } = F..|| true {}
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -317,7 +323,7 @@ LL |     while let Range { start: F, end } = F..|| true {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:111:11
+  --> $DIR/disallowed-positions.rs:114:11
    |
 LL |     while let Range { start: true, end } = t..&&false {}
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -326,7 +332,7 @@ LL |     while let Range { start: true, end } = t..&&false {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:114:22
+  --> $DIR/disallowed-positions.rs:117:22
    |
 LL |     while let true = let true = true {}
    |                      ^^^^^^^^^^^^^^^
@@ -335,7 +341,7 @@ LL |     while let true = let true = true {}
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:128:6
+  --> $DIR/disallowed-positions.rs:131:6
    |
 LL |     &let 0 = 0;
    |      ^^^^^^^^^
@@ -344,7 +350,7 @@ LL |     &let 0 = 0;
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:130:6
+  --> $DIR/disallowed-positions.rs:133:6
    |
 LL |     !let 0 = 0;
    |      ^^^^^^^^^
@@ -353,7 +359,7 @@ LL |     !let 0 = 0;
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:131:6
+  --> $DIR/disallowed-positions.rs:134:6
    |
 LL |     *let 0 = 0;
    |      ^^^^^^^^^
@@ -362,7 +368,7 @@ LL |     *let 0 = 0;
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:132:6
+  --> $DIR/disallowed-positions.rs:135:6
    |
 LL |     -let 0 = 0;
    |      ^^^^^^^^^
@@ -371,7 +377,7 @@ LL |     -let 0 = 0;
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:138:6
+  --> $DIR/disallowed-positions.rs:141:6
    |
 LL |     (let 0 = 0)?;
    |      ^^^^^^^^^
@@ -380,7 +386,7 @@ LL |     (let 0 = 0)?;
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:140:13
+  --> $DIR/disallowed-positions.rs:143:13
    |
 LL |     true || let 0 = 0;
    |             ^^^^^^^^^
@@ -389,7 +395,7 @@ LL |     true || let 0 = 0;
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:141:14
+  --> $DIR/disallowed-positions.rs:144:14
    |
 LL |     (true || let 0 = 0);
    |              ^^^^^^^^^
@@ -398,7 +404,7 @@ LL |     (true || let 0 = 0);
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:142:22
+  --> $DIR/disallowed-positions.rs:145:22
    |
 LL |     true && (true || let 0 = 0);
    |                      ^^^^^^^^^
@@ -407,7 +413,7 @@ LL |     true && (true || let 0 = 0);
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:145:9
+  --> $DIR/disallowed-positions.rs:148:9
    |
 LL |     x = let 0 = 0;
    |         ^^^^^^^^^
@@ -416,7 +422,7 @@ LL |     x = let 0 = 0;
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:147:12
+  --> $DIR/disallowed-positions.rs:150:12
    |
 LL |     true..(let 0 = 0);
    |            ^^^^^^^^^
@@ -425,7 +431,7 @@ LL |     true..(let 0 = 0);
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:148:8
+  --> $DIR/disallowed-positions.rs:151:8
    |
 LL |     ..(let 0 = 0);
    |        ^^^^^^^^^
@@ -434,7 +440,7 @@ LL |     ..(let 0 = 0);
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:149:6
+  --> $DIR/disallowed-positions.rs:152:6
    |
 LL |     (let 0 = 0)..;
    |      ^^^^^^^^^
@@ -443,7 +449,7 @@ LL |     (let 0 = 0)..;
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:151:6
+  --> $DIR/disallowed-positions.rs:154:6
    |
 LL |     (let Range { start: _, end: _ } = true..true || false);
    |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -452,7 +458,7 @@ LL |     (let Range { start: _, end: _ } = true..true || false);
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:154:6
+  --> $DIR/disallowed-positions.rs:157:6
    |
 LL |     (let true = let true = true);
    |      ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -461,7 +467,7 @@ LL |     (let true = let true = true);
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:154:17
+  --> $DIR/disallowed-positions.rs:157:17
    |
 LL |     (let true = let true = true);
    |                 ^^^^^^^^^^^^^^^
@@ -470,7 +476,7 @@ LL |     (let true = let true = true);
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:159:6
+  --> $DIR/disallowed-positions.rs:162:6
    |
 LL |     &let 0 = 0
    |      ^^^^^^^^^
@@ -479,7 +485,7 @@ LL |     &let 0 = 0
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:169:17
+  --> $DIR/disallowed-positions.rs:172:17
    |
 LL |         true && let 1 = 1
    |                 ^^^^^^^^^
@@ -488,7 +494,7 @@ LL |         true && let 1 = 1
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:173:17
+  --> $DIR/disallowed-positions.rs:176:17
    |
 LL |         true && let 1 = 1
    |                 ^^^^^^^^^
@@ -497,7 +503,7 @@ LL |         true && let 1 = 1
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions are not supported here
-  --> $DIR/disallowed-positions.rs:177:17
+  --> $DIR/disallowed-positions.rs:180:17
    |
 LL |         true && let 1 = 1
    |                 ^^^^^^^^^
@@ -506,7 +512,7 @@ LL |         true && let 1 = 1
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
 error: `let` expressions only supported in `if`
-  --> $DIR/disallowed-positions.rs:29:9
+  --> $DIR/disallowed-positions.rs:32:9
    |
 LL |     if &let 0 = 0 {}
    |         ^^^^^^^^^
diff --git a/src/test/ui/rfc-2497-if-let-chains/feature-gate.rs b/src/test/ui/rfc-2497-if-let-chains/feature-gate.rs
index b6f70b912ac..c125ec89cb5 100644
--- a/src/test/ui/rfc-2497-if-let-chains/feature-gate.rs
+++ b/src/test/ui/rfc-2497-if-let-chains/feature-gate.rs
@@ -83,7 +83,9 @@ fn _while() {
 
 fn _macros() {
     macro_rules! noop_expr { ($e:expr) => {}; }
+
     noop_expr!((let 0 = 1));
+    //~^ ERROR `let` expressions in this position are experimental [E0658]
 
     macro_rules! use_expr {
         ($e:expr) => {
@@ -95,7 +97,10 @@ fn _macros() {
     //~^ ERROR `let` expressions in this position are experimental [E0658]
     use_expr!((let 0 = 1));
     //~^ ERROR `let` expressions in this position are experimental [E0658]
-    // use_expr!(let 0 = 1);
+    #[cfg(FALSE)] (let 0 = 1);
+    //~^ ERROR `let` expressions in this position are experimental [E0658]
+    use_expr!(let 0 = 1);
+    //~^ ERROR no rules expected the token `let`
     // ^--- FIXME(53667): Consider whether `Let` can be added to `ident_can_begin_expr`.
 }
 
diff --git a/src/test/ui/rfc-2497-if-let-chains/feature-gate.stderr b/src/test/ui/rfc-2497-if-let-chains/feature-gate.stderr
index fdfbb8fe4d4..5ed0dd3cab6 100644
--- a/src/test/ui/rfc-2497-if-let-chains/feature-gate.stderr
+++ b/src/test/ui/rfc-2497-if-let-chains/feature-gate.stderr
@@ -1,3 +1,12 @@
+error: no rules expected the token `let`
+  --> $DIR/feature-gate.rs:102:15
+   |
+LL |     macro_rules! use_expr {
+   |     --------------------- when calling this macro
+...
+LL |     use_expr!(let 0 = 1);
+   |               ^^^ no rules expected this token in macro call
+
 error[E0658]: `let` expressions in this position are experimental
   --> $DIR/feature-gate.rs:14:9
    |
@@ -251,7 +260,25 @@ LL |     while let Range { start: _, end: _ } = (true..true) && false {}
    = help: add #![feature(let_chains)] to the crate attributes to enable
 
 error[E0658]: `let` expressions in this position are experimental
-  --> $DIR/feature-gate.rs:94:16
+  --> $DIR/feature-gate.rs:100:20
+   |
+LL |     #[cfg(FALSE)] (let 0 = 1);
+   |                    ^^^^^^^^^
+   |
+   = note: for more information, see https://github.com/rust-lang/rust/issues/53667
+   = help: add #![feature(let_chains)] to the crate attributes to enable
+
+error[E0658]: `let` expressions in this position are experimental
+  --> $DIR/feature-gate.rs:87:17
+   |
+LL |     noop_expr!((let 0 = 1));
+   |                 ^^^^^^^^^
+   |
+   = note: for more information, see https://github.com/rust-lang/rust/issues/53667
+   = help: add #![feature(let_chains)] to the crate attributes to enable
+
+error[E0658]: `let` expressions in this position are experimental
+  --> $DIR/feature-gate.rs:96:16
    |
 LL |     use_expr!((let 0 = 1 && 0 == 0));
    |                ^^^^^^^^^
@@ -260,7 +287,7 @@ LL |     use_expr!((let 0 = 1 && 0 == 0));
    = help: add #![feature(let_chains)] to the crate attributes to enable
 
 error[E0658]: `let` expressions in this position are experimental
-  --> $DIR/feature-gate.rs:96:16
+  --> $DIR/feature-gate.rs:98:16
    |
 LL |     use_expr!((let 0 = 1));
    |                ^^^^^^^^^
@@ -274,6 +301,6 @@ error: `let` expressions only supported in `if`
 LL |     if (let 0 = 1) {}
    |         ^^^^^^^^^
 
-error: aborting due to 31 previous errors
+error: aborting due to 34 previous errors
 
 For more information about this error, try `rustc --explain E0658`.