Fix new merge conflict

This commit is contained in:
Guillaume Gomez
2025-12-10 12:35:17 +01:00
parent 3ea9462167
commit 9fdec8194e
2 changed files with 22 additions and 2 deletions
@@ -26,7 +26,10 @@ fn main() {
macro_rules! make {
($name:ident) => { #[doc(alias = $name)] pub struct S; }
//~^ ERROR: expected unsuffixed literal, found identifier `nickname`
//~^ ERROR: expected a literal (`1u8`, `1.0f32`, `"string"`, etc.) here, found expression
//~| NOTE: expressions are not allowed here
//~| HELP: surround the identifier with quotation marks to make it into a string literal
}
make!(nickname); //~ NOTE: in this expansion
//~^ NOTE in this expansion of make
@@ -20,14 +20,31 @@ help: surround the identifier with quotation marks to make it into a string lite
LL | #[cfg(key="foo bar baz")]
| + +
error: expected a literal (`1u8`, `1.0f32`, `"string"`, etc.) here, found expression
--> $DIR/attr-unquoted-ident.rs:18:15
|
LL | #[cfg(key=foo 1 bar 2.0 baz.)]
| ^^^ expressions are not allowed here
|
help: surround the identifier with quotation marks to make it into a string literal
|
LL | #[cfg(key="foo 1 bar 2.0 baz.")]
| + +
error: expected a literal (`1u8`, `1.0f32`, `"string"`, etc.) here, found expression
--> $DIR/attr-unquoted-ident.rs:28:38
|
LL | ($name:ident) => { #[doc(alias = $name)] pub struct S; }
| ^^^^^
| ^^^^^ expressions are not allowed here
...
LL | make!(nickname);
| --------------- in this macro invocation
|
= note: this error originates in the macro `make` (in Nightly builds, run with -Z macro-backtrace for more info)
help: surround the identifier with quotation marks to make it into a string literal
|
LL | ($name:ident) => { #[doc(alias = "$name")] pub struct S; }
| + +
error: aborting due to 4 previous errors