about summary refs log tree commit diff
path: root/tests/ui/macros/metavar-expressions/concat-usage-errors.stderr
diff options
context:
space:
mode:
authorTrevor Gross <tmgross@umich.edu>2025-06-23 00:42:06 -0500
committerTrevor Gross <tmgross@umich.edu>2025-06-30 19:02:36 +0000
commitb3d74da9b8edb47b9b785afb7ac9f1a9a1841835 (patch)
treec27b4a69fa10f816b17c230e3592828074d6f329 /tests/ui/macros/metavar-expressions/concat-usage-errors.stderr
parent876835de11c3405f5de83a6b14755583bb3ff185 (diff)
downloadrust-b3d74da9b8edb47b9b785afb7ac9f1a9a1841835.tar.gz
rust-b3d74da9b8edb47b9b785afb7ac9f1a9a1841835.zip
mbe: Extend metavariable expression tests
Add tests showing the current state to make it more clear when output
gets updated later in refactoring.
Diffstat (limited to 'tests/ui/macros/metavar-expressions/concat-usage-errors.stderr')
-rw-r--r--tests/ui/macros/metavar-expressions/concat-usage-errors.stderr128
1 files changed, 94 insertions, 34 deletions
diff --git a/tests/ui/macros/metavar-expressions/concat-usage-errors.stderr b/tests/ui/macros/metavar-expressions/concat-usage-errors.stderr
index 629843ecbda..8be3e792ec3 100644
--- a/tests/ui/macros/metavar-expressions/concat-usage-errors.stderr
+++ b/tests/ui/macros/metavar-expressions/concat-usage-errors.stderr
@@ -1,71 +1,131 @@
 error: expected identifier or string literal
-  --> $DIR/concat-usage-errors.rs:5:10
+  --> $DIR/concat-usage-errors.rs:7:10
    |
 LL |         ${concat()}
    |          ^^^^^^^^^^
 
 error: `concat` must have at least two elements
-  --> $DIR/concat-usage-errors.rs:8:11
+  --> $DIR/concat-usage-errors.rs:10:11
    |
 LL |         ${concat(aaaa)}
    |           ^^^^^^
 
 error: expected identifier or string literal
-  --> $DIR/concat-usage-errors.rs:11:10
+  --> $DIR/concat-usage-errors.rs:13:10
    |
 LL |         ${concat(aaaa,)}
    |          ^^^^^^^^^^^^^^^
 
 error: expected comma
-  --> $DIR/concat-usage-errors.rs:16:10
+  --> $DIR/concat-usage-errors.rs:18:10
    |
 LL |         ${concat(aaaa aaaa)}
    |          ^^^^^^^^^^^^^^^^^^^
 
 error: `concat` must have at least two elements
-  --> $DIR/concat-usage-errors.rs:19:11
+  --> $DIR/concat-usage-errors.rs:21:11
    |
 LL |         ${concat($ex)}
    |           ^^^^^^
 
 error: expected comma
-  --> $DIR/concat-usage-errors.rs:25:10
+  --> $DIR/concat-usage-errors.rs:27:10
    |
 LL |         ${concat($ex, aaaa 123)}
    |          ^^^^^^^^^^^^^^^^^^^^^^^
 
 error: expected identifier or string literal
-  --> $DIR/concat-usage-errors.rs:28:10
+  --> $DIR/concat-usage-errors.rs:30:10
    |
 LL |         ${concat($ex, aaaa,)}
    |          ^^^^^^^^^^^^^^^^^^^^
 
 error: expected identifier or string literal
-  --> $DIR/concat-usage-errors.rs:88:26
+  --> $DIR/concat-usage-errors.rs:90:26
    |
 LL |         let ${concat(_a, 'b')}: () = ();
    |                          ^^^
 
 error: expected identifier or string literal
-  --> $DIR/concat-usage-errors.rs:91:26
+  --> $DIR/concat-usage-errors.rs:93:26
    |
 LL |         let ${concat(_a, 1)}: () = ();
    |                          ^
 
 error: expected identifier or string literal
-  --> $DIR/concat-usage-errors.rs:94:30
+  --> $DIR/concat-usage-errors.rs:95:26
+   |
+LL |         let ${concat(_a, 1.5)}: () = ();
+   |                          ^^^
+
+error: expected identifier or string literal
+  --> $DIR/concat-usage-errors.rs:97:26
+   |
+LL |         let ${concat(_a, c"hi")}: () = ();
+   |                          ^^^^^
+
+error: expected identifier or string literal
+  --> $DIR/concat-usage-errors.rs:99:26
+   |
+LL |         let ${concat(_a, b"hi")}: () = ();
+   |                          ^^^^^
+
+error: expected identifier or string literal
+  --> $DIR/concat-usage-errors.rs:101:26
+   |
+LL |         let ${concat(_a, b'b')}: () = ();
+   |                          ^^^^
+
+error: expected identifier or string literal
+  --> $DIR/concat-usage-errors.rs:103:26
+   |
+LL |         let ${concat(_a, b'b')}: () = ();
+   |                          ^^^^
+
+error: expected identifier or string literal
+  --> $DIR/concat-usage-errors.rs:106:30
    |
 LL |         let ${concat($ident, 'b')}: () = ();
    |                              ^^^
 
 error: expected identifier or string literal
-  --> $DIR/concat-usage-errors.rs:96:30
+  --> $DIR/concat-usage-errors.rs:108:30
    |
 LL |         let ${concat($ident, 1)}: () = ();
    |                              ^
 
+error: expected identifier or string literal
+  --> $DIR/concat-usage-errors.rs:110:30
+   |
+LL |         let ${concat($ident, 1.5)}: () = ();
+   |                              ^^^
+
+error: expected identifier or string literal
+  --> $DIR/concat-usage-errors.rs:112:30
+   |
+LL |         let ${concat($ident, c"hi")}: () = ();
+   |                              ^^^^^
+
+error: expected identifier or string literal
+  --> $DIR/concat-usage-errors.rs:114:30
+   |
+LL |         let ${concat($ident, b"hi")}: () = ();
+   |                              ^^^^^
+
+error: expected identifier or string literal
+  --> $DIR/concat-usage-errors.rs:116:30
+   |
+LL |         let ${concat($ident, b'b')}: () = ();
+   |                              ^^^^
+
+error: expected identifier or string literal
+  --> $DIR/concat-usage-errors.rs:118:30
+   |
+LL |         let ${concat($ident, b'b')}: () = ();
+   |                              ^^^^
+
 error: metavariables of `${concat(..)}` must be of type `ident`, `literal` or `tt`
-  --> $DIR/concat-usage-errors.rs:22:19
+  --> $DIR/concat-usage-errors.rs:24:19
    |
 LL |         ${concat($ex, aaaa)}
    |                   ^^
@@ -73,13 +133,13 @@ LL |         ${concat($ex, aaaa)}
    = note: currently only string literals are supported
 
 error: variable `foo` is not recognized in meta-variable expression
-  --> $DIR/concat-usage-errors.rs:35:30
+  --> $DIR/concat-usage-errors.rs:37:30
    |
 LL |         const ${concat(FOO, $foo)}: i32 = 2;
    |                              ^^^
 
 error: `${concat(..)}` is not generating a valid identifier
-  --> $DIR/concat-usage-errors.rs:42:14
+  --> $DIR/concat-usage-errors.rs:44:14
    |
 LL |         let ${concat("1", $ident)}: () = ();
    |              ^^^^^^^^^^^^^^^^^^^^^
@@ -90,7 +150,7 @@ LL |     starting_number!(_abc);
    = note: this error originates in the macro `starting_number` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: `${concat(..)}` is not generating a valid identifier
-  --> $DIR/concat-usage-errors.rs:55:14
+  --> $DIR/concat-usage-errors.rs:57:14
    |
 LL |         let ${concat("\u{00BD}", $ident)}: () = ();
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -101,7 +161,7 @@ LL |     starting_invalid_unicode!(_abc);
    = note: this error originates in the macro `starting_invalid_unicode` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: `${concat(..)}` is not generating a valid identifier
-  --> $DIR/concat-usage-errors.rs:74:14
+  --> $DIR/concat-usage-errors.rs:76:14
    |
 LL |         let ${concat($ident, "\u{00BD}")}: () = ();
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -112,7 +172,7 @@ LL |     ending_invalid_unicode!(_abc);
    = note: this error originates in the macro `ending_invalid_unicode` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: expected pattern, found `$`
-  --> $DIR/concat-usage-errors.rs:88:13
+  --> $DIR/concat-usage-errors.rs:90:13
    |
 LL |         let ${concat(_a, 'b')}: () = ();
    |             ^ expected pattern
@@ -123,7 +183,7 @@ LL |     unsupported_literals!(_abc);
    = note: this error originates in the macro `unsupported_literals` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: `${concat(..)}` is not generating a valid identifier
-  --> $DIR/concat-usage-errors.rs:81:14
+  --> $DIR/concat-usage-errors.rs:83:14
    |
 LL |         let ${concat("", "")}: () = ();
    |              ^^^^^^^^^^^^^^^^
@@ -134,7 +194,7 @@ LL |     empty!();
    = note: this error originates in the macro `empty` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: `${concat(..)}` is not generating a valid identifier
-  --> $DIR/concat-usage-errors.rs:103:16
+  --> $DIR/concat-usage-errors.rs:125:16
    |
 LL |         const ${concat(_foo, $literal)}: () = ();
    |                ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -145,7 +205,7 @@ LL |     bad_literal_string!("\u{00BD}");
    = note: this error originates in the macro `bad_literal_string` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: `${concat(..)}` is not generating a valid identifier
-  --> $DIR/concat-usage-errors.rs:103:16
+  --> $DIR/concat-usage-errors.rs:125:16
    |
 LL |         const ${concat(_foo, $literal)}: () = ();
    |                ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -156,7 +216,7 @@ LL |     bad_literal_string!("\x41");
    = note: this error originates in the macro `bad_literal_string` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: `${concat(..)}` is not generating a valid identifier
-  --> $DIR/concat-usage-errors.rs:103:16
+  --> $DIR/concat-usage-errors.rs:125:16
    |
 LL |         const ${concat(_foo, $literal)}: () = ();
    |                ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -167,7 +227,7 @@ LL |     bad_literal_string!("🤷");
    = note: this error originates in the macro `bad_literal_string` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: `${concat(..)}` is not generating a valid identifier
-  --> $DIR/concat-usage-errors.rs:103:16
+  --> $DIR/concat-usage-errors.rs:125:16
    |
 LL |         const ${concat(_foo, $literal)}: () = ();
    |                ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -178,7 +238,7 @@ LL |     bad_literal_string!("d[-_-]b");
    = note: this error originates in the macro `bad_literal_string` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: `${concat(..)}` is not generating a valid identifier
-  --> $DIR/concat-usage-errors.rs:103:16
+  --> $DIR/concat-usage-errors.rs:125:16
    |
 LL |         const ${concat(_foo, $literal)}: () = ();
    |                ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -189,7 +249,7 @@ LL |     bad_literal_string!("-1");
    = note: this error originates in the macro `bad_literal_string` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: `${concat(..)}` is not generating a valid identifier
-  --> $DIR/concat-usage-errors.rs:103:16
+  --> $DIR/concat-usage-errors.rs:125:16
    |
 LL |         const ${concat(_foo, $literal)}: () = ();
    |                ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -200,7 +260,7 @@ LL |     bad_literal_string!("1.0");
    = note: this error originates in the macro `bad_literal_string` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: `${concat(..)}` is not generating a valid identifier
-  --> $DIR/concat-usage-errors.rs:103:16
+  --> $DIR/concat-usage-errors.rs:125:16
    |
 LL |         const ${concat(_foo, $literal)}: () = ();
    |                ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -211,7 +271,7 @@ LL |     bad_literal_string!("'1'");
    = note: this error originates in the macro `bad_literal_string` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: metavariables of `${concat(..)}` must be of type `ident`, `literal` or `tt`
-  --> $DIR/concat-usage-errors.rs:116:31
+  --> $DIR/concat-usage-errors.rs:138:31
    |
 LL |         const ${concat(_foo, $literal)}: () = ();
    |                               ^^^^^^^
@@ -219,7 +279,7 @@ LL |         const ${concat(_foo, $literal)}: () = ();
    = note: currently only string literals are supported
 
 error: metavariables of `${concat(..)}` must be of type `ident`, `literal` or `tt`
-  --> $DIR/concat-usage-errors.rs:116:31
+  --> $DIR/concat-usage-errors.rs:138:31
    |
 LL |         const ${concat(_foo, $literal)}: () = ();
    |                               ^^^^^^^
@@ -228,7 +288,7 @@ LL |         const ${concat(_foo, $literal)}: () = ();
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error: metavariables of `${concat(..)}` must be of type `ident`, `literal` or `tt`
-  --> $DIR/concat-usage-errors.rs:116:31
+  --> $DIR/concat-usage-errors.rs:138:31
    |
 LL |         const ${concat(_foo, $literal)}: () = ();
    |                               ^^^^^^^
@@ -237,7 +297,7 @@ LL |         const ${concat(_foo, $literal)}: () = ();
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error: metavariables of `${concat(..)}` must be of type `ident`, `literal` or `tt`
-  --> $DIR/concat-usage-errors.rs:116:31
+  --> $DIR/concat-usage-errors.rs:138:31
    |
 LL |         const ${concat(_foo, $literal)}: () = ();
    |                               ^^^^^^^
@@ -246,7 +306,7 @@ LL |         const ${concat(_foo, $literal)}: () = ();
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error: metavariables of `${concat(..)}` must be of type `ident`, `literal` or `tt`
-  --> $DIR/concat-usage-errors.rs:116:31
+  --> $DIR/concat-usage-errors.rs:138:31
    |
 LL |         const ${concat(_foo, $literal)}: () = ();
    |                               ^^^^^^^
@@ -255,7 +315,7 @@ LL |         const ${concat(_foo, $literal)}: () = ();
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error: metavariables of `${concat(..)}` must be of type `ident`, `literal` or `tt`
-  --> $DIR/concat-usage-errors.rs:127:31
+  --> $DIR/concat-usage-errors.rs:149:31
    |
 LL |         const ${concat(_foo, $tt)}: () = ();
    |                               ^^
@@ -263,7 +323,7 @@ LL |         const ${concat(_foo, $tt)}: () = ();
    = note: currently only string literals are supported
 
 error: metavariables of `${concat(..)}` must be of type `ident`, `literal` or `tt`
-  --> $DIR/concat-usage-errors.rs:127:31
+  --> $DIR/concat-usage-errors.rs:149:31
    |
 LL |         const ${concat(_foo, $tt)}: () = ();
    |                               ^^
@@ -272,7 +332,7 @@ LL |         const ${concat(_foo, $tt)}: () = ();
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error: metavariables of `${concat(..)}` must be of type `ident`, `literal` or `tt`
-  --> $DIR/concat-usage-errors.rs:127:31
+  --> $DIR/concat-usage-errors.rs:149:31
    |
 LL |         const ${concat(_foo, $tt)}: () = ();
    |                               ^^
@@ -280,5 +340,5 @@ LL |         const ${concat(_foo, $tt)}: () = ();
    = note: currently only string literals are supported
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error: aborting due to 33 previous errors
+error: aborting due to 43 previous errors