diff options
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/rustdoc-ui/doc-cfg.stderr | 4 | ||||
| -rw-r--r-- | src/test/ui/conditional-compilation/cfg-attr-syntax-validation.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/macros/macro-in-expression-context.stderr | 8 | ||||
| -rw-r--r-- | src/test/ui/proc-macro/attr-invalid-exprs.stderr | 16 | ||||
| -rw-r--r-- | src/test/ui/proc-macro/attribute.rs | 8 | ||||
| -rw-r--r-- | src/test/ui/proc-macro/attribute.stderr | 8 | ||||
| -rw-r--r-- | src/test/ui/proc-macro/expand-expr.stderr | 16 |
7 files changed, 36 insertions, 26 deletions
diff --git a/src/test/rustdoc-ui/doc-cfg.stderr b/src/test/rustdoc-ui/doc-cfg.stderr index b379f6febe2..14b7b17e04d 100644 --- a/src/test/rustdoc-ui/doc-cfg.stderr +++ b/src/test/rustdoc-ui/doc-cfg.stderr @@ -2,7 +2,7 @@ error: `cfg` predicate is not specified --> $DIR/doc-cfg.rs:3:7 | LL | #[doc(cfg(), cfg(foo, bar))] - | ^^^^^ + | ^^^^^ help: expected syntax is: `cfg(/* predicate */)` error: multiple `cfg` predicates are specified --> $DIR/doc-cfg.rs:3:23 @@ -14,7 +14,7 @@ error: `cfg` predicate is not specified --> $DIR/doc-cfg.rs:7:7 | LL | #[doc(cfg())] - | ^^^^^ + | ^^^^^ help: expected syntax is: `cfg(/* predicate */)` error: multiple `cfg` predicates are specified --> $DIR/doc-cfg.rs:8:16 diff --git a/src/test/ui/conditional-compilation/cfg-attr-syntax-validation.stderr b/src/test/ui/conditional-compilation/cfg-attr-syntax-validation.stderr index d4bd673b84e..d5b4349c00f 100644 --- a/src/test/ui/conditional-compilation/cfg-attr-syntax-validation.stderr +++ b/src/test/ui/conditional-compilation/cfg-attr-syntax-validation.stderr @@ -14,7 +14,7 @@ error: `cfg` predicate is not specified --> $DIR/cfg-attr-syntax-validation.rs:7:1 | LL | #[cfg()] - | ^^^^^^^^ + | ^^^^^^^^ help: expected syntax is: `cfg(/* predicate */)` error: multiple `cfg` predicates are specified --> $DIR/cfg-attr-syntax-validation.rs:10:10 diff --git a/src/test/ui/macros/macro-in-expression-context.stderr b/src/test/ui/macros/macro-in-expression-context.stderr index 1023189eaa3..36aba8aa08a 100644 --- a/src/test/ui/macros/macro-in-expression-context.stderr +++ b/src/test/ui/macros/macro-in-expression-context.stderr @@ -5,11 +5,13 @@ LL | assert_eq!("B", "B"); | ^^^^^^^^^ ... LL | foo!() - | ------- help: you might be missing a semicolon here: `;` - | | - | caused by the macro expansion here + | ------ caused by the macro expansion here | = note: the usage of `foo!` is likely invalid in expression context +help: you might be missing a semicolon here + | +LL | foo!(); + | + warning: trailing semicolon in macro used in expression position --> $DIR/macro-in-expression-context.rs:5:29 diff --git a/src/test/ui/proc-macro/attr-invalid-exprs.stderr b/src/test/ui/proc-macro/attr-invalid-exprs.stderr index bcb54df0eca..f96939bb6ef 100644 --- a/src/test/ui/proc-macro/attr-invalid-exprs.stderr +++ b/src/test/ui/proc-macro/attr-invalid-exprs.stderr @@ -8,21 +8,25 @@ error: macro expansion ignores token `,` and any following --> $DIR/attr-invalid-exprs.rs:15:13 | LL | let _ = #[duplicate] "Hello, world!"; - | ^^^^^^^^^^^^- help: you might be missing a semicolon here: `;` - | | - | caused by the macro expansion here + | ^^^^^^^^^^^^ caused by the macro expansion here | = note: the usage of `duplicate!` is likely invalid in expression context +help: you might be missing a semicolon here + | +LL | let _ = #[duplicate]; "Hello, world!"; + | + error: macro expansion ignores token `,` and any following --> $DIR/attr-invalid-exprs.rs:24:9 | LL | #[duplicate] - | ^^^^^^^^^^^^- help: you might be missing a semicolon here: `;` - | | - | caused by the macro expansion here + | ^^^^^^^^^^^^ caused by the macro expansion here | = note: the usage of `duplicate!` is likely invalid in expression context +help: you might be missing a semicolon here + | +LL | #[duplicate]; + | + error: aborting due to 3 previous errors diff --git a/src/test/ui/proc-macro/attribute.rs b/src/test/ui/proc-macro/attribute.rs index 5531b323621..9e40e4d9ba6 100644 --- a/src/test/ui/proc-macro/attribute.rs +++ b/src/test/ui/proc-macro/attribute.rs @@ -53,19 +53,19 @@ pub fn foo11(input: TokenStream) -> TokenStream { input } pub fn foo12(input: TokenStream) -> TokenStream { input } #[proc_macro_derive(d13, attributes("a"))] -//~^ ERROR: not a meta item +//~^ ERROR: attribute must be a meta item, not a literal pub fn foo13(input: TokenStream) -> TokenStream { input } #[proc_macro_derive(d14, attributes(a = ""))] -//~^ ERROR: must only be one word +//~^ ERROR: attribute must only be a single word pub fn foo14(input: TokenStream) -> TokenStream { input } #[proc_macro_derive(d15, attributes(m::a))] -//~^ ERROR: must only be one word +//~^ ERROR: attribute must only be a single word pub fn foo15(input: TokenStream) -> TokenStream { input } #[proc_macro_derive(d16, attributes(a(b)))] -//~^ ERROR: must only be one word +//~^ ERROR: attribute must only be a single word pub fn foo16(input: TokenStream) -> TokenStream { input } #[proc_macro_derive(d17, attributes(self))] diff --git a/src/test/ui/proc-macro/attribute.stderr b/src/test/ui/proc-macro/attribute.stderr index 021e7cad09b..3269aaf7f91 100644 --- a/src/test/ui/proc-macro/attribute.stderr +++ b/src/test/ui/proc-macro/attribute.stderr @@ -70,25 +70,25 @@ error: attribute must be of form: `attributes(foo, bar)` LL | #[proc_macro_derive(d12, attributes)] | ^^^^^^^^^^ -error: not a meta item +error: attribute must be a meta item, not a literal --> $DIR/attribute.rs:55:37 | LL | #[proc_macro_derive(d13, attributes("a"))] | ^^^ -error: must only be one word +error: attribute must only be a single word --> $DIR/attribute.rs:59:37 | LL | #[proc_macro_derive(d14, attributes(a = ""))] | ^^^^^^ -error: must only be one word +error: attribute must only be a single word --> $DIR/attribute.rs:63:37 | LL | #[proc_macro_derive(d15, attributes(m::a))] | ^^^^ -error: must only be one word +error: attribute must only be a single word --> $DIR/attribute.rs:67:37 | LL | #[proc_macro_derive(d16, attributes(a(b)))] diff --git a/src/test/ui/proc-macro/expand-expr.stderr b/src/test/ui/proc-macro/expand-expr.stderr index c6c4695fd9c..0004f2fe17f 100644 --- a/src/test/ui/proc-macro/expand-expr.stderr +++ b/src/test/ui/proc-macro/expand-expr.stderr @@ -26,21 +26,25 @@ error: macro expansion ignores token `hello` and any following --> $DIR/expand-expr.rs:115:47 | LL | expand_expr_is!("string", echo_tts!("string"; hello)); - | --------------------^^^^^-- help: you might be missing a semicolon here: `;` - | | - | caused by the macro expansion here + | --------------------^^^^^- caused by the macro expansion here | = note: the usage of `echo_tts!` is likely invalid in expression context +help: you might be missing a semicolon here + | +LL | expand_expr_is!("string", echo_tts!("string"; hello);); + | + error: macro expansion ignores token `;` and any following --> $DIR/expand-expr.rs:116:44 | LL | expand_expr_is!("string", echo_pm!("string"; hello)); - | -----------------^-------- help: you might be missing a semicolon here: `;` - | | - | caused by the macro expansion here + | -----------------^------- caused by the macro expansion here | = note: the usage of `echo_pm!` is likely invalid in expression context +help: you might be missing a semicolon here + | +LL | expand_expr_is!("string", echo_pm!("string"; hello);); + | + error: recursion limit reached while expanding `recursive_expand!` --> $DIR/expand-expr.rs:124:16 |
