about summary refs log tree commit diff
path: root/tests/ui/macros/metavar-expressions/concat-usage-errors.stderr
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-07-01 05:31:05 +0000
committerbors <bors@rust-lang.org>2025-07-01 05:31:05 +0000
commitf46ce66fcc3d6058f90ac5bf0930f940f1e7b0ca (patch)
tree17a06668752fe94c0824b6b9788c02e7fbf56f1e /tests/ui/macros/metavar-expressions/concat-usage-errors.stderr
parent6988a8fea774a2a20ebebddb7dbf15dd6ef594f9 (diff)
parent3944c8ce447404dc45c00e125baf6bbbd728b501 (diff)
downloadrust-f46ce66fcc3d6058f90ac5bf0930f940f1e7b0ca.tar.gz
rust-f46ce66fcc3d6058f90ac5bf0930f940f1e7b0ca.zip
Auto merge of #143267 - matthiaskrgr:rollup-suvzar6, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - rust-lang/rust#143125 (Disable f16 on Aarch64 without neon for llvm < 20.1.1)
 - rust-lang/rust#143156 (inherit `#[align]` from trait method prototypes)
 - rust-lang/rust#143178 (rustdoc default faviocon)
 - rust-lang/rust#143234 (Replace `ItemCtxt::report_placeholder_type_error` match with a call to `TyCtxt::def_descr`)
 - rust-lang/rust#143245 (mbe: Add tests and restructure metavariable expressions)
 - rust-lang/rust#143257 (Upgrade dependencies in run-make-support)
 - rust-lang/rust#143263 (linkify CodeSuggestion in doc comments)
 - rust-lang/rust#143264 (fix: Emit suggestion filename if primary diagnostic span is dummy)

Failed merges:

 - rust-lang/rust#143251 (bootstrap: add build.tidy-extra-checks option)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'tests/ui/macros/metavar-expressions/concat-usage-errors.stderr')
-rw-r--r--tests/ui/macros/metavar-expressions/concat-usage-errors.stderr344
1 files changed, 344 insertions, 0 deletions
diff --git a/tests/ui/macros/metavar-expressions/concat-usage-errors.stderr b/tests/ui/macros/metavar-expressions/concat-usage-errors.stderr
new file mode 100644
index 00000000000..8be3e792ec3
--- /dev/null
+++ b/tests/ui/macros/metavar-expressions/concat-usage-errors.stderr
@@ -0,0 +1,344 @@
+error: expected identifier or string literal
+  --> $DIR/concat-usage-errors.rs:7:10
+   |
+LL |         ${concat()}
+   |          ^^^^^^^^^^
+
+error: `concat` must have at least two elements
+  --> $DIR/concat-usage-errors.rs:10:11
+   |
+LL |         ${concat(aaaa)}
+   |           ^^^^^^
+
+error: expected identifier or string literal
+  --> $DIR/concat-usage-errors.rs:13:10
+   |
+LL |         ${concat(aaaa,)}
+   |          ^^^^^^^^^^^^^^^
+
+error: expected comma
+  --> $DIR/concat-usage-errors.rs:18:10
+   |
+LL |         ${concat(aaaa aaaa)}
+   |          ^^^^^^^^^^^^^^^^^^^
+
+error: `concat` must have at least two elements
+  --> $DIR/concat-usage-errors.rs:21:11
+   |
+LL |         ${concat($ex)}
+   |           ^^^^^^
+
+error: expected comma
+  --> $DIR/concat-usage-errors.rs:27:10
+   |
+LL |         ${concat($ex, aaaa 123)}
+   |          ^^^^^^^^^^^^^^^^^^^^^^^
+
+error: expected identifier or string literal
+  --> $DIR/concat-usage-errors.rs:30:10
+   |
+LL |         ${concat($ex, aaaa,)}
+   |          ^^^^^^^^^^^^^^^^^^^^
+
+error: expected identifier or string literal
+  --> $DIR/concat-usage-errors.rs:90:26
+   |
+LL |         let ${concat(_a, 'b')}: () = ();
+   |                          ^^^
+
+error: expected identifier or string literal
+  --> $DIR/concat-usage-errors.rs:93:26
+   |
+LL |         let ${concat(_a, 1)}: () = ();
+   |                          ^
+
+error: expected identifier or string literal
+  --> $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: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:24:19
+   |
+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:37:30
+   |
+LL |         const ${concat(FOO, $foo)}: i32 = 2;
+   |                              ^^^
+
+error: `${concat(..)}` is not generating a valid identifier
+  --> $DIR/concat-usage-errors.rs:44:14
+   |
+LL |         let ${concat("1", $ident)}: () = ();
+   |              ^^^^^^^^^^^^^^^^^^^^^
+...
+LL |     starting_number!(_abc);
+   |     ---------------------- in this macro invocation
+   |
+   = 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:57:14
+   |
+LL |         let ${concat("\u{00BD}", $ident)}: () = ();
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+...
+LL |     starting_invalid_unicode!(_abc);
+   |     ------------------------------- in this macro invocation
+   |
+   = 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:76:14
+   |
+LL |         let ${concat($ident, "\u{00BD}")}: () = ();
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+...
+LL |     ending_invalid_unicode!(_abc);
+   |     ----------------------------- in this macro invocation
+   |
+   = 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:90:13
+   |
+LL |         let ${concat(_a, 'b')}: () = ();
+   |             ^ expected pattern
+...
+LL |     unsupported_literals!(_abc);
+   |     --------------------------- in this macro invocation
+   |
+   = 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:83:14
+   |
+LL |         let ${concat("", "")}: () = ();
+   |              ^^^^^^^^^^^^^^^^
+...
+LL |     empty!();
+   |     -------- in this macro invocation
+   |
+   = 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:125:16
+   |
+LL |         const ${concat(_foo, $literal)}: () = ();
+   |                ^^^^^^^^^^^^^^^^^^^^^^^^
+...
+LL |     bad_literal_string!("\u{00BD}");
+   |     ------------------------------- in this macro invocation
+   |
+   = 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:125:16
+   |
+LL |         const ${concat(_foo, $literal)}: () = ();
+   |                ^^^^^^^^^^^^^^^^^^^^^^^^
+...
+LL |     bad_literal_string!("\x41");
+   |     --------------------------- in this macro invocation
+   |
+   = 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:125:16
+   |
+LL |         const ${concat(_foo, $literal)}: () = ();
+   |                ^^^^^^^^^^^^^^^^^^^^^^^^
+...
+LL |     bad_literal_string!("🤷");
+   |     ------------------------- in this macro invocation
+   |
+   = 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:125:16
+   |
+LL |         const ${concat(_foo, $literal)}: () = ();
+   |                ^^^^^^^^^^^^^^^^^^^^^^^^
+...
+LL |     bad_literal_string!("d[-_-]b");
+   |     ------------------------------ in this macro invocation
+   |
+   = 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:125:16
+   |
+LL |         const ${concat(_foo, $literal)}: () = ();
+   |                ^^^^^^^^^^^^^^^^^^^^^^^^
+...
+LL |     bad_literal_string!("-1");
+   |     ------------------------- in this macro invocation
+   |
+   = 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:125:16
+   |
+LL |         const ${concat(_foo, $literal)}: () = ();
+   |                ^^^^^^^^^^^^^^^^^^^^^^^^
+...
+LL |     bad_literal_string!("1.0");
+   |     -------------------------- in this macro invocation
+   |
+   = 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:125:16
+   |
+LL |         const ${concat(_foo, $literal)}: () = ();
+   |                ^^^^^^^^^^^^^^^^^^^^^^^^
+...
+LL |     bad_literal_string!("'1'");
+   |     -------------------------- in this macro invocation
+   |
+   = 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:138:31
+   |
+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:138:31
+   |
+LL |         const ${concat(_foo, $literal)}: () = ();
+   |                               ^^^^^^^
+   |
+   = note: currently only string literals are supported
+   = 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:138:31
+   |
+LL |         const ${concat(_foo, $literal)}: () = ();
+   |                               ^^^^^^^
+   |
+   = note: currently only string literals are supported
+   = 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:138:31
+   |
+LL |         const ${concat(_foo, $literal)}: () = ();
+   |                               ^^^^^^^
+   |
+   = note: currently only string literals are supported
+   = 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:138:31
+   |
+LL |         const ${concat(_foo, $literal)}: () = ();
+   |                               ^^^^^^^
+   |
+   = note: currently only string literals are supported
+   = 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:149:31
+   |
+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:149:31
+   |
+LL |         const ${concat(_foo, $tt)}: () = ();
+   |                               ^^
+   |
+   = note: currently only string literals are supported
+   = 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:149:31
+   |
+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 43 previous errors
+