Skip to content

Commit 23eec42

Browse files
committed
TEMP: fixes error codes in non-codegen tests. those work after the type checking
1 parent fc6a3d8 commit 23eec42

10 files changed

+48
-50
lines changed

tests/ui/eii/auxiliary/cross_crate_eii_declaration.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55
#![feature(rustc_attrs)]
66
#![feature(eii_internals)]
77

8-
#[eii_macro_for(bar)]
8+
#[eii_extern_target(bar)]
99
#[rustc_builtin_macro(eii_macro)]
10-
pub macro foo() {
11-
12-
}
10+
pub macro foo() {}
1311

1412
unsafe extern "Rust" {
1513
pub safe fn bar(x: u64) -> u64;
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
error[E0050]: `other` has 0 parameters but #[foo] requires it to have 1
1+
error[E0806]: `other` has 0 parameters but #[foo] requires it to have 1
22
--> $DIR/cross_crate_wrong_ty.rs:11:1
33
|
44
LL | #[unsafe(cross_crate_eii_declaration::foo)]
55
| ------------------------------------------- required because of this attribute
66
LL | fn other() -> u64 {
77
| ^^^^^^^^^^^^^^^^^ expected 1 parameter, found 0
88
|
9-
::: $DIR/auxiliary/cross_crate_eii_declaration.rs:15:5
9+
::: $DIR/auxiliary/cross_crate_eii_declaration.rs:13:5
1010
|
1111
LL | pub safe fn bar(x: u64) -> u64;
1212
| ------------------------------- requires 1 parameter
1313

1414
error: aborting due to 1 previous error
1515

16-
For more information about this error, try `rustc --explain E0050`.
16+
For more information about this error, try `rustc --explain E0806`.

tests/ui/eii/errors.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ fn hello() {
1010
let x = 3 + 3;
1111
}
1212

13-
#[eii_macro_for] //~ ERROR `#[eii_macro_for(...)]` expects a list of one or two elements
14-
#[eii_macro_for()] //~ ERROR `#[eii_macro_for(...)]` expects a list of one or two elements
15-
#[eii_macro_for(bar, hello)] //~ ERROR expected this argument to be "unsafe"
16-
#[eii_macro_for(bar, "unsafe", hello)] //~ ERROR `#[eii_macro_for(...)]` expects a list of one or two elements
17-
#[eii_macro_for(bar, hello, "unsafe")] //~ ERROR `#[eii_macro_for(...)]` expects a list of one or two elements
18-
#[eii_macro_for = "unsafe"] //~ ERROR `#[eii_macro_for(...)]` expects a list of one or two elements
19-
#[eii_macro_for(bar)]
13+
#[eii_extern_target] //~ ERROR `#[eii_extern_target(...)]` expects a list of one or two elements
14+
#[eii_extern_target()] //~ ERROR `#[eii_extern_target(...)]` expects a list of one or two elements
15+
#[eii_extern_target(bar, hello)] //~ ERROR expected this argument to be "unsafe"
16+
#[eii_extern_target(bar, "unsafe", hello)] //~ ERROR `#[eii_extern_target(...)]` expects a list of one or two elements
17+
#[eii_extern_target(bar, hello, "unsafe")] //~ ERROR `#[eii_extern_target(...)]` expects a list of one or two elements
18+
#[eii_extern_target = "unsafe"] //~ ERROR `#[eii_extern_target(...)]` expects a list of one or two elements
19+
#[eii_extern_target(bar)]
2020
#[rustc_builtin_macro(eii_macro)]
2121
macro foo() {}
2222

tests/ui/eii/errors.stderr

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,56 @@
11
error: `#[eii_macro_for(...)]` is only valid on macros
22
--> $DIR/errors.rs:7:1
33
|
4-
LL | #[eii_macro_for(bar)]
5-
| ^^^^^^^^^^^^^^^^^^^^^
4+
LL | #[eii_extern_target(bar)]
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^
66

77
error: `#[eii_macro_for(...)]` is only valid on macros
88
--> $DIR/errors.rs:9:5
99
|
10-
LL | #[eii_macro_for(bar)]
11-
| ^^^^^^^^^^^^^^^^^^^^^
10+
LL | #[eii_extern_target(bar)]
11+
| ^^^^^^^^^^^^^^^^^^^^^^^^^
1212

1313
error: `#[eii_macro_for(...)]` expects a list of one or two elements
1414
--> $DIR/errors.rs:13:1
1515
|
16-
LL | #[eii_macro_for]
17-
| ^^^^^^^^^^^^^^^^
16+
LL | #[eii_extern_target]
17+
| ^^^^^^^^^^^^^^^^^^^^
1818

1919
error: `#[eii_macro_for(...)]` expects a list of one or two elements
2020
--> $DIR/errors.rs:14:1
2121
|
22-
LL | #[eii_macro_for()]
23-
| ^^^^^^^^^^^^^^^^^^
22+
LL | #[eii_extern_target()]
23+
| ^^^^^^^^^^^^^^^^^^^^^^
2424

2525
error: expected this argument to be "unsafe"
26-
--> $DIR/errors.rs:15:22
26+
--> $DIR/errors.rs:15:26
2727
|
28-
LL | #[eii_macro_for(bar, hello)]
29-
| ^^^^^
28+
LL | #[eii_extern_target(bar, hello)]
29+
| ^^^^^
3030
|
3131
note: the second argument is optional
32-
--> $DIR/errors.rs:15:22
32+
--> $DIR/errors.rs:15:26
3333
|
34-
LL | #[eii_macro_for(bar, hello)]
35-
| ^^^^^
34+
LL | #[eii_extern_target(bar, hello)]
35+
| ^^^^^
3636

3737
error: `#[eii_macro_for(...)]` expects a list of one or two elements
3838
--> $DIR/errors.rs:16:1
3939
|
40-
LL | #[eii_macro_for(bar, "unsafe", hello)]
41-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
40+
LL | #[eii_extern_target(bar, "unsafe", hello)]
41+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4242

4343
error: `#[eii_macro_for(...)]` expects a list of one or two elements
4444
--> $DIR/errors.rs:17:1
4545
|
46-
LL | #[eii_macro_for(bar, hello, "unsafe")]
47-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
46+
LL | #[eii_extern_target(bar, hello, "unsafe")]
47+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4848

4949
error: `#[eii_macro_for(...)]` expects a list of one or two elements
5050
--> $DIR/errors.rs:18:1
5151
|
52-
LL | #[eii_macro_for = "unsafe"]
53-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
52+
LL | #[eii_extern_target = "unsafe"]
53+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5454

5555
error: `#[foo]` is only valid on functions
5656
--> $DIR/errors.rs:27:1

tests/ui/eii/subtype_1.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: lifetime parameters or bounds of `other` do not match the declaration
2-
--> $DIR/subtype_1.rs:18:9
2+
--> $DIR/subtype_1.rs:16:9
33
|
44
LL | safe fn bar<'a, 'b>(x: &'b u64) -> &'a u64;
55
| -------- lifetimes in impl do not match this signature

tests/ui/eii/subtype_2.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: lifetime parameters or bounds of `other` do not match the declaration
2-
--> $DIR/subtype_2.rs:18:9
2+
--> $DIR/subtype_2.rs:16:9
33
|
44
LL | safe fn bar<'a>(x: &'static u64) -> &'a u64;
55
| ---- lifetimes in impl do not match this signature

tests/ui/eii/unsafe_impl_err.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: `#[foo]` is unsafe to implement
2-
--> $DIR/unsafe_impl_err.rs:17:1
2+
--> $DIR/unsafe_impl_err.rs:15:1
33
|
44
LL | #[foo]
55
| ^^^^^^

tests/ui/eii/wrong_ret_ty.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
error[E0053]: function `other` has a type that is incompatible with the declaration of `#[foo]`
2-
--> $DIR/wrong_ret_ty.rs:18:18
1+
error[E0806]: function `other` has a type that is incompatible with the declaration of `#[foo]`
2+
--> $DIR/wrong_ret_ty.rs:16:18
33
|
44
LL | fn other(_x: u64) {
55
| ^ expected `u64`, found `()`
66
|
77
note: expected this because of this attribute
8-
--> $DIR/wrong_ret_ty.rs:17:1
8+
--> $DIR/wrong_ret_ty.rs:15:1
99
|
1010
LL | #[foo]
1111
| ^^^^^^
1212
note: type in declaration
13-
--> $DIR/wrong_ret_ty.rs:14:28
13+
--> $DIR/wrong_ret_ty.rs:12:28
1414
|
1515
LL | safe fn bar(x: u64) -> u64;
1616
| ^^^
@@ -23,4 +23,4 @@ LL | fn other(_x: u64) -> u64 {
2323

2424
error: aborting due to 1 previous error
2525

26-
For more information about this error, try `rustc --explain E0053`.
26+
For more information about this error, try `rustc --explain E0806`.

tests/ui/eii/wrong_ty.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
error[E0053]: function `other` has a type that is incompatible with the declaration of `#[foo]`
2-
--> $DIR/wrong_ty.rs:18:13
1+
error[E0806]: function `other` has a type that is incompatible with the declaration of `#[foo]`
2+
--> $DIR/wrong_ty.rs:16:13
33
|
44
LL | fn other(x: usize) -> u64 {
55
| ^^^^^ expected `u64`, found `usize`
66
|
77
note: expected this because of this attribute
8-
--> $DIR/wrong_ty.rs:17:1
8+
--> $DIR/wrong_ty.rs:15:1
99
|
1010
LL | #[foo]
1111
| ^^^^^^
1212
note: type in declaration
13-
--> $DIR/wrong_ty.rs:14:20
13+
--> $DIR/wrong_ty.rs:12:20
1414
|
1515
LL | safe fn bar(x: u64) -> u64;
1616
| ^^^
@@ -24,4 +24,4 @@ LL + fn other(x: u64) -> u64 {
2424

2525
error: aborting due to 1 previous error
2626

27-
For more information about this error, try `rustc --explain E0053`.
27+
For more information about this error, try `rustc --explain E0806`.

tests/ui/eii/wrong_ty_2.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
error[E0050]: `other` has 0 parameters but #[foo] requires it to have 1
2-
--> $DIR/wrong_ty_2.rs:18:1
1+
error[E0806]: `other` has 0 parameters but #[foo] requires it to have 1
2+
--> $DIR/wrong_ty_2.rs:16:1
33
|
44
LL | safe fn bar(x: u64) -> u64;
55
| --- requires 1 parameter
@@ -11,4 +11,4 @@ LL | fn other() -> u64 {
1111

1212
error: aborting due to 1 previous error
1313

14-
For more information about this error, try `rustc --explain E0050`.
14+
For more information about this error, try `rustc --explain E0806`.

0 commit comments

Comments
 (0)