Skip to content

Commit 4c9c70a

Browse files
committed
Move former compile-fail-fulldeps tests to ui
1 parent ea007c6 commit 4c9c70a

File tree

80 files changed

+662
-46
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+662
-46
lines changed

src/test/compile-fail/proc-macro/auxiliary/derive-clona.rs

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/test/compile-fail/proc-macro/auxiliary/derive-foo.rs

Lines changed: 0 additions & 23 deletions
This file was deleted.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
error: expected expression, found `<eof>`
2+
--> $DIR/attr-invalid-exprs.rs:21:13
3+
|
4+
LL | let _ = #[no_output] "Hello, world!";
5+
| ^^^^^^^^^^^^
6+
7+
error: macro expansion ignores token `,` and any following
8+
--> $DIR/attr-invalid-exprs.rs:24:13
9+
|
10+
LL | let _ = #[duplicate] "Hello, world!";
11+
| ^^^^^^^^^^^^- help: you might be missing a semicolon here: `;`
12+
| |
13+
| caused by the macro expansion here
14+
|
15+
= note: the usage of `duplicate!` is likely invalid in expression context
16+
17+
error: macro expansion ignores token `,` and any following
18+
--> $DIR/attr-invalid-exprs.rs:33:9
19+
|
20+
LL | #[duplicate]
21+
| ^^^^^^^^^^^^- help: you might be missing a semicolon here: `;`
22+
| |
23+
| caused by the macro expansion here
24+
|
25+
= note: the usage of `duplicate!` is likely invalid in expression context
26+
27+
error: aborting due to 3 previous errors
28+
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
error[E0658]: attributes on expressions are experimental. (see issue #15701)
2+
--> $DIR/attr-stmt-expr.rs:20:5
3+
|
4+
LL | #[expect_print_expr]
5+
| ^^^^^^^^^^^^^^^^^^^^
6+
|
7+
= help: add #![feature(stmt_expr_attributes)] to the crate attributes to enable
8+
9+
error[E0658]: attributes on expressions are experimental. (see issue #15701)
10+
--> $DIR/attr-stmt-expr.rs:33:5
11+
|
12+
LL | #[expect_expr]
13+
| ^^^^^^^^^^^^^^
14+
|
15+
= help: add #![feature(stmt_expr_attributes)] to the crate attributes to enable
16+
17+
error: aborting due to 2 previous errors
18+
19+
For more information about this error, try `rustc --explain E0658`.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
error[E0308]: mismatched types
2+
--> $DIR/attribute-with-error.rs:21:18
3+
|
4+
LL | let a: i32 = "foo";
5+
| ^^^^^ expected i32, found reference
6+
|
7+
= note: expected type `i32`
8+
found type `&'static str`
9+
10+
error[E0308]: mismatched types
11+
--> $DIR/attribute-with-error.rs:23:18
12+
|
13+
LL | let b: i32 = "f'oo";
14+
| ^^^^^^ expected i32, found reference
15+
|
16+
= note: expected type `i32`
17+
found type `&'static str`
18+
19+
error[E0308]: mismatched types
20+
--> $DIR/attribute-with-error.rs:36:22
21+
|
22+
LL | let a: i32 = "foo";
23+
| ^^^^^ expected i32, found reference
24+
|
25+
= note: expected type `i32`
26+
found type `&'static str`
27+
28+
error[E0308]: mismatched types
29+
--> $DIR/attribute-with-error.rs:46:22
30+
|
31+
LL | let a: i32 = "foo";
32+
| ^^^^^ expected i32, found reference
33+
|
34+
= note: expected type `i32`
35+
found type `&'static str`
36+
37+
error: aborting due to 4 previous errors
38+
39+
For more information about this error, try `rustc --explain E0308`.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
error: attribute must be of form: #[proc_macro_derive(TraitName)]
2+
--> $DIR/attribute.rs:18:1
3+
|
4+
LL | #[proc_macro_derive]
5+
| ^^^^^^^^^^^^^^^^^^^^
6+
7+
error: attribute must be of form: #[proc_macro_derive(TraitName)]
8+
--> $DIR/attribute.rs:24:1
9+
|
10+
LL | #[proc_macro_derive = "foo"]
11+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12+
13+
error: must only be one word
14+
--> $DIR/attribute.rs:31:5
15+
|
16+
LL | a = "b"
17+
| ^^^^^^^
18+
19+
error: attribute must have either one or two arguments
20+
--> $DIR/attribute.rs:38:1
21+
|
22+
LL | #[proc_macro_derive(b, c, d)]
23+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24+
25+
error: must only be one word
26+
--> $DIR/attribute.rs:44:21
27+
|
28+
LL | #[proc_macro_derive(d(e))]
29+
| ^^^^
30+
31+
error: must only be one word
32+
--> $DIR/attribute.rs:50:35
33+
|
34+
LL | #[proc_macro_derive(f, attributes(g = "h"))]
35+
| ^^^^^^^
36+
37+
error: must only be one word
38+
--> $DIR/attribute.rs:56:35
39+
|
40+
LL | #[proc_macro_derive(i, attributes(j(k)))]
41+
| ^^^^
42+
43+
error: attribute must have either one or two arguments
44+
--> $DIR/attribute.rs:62:1
45+
|
46+
LL | #[proc_macro_derive(l, attributes(m), n)]
47+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48+
49+
error: aborting due to 8 previous errors
50+

0 commit comments

Comments
 (0)