forked from CreepySkeleton/proc-macro-error
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
87 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
extern crate trybuild; | ||
|
||
#[cfg_attr(skip_ui_tests, ignore)] | ||
#[test] | ||
fn ui() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
extern crate test_crate; | ||
|
||
use test_crate::*; | ||
|
||
ok!(it_works); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
extern crate test_crate; | ||
use test_crate::*; | ||
|
||
abort_from!(one, two); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
extern crate test_crate; | ||
use test_crate::*; | ||
|
||
enum NeedDefault { | ||
A, | ||
B | ||
B, | ||
} | ||
|
||
append_dummy!(need_default); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
error: append_dummy test | ||
--> tests/ui/append_dummy.rs:9:15 | ||
--> tests/ui/append_dummy.rs:8:15 | ||
| | ||
9 | append_dummy!(need_default); | ||
8 | append_dummy!(need_default); | ||
| ^^^^^^^^^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
extern crate test_crate; | ||
use test_crate::*; | ||
|
||
children_messages!(one, two, three, four); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,23 @@ | ||
error: proc macro panicked | ||
--> tests/ui/children_messages.rs:4:1 | ||
error: main macro message | ||
--> tests/ui/children_messages.rs:3:20 | ||
| | ||
4 | children_messages!(one, two, three, four); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
3 | children_messages!(one, two, three, four); | ||
| ^^^ | ||
|
||
error: child message | ||
--> tests/ui/children_messages.rs:3:25 | ||
| | ||
= help: message: internal error: entered unreachable code | ||
3 | children_messages!(one, two, three, four); | ||
| ^^^ | ||
|
||
error: main syn::Error | ||
--> tests/ui/children_messages.rs:3:30 | ||
| | ||
3 | children_messages!(one, two, three, four); | ||
| ^^^^^ | ||
|
||
error: child syn::Error | ||
--> tests/ui/children_messages.rs:3:37 | ||
| | ||
3 | children_messages!(one, two, three, four); | ||
| ^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
extern crate test_crate; | ||
use test_crate::*; | ||
|
||
enum NeedDefault { | ||
A, | ||
B | ||
B, | ||
} | ||
|
||
dummy!(need_default); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
error: set_dummy test | ||
--> tests/ui/dummy.rs:9:8 | ||
--> tests/ui/dummy.rs:8:8 | ||
| | ||
9 | dummy!(need_default); | ||
8 | dummy!(need_default); | ||
| ^^^^^^^^^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
extern crate test_crate; | ||
use test_crate::*; | ||
|
||
emit!(one, two, three, four, five); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
extern crate test_crate; | ||
use test_crate::*; | ||
|
||
explicit_span_range!(one, two, three, four); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
error: explicit SpanRange | ||
--> tests/ui/explicit_span_range.rs:4:22 | ||
--> tests/ui/explicit_span_range.rs:3:22 | ||
| | ||
4 | explicit_span_range!(one, two, three, four); | ||
3 | explicit_span_range!(one, two, three, four); | ||
| ^^^^^^^^^^^^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
extern crate proc_macro_error; | ||
use proc_macro_error::abort; | ||
|
||
struct Foo; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
extern crate test_crate; | ||
|
||
#[test_crate::multiple_tokens] | ||
type T = (); | ||
|
||
fn main() {} | ||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
error: ... | ||
--> tests/ui/multiple_tokens.rs:4:1 | ||
--> tests/ui/multiple_tokens.rs:2:1 | ||
| | ||
4 | type T = (); | ||
2 | type T = (); | ||
| ^^^^^^^^^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
extern crate test_crate; | ||
use test_crate::*; | ||
|
||
option_ext!(one, two); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
error: Option::expect_or_abort() test | ||
--> tests/ui/option_ext.rs:4:1 | ||
--> tests/ui/option_ext.rs:3:1 | ||
| | ||
4 | option_ext!(one, two); | ||
3 | option_ext!(one, two); | ||
| ^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: this error originates in the macro `option_ext` (in Nightly builds, run with -Z macro-backtrace for more info) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
extern crate test_crate; | ||
use test_crate::*; | ||
|
||
result_unwrap_or_abort!(one, two); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
error: Result::unwrap_or_abort() test | ||
--> tests/ui/result_ext.rs:4:25 | ||
--> tests/ui/result_ext.rs:3:25 | ||
| | ||
4 | result_unwrap_or_abort!(one, two); | ||
3 | result_unwrap_or_abort!(one, two); | ||
| ^^^ | ||
|
||
error: BOOM: Result::expect_or_abort() test | ||
--> tests/ui/result_ext.rs:5:25 | ||
--> tests/ui/result_ext.rs:4:25 | ||
| | ||
5 | result_expect_or_abort!(one, two); | ||
4 | result_expect_or_abort!(one, two); | ||
| ^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
extern crate test_crate; | ||
use test_crate::*; | ||
|
||
to_tokens_span!(std::option::Option); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
error: whole type | ||
--> tests/ui/to_tokens_span.rs:4:17 | ||
--> tests/ui/to_tokens_span.rs:3:17 | ||
| | ||
4 | to_tokens_span!(std::option::Option); | ||
3 | to_tokens_span!(std::option::Option); | ||
| ^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: explicit .span() | ||
--> tests/ui/to_tokens_span.rs:4:17 | ||
--> tests/ui/to_tokens_span.rs:3:17 | ||
| | ||
4 | to_tokens_span!(std::option::Option); | ||
3 | to_tokens_span!(std::option::Option); | ||
| ^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
extern crate test_crate; | ||
use test_crate::*; | ||
|
||
unrelated_panic!(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
error: proc macro panicked | ||
--> tests/ui/unrelated_panic.rs:4:1 | ||
--> tests/ui/unrelated_panic.rs:3:1 | ||
| | ||
4 | unrelated_panic!(); | ||
3 | unrelated_panic!(); | ||
| ^^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: message: unrelated panic test |