Skip to content

Commit

Permalink
Readd //~ERROR messages
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed May 22, 2017
1 parent 6f681c2 commit 1343bc6
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 31 deletions.
10 changes: 10 additions & 0 deletions src/test/ui-fulldeps/resolve-error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,29 +35,39 @@ macro_rules! attr_proc_mac {
}

#[derive(FooWithLongNan)]
//~^ ERROR cannot find derive macro `FooWithLongNan` in this scope
struct Foo;

#[attr_proc_macra]
//~^ ERROR cannot find attribute macro `attr_proc_macra` in this scope
struct Bar;

#[FooWithLongNan]
//~^ ERROR cannot find attribute macro `FooWithLongNan` in this scope
struct Asdf;

#[derive(Dlone)]
//~^ ERROR cannot find derive macro `Dlone` in this scope
struct A;

#[derive(Dlona)]
//~^ ERROR cannot find derive macro `Dlona` in this scope
struct B;

#[derive(attr_proc_macra)]
//~^ ERROR cannot find derive macro `attr_proc_macra` in this scope
struct C;

fn main() {
FooWithLongNama!();
//~^ ERROR cannot find macro `FooWithLongNama!` in this scope

attr_proc_macra!();
//~^ ERROR cannot find macro `attr_proc_macra!` in this scope

Dlona!();
//~^ ERROR cannot find macro `Dlona!` in this scope

bang_proc_macrp!();
//~^ ERROR cannot find macro `bang_proc_macrp!` in this scope
}
2 changes: 2 additions & 0 deletions src/test/ui/cast-to-unsized-trait-object-suggestion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@

fn main() {
&1 as Send;
//~^ ERROR cast to unsized type
Box::new(1) as Send;
//~^ ERROR cast to unsized type
}
4 changes: 2 additions & 2 deletions src/test/ui/cast-to-unsized-trait-object-suggestion.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ error: cast to unsized type: `&{integer}` as `std::marker::Send`
| help: try casting to a reference instead: `&Send`

error: cast to unsized type: `std::boxed::Box<{integer}>` as `std::marker::Send`
--> $DIR/cast-to-unsized-trait-object-suggestion.rs:13:5
--> $DIR/cast-to-unsized-trait-object-suggestion.rs:14:5
|
13 | Box::new(1) as Send;
14 | Box::new(1) as Send;
| ^^^^^^^^^^^^^^^----
| |
| help: try casting to a `Box` instead: `Box<Send>`
Expand Down
1 change: 1 addition & 0 deletions src/test/ui/macros/macro-name-typo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@

fn main() {
printlx!("oh noes!");
//~^ ERROR cannot find macro
}
2 changes: 2 additions & 0 deletions src/test/ui/macros/macro_undefined.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@ mod m {

fn main() {
k!();
//~^ ERROR cannot find macro `k!` in this scope
kl!();
//~^ ERROR cannot find macro `kl!` in this scope
}
4 changes: 2 additions & 2 deletions src/test/ui/macros/macro_undefined.stderr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
error: cannot find macro `kl!` in this scope
--> $DIR/macro_undefined.rs:22:5
--> $DIR/macro_undefined.rs:23:5
|
22 | kl!();
23 | kl!();
| ^^
|
= help: have you added the `#[macro_use]` on the module/import?
Expand Down
54 changes: 27 additions & 27 deletions src/test/ui/resolve-error.stderr
Original file line number Diff line number Diff line change
@@ -1,62 +1,62 @@
error: cannot find derive macro `FooWithLongNan` in this scope
--> $DIR/resolve-error.rs:36:10
--> $DIR/resolve-error.rs:37:10
|
36 | #[derive(FooWithLongNan)]
| ^^^^^^^^^^^^^^ help: did you mean `FooWithLongName`
37 | #[derive(FooWithLongNan)]
| ^^^^^^^^^^^^^^ help: try: `FooWithLongName`

error: cannot find attribute macro `attr_proc_macra` in this scope
--> $DIR/resolve-error.rs:39:3
--> $DIR/resolve-error.rs:41:3
|
39 | #[attr_proc_macra]
| ^^^^^^^^^^^^^^^ help: did you mean `attr_proc_macro`
41 | #[attr_proc_macra]
| ^^^^^^^^^^^^^^^ help: try: `attr_proc_macro`

error: cannot find attribute macro `FooWithLongNan` in this scope
--> $DIR/resolve-error.rs:42:3
--> $DIR/resolve-error.rs:45:3
|
42 | #[FooWithLongNan]
45 | #[FooWithLongNan]
| ^^^^^^^^^^^^^^

error: cannot find derive macro `Dlone` in this scope
--> $DIR/resolve-error.rs:45:10
--> $DIR/resolve-error.rs:49:10
|
45 | #[derive(Dlone)]
| ^^^^^ help: did you mean `Clone`
49 | #[derive(Dlone)]
| ^^^^^ help: try: `Clone`

error: cannot find derive macro `Dlona` in this scope
--> $DIR/resolve-error.rs:48:10
--> $DIR/resolve-error.rs:53:10
|
48 | #[derive(Dlona)]
| ^^^^^ help: did you mean `Clona`
53 | #[derive(Dlona)]
| ^^^^^ help: try: `Clona`

error: cannot find derive macro `attr_proc_macra` in this scope
--> $DIR/resolve-error.rs:51:10
--> $DIR/resolve-error.rs:57:10
|
51 | #[derive(attr_proc_macra)]
57 | #[derive(attr_proc_macra)]
| ^^^^^^^^^^^^^^^

error: cannot find macro `FooWithLongNama!` in this scope
--> $DIR/resolve-error.rs:55:5
--> $DIR/resolve-error.rs:62:5
|
55 | FooWithLongNama!();
| ^^^^^^^^^^^^^^^ help: did you mean `FooWithLongNam!`
62 | FooWithLongNama!();
| ^^^^^^^^^^^^^^^ help: you could try the macro: `FooWithLongNam!`

error: cannot find macro `attr_proc_macra!` in this scope
--> $DIR/resolve-error.rs:57:5
--> $DIR/resolve-error.rs:65:5
|
57 | attr_proc_macra!();
| ^^^^^^^^^^^^^^^ help: did you mean `attr_proc_mac!`
65 | attr_proc_macra!();
| ^^^^^^^^^^^^^^^ help: you could try the macro: `attr_proc_mac!`

error: cannot find macro `Dlona!` in this scope
--> $DIR/resolve-error.rs:59:5
--> $DIR/resolve-error.rs:68:5
|
59 | Dlona!();
68 | Dlona!();
| ^^^^^

error: cannot find macro `bang_proc_macrp!` in this scope
--> $DIR/resolve-error.rs:61:5
--> $DIR/resolve-error.rs:71:5
|
61 | bang_proc_macrp!();
| ^^^^^^^^^^^^^^^ help: did you mean `bang_proc_macro!`
71 | bang_proc_macrp!();
| ^^^^^^^^^^^^^^^ help: you could try the macro: `bang_proc_macro!`

error: aborting due to 10 previous errors

0 comments on commit 1343bc6

Please sign in to comment.