diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2019-10-14 17:20:50 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2020-01-10 11:40:29 -0800 |
| commit | 39c96a0f534366b3970ff0f8cd831be4386961dc (patch) | |
| tree | db76393917ca146591ccf8cc352379061354f95d /src/test/ui/proc-macro | |
| parent | f795e8a216b44982706d41e5cbfa245d13b83fc1 (diff) | |
| download | rust-39c96a0f534366b3970ff0f8cd831be4386961dc.tar.gz rust-39c96a0f534366b3970ff0f8cd831be4386961dc.zip | |
Point at the span for the definition of crate foreign ADTs
Diffstat (limited to 'src/test/ui/proc-macro')
| -rw-r--r-- | src/test/ui/proc-macro/parent-source-spans.stderr | 15 | ||||
| -rw-r--r-- | src/test/ui/proc-macro/resolve-error.stderr | 49 |
2 files changed, 56 insertions, 8 deletions
diff --git a/src/test/ui/proc-macro/parent-source-spans.stderr b/src/test/ui/proc-macro/parent-source-spans.stderr index 3e54a71f0e8..2a36ac78d78 100644 --- a/src/test/ui/proc-macro/parent-source-spans.stderr +++ b/src/test/ui/proc-macro/parent-source-spans.stderr @@ -132,6 +132,11 @@ LL | parent_source_spans!($($tokens)*); ... LL | one!("hello", "world"); | ----------------------- in this macro invocation + | + ::: $SRC_DIR/libcore/result.rs:LL:COL + | +LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T), + | --------------------------------------------------- similarly named tuple variant `Ok` defined here error[E0425]: cannot find value `ok` in this scope --> $DIR/parent-source-spans.rs:28:5 @@ -141,6 +146,11 @@ LL | parent_source_spans!($($tokens)*); ... LL | two!("yay", "rust"); | -------------------- in this macro invocation + | + ::: $SRC_DIR/libcore/result.rs:LL:COL + | +LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T), + | --------------------------------------------------- similarly named tuple variant `Ok` defined here error[E0425]: cannot find value `ok` in this scope --> $DIR/parent-source-spans.rs:28:5 @@ -150,6 +160,11 @@ LL | parent_source_spans!($($tokens)*); ... LL | three!("hip", "hop"); | --------------------- in this macro invocation + | + ::: $SRC_DIR/libcore/result.rs:LL:COL + | +LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T), + | --------------------------------------------------- similarly named tuple variant `Ok` defined here error: aborting due to 21 previous errors diff --git a/src/test/ui/proc-macro/resolve-error.stderr b/src/test/ui/proc-macro/resolve-error.stderr index f7e00ed77d9..4663a8df9da 100644 --- a/src/test/ui/proc-macro/resolve-error.stderr +++ b/src/test/ui/proc-macro/resolve-error.stderr @@ -1,8 +1,15 @@ error: cannot find macro `bang_proc_macrp` in this scope --> $DIR/resolve-error.rs:60:5 | -LL | bang_proc_macrp!(); - | ^^^^^^^^^^^^^^^ help: a macro with a similar name exists: `bang_proc_macro` +LL | bang_proc_macrp!(); + | ^^^^^^^^^^^^^^^ help: a macro with a similar name exists: `bang_proc_macro` + | + ::: $DIR/auxiliary/test-macros.rs:15:1 + | +LL | / pub fn empty(_: TokenStream) -> TokenStream { +LL | | TokenStream::new() +LL | | } + | |_- similarly named macro `bang_proc_macro` defined here error: cannot find macro `Dlona` in this scope --> $DIR/resolve-error.rs:57:5 @@ -53,8 +60,15 @@ LL | #[derive(Dlona)] error: cannot find derive macro `Dlona` in this scope --> $DIR/resolve-error.rs:40:10 | -LL | #[derive(Dlona)] - | ^^^^^ help: a derive macro with a similar name exists: `Clona` +LL | #[derive(Dlona)] + | ^^^^^ help: a derive macro with a similar name exists: `Clona` + | + ::: $DIR/auxiliary/derive-clona.rs:11:1 + | +LL | / pub fn derive_clonea(input: TokenStream) -> TokenStream { +LL | | "".parse().unwrap() +LL | | } + | |_- similarly named derive macro `Clona` defined here error: cannot find derive macro `Dlone` in this scope --> $DIR/resolve-error.rs:35:10 @@ -67,6 +81,11 @@ error: cannot find derive macro `Dlone` in this scope | LL | #[derive(Dlone)] | ^^^^^ help: a derive macro with a similar name exists: `Clone` + | + ::: $SRC_DIR/libcore/clone.rs:LL:COL + | +LL | pub macro Clone($item:item) { /* compiler built-in */ } + | ------------------------------------------------------- similarly named derive macro `Clone` defined here error: cannot find attribute `FooWithLongNan` in this scope --> $DIR/resolve-error.rs:32:3 @@ -77,14 +96,28 @@ LL | #[FooWithLongNan] error: cannot find attribute `attr_proc_macra` in this scope --> $DIR/resolve-error.rs:28:3 | -LL | #[attr_proc_macra] - | ^^^^^^^^^^^^^^^ help: an attribute macro with a similar name exists: `attr_proc_macro` +LL | #[attr_proc_macra] + | ^^^^^^^^^^^^^^^ help: an attribute macro with a similar name exists: `attr_proc_macro` + | + ::: $DIR/auxiliary/test-macros.rs:20:1 + | +LL | / pub fn empty_attr(_: TokenStream, _: TokenStream) -> TokenStream { +LL | | TokenStream::new() +LL | | } + | |_- similarly named attribute macro `attr_proc_macro` defined here error: cannot find derive macro `FooWithLongNan` in this scope --> $DIR/resolve-error.rs:22:10 | -LL | #[derive(FooWithLongNan)] - | ^^^^^^^^^^^^^^ help: a derive macro with a similar name exists: `FooWithLongName` +LL | #[derive(FooWithLongNan)] + | ^^^^^^^^^^^^^^ help: a derive macro with a similar name exists: `FooWithLongName` + | + ::: $DIR/auxiliary/derive-foo.rs:11:1 + | +LL | / pub fn derive_foo(input: TokenStream) -> TokenStream { +LL | | "".parse().unwrap() +LL | | } + | |_- similarly named derive macro `FooWithLongName` defined here error: cannot find derive macro `FooWithLongNan` in this scope --> $DIR/resolve-error.rs:22:10 |
