diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-12-16 20:23:27 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-12-27 15:51:36 +0300 |
| commit | fff01ccfa805ccef67827bf1ea84e21d61d13e6f (patch) | |
| tree | 9ef9748b8f3257c362077a8b3a6c421ae851d020 /src/test/ui/tuple/tuple-struct-fields | |
| parent | a5c52c72ae3c1d8b3896756541b115a1d5ea94b7 (diff) | |
| download | rust-fff01ccfa805ccef67827bf1ea84e21d61d13e6f.tar.gz rust-fff01ccfa805ccef67827bf1ea84e21d61d13e6f.zip | |
Do not abort compilation if expansion produces errors
Fix a number of uncovered deficiencies in diagnostics
Diffstat (limited to 'src/test/ui/tuple/tuple-struct-fields')
| -rw-r--r-- | src/test/ui/tuple/tuple-struct-fields/test2.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/tuple/tuple-struct-fields/test2.stderr | 11 | ||||
| -rw-r--r-- | src/test/ui/tuple/tuple-struct-fields/test3.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/tuple/tuple-struct-fields/test3.stderr | 11 |
4 files changed, 24 insertions, 6 deletions
diff --git a/src/test/ui/tuple/tuple-struct-fields/test2.rs b/src/test/ui/tuple/tuple-struct-fields/test2.rs index 7c8e9bbb23c..fc0f78b12c9 100644 --- a/src/test/ui/tuple/tuple-struct-fields/test2.rs +++ b/src/test/ui/tuple/tuple-struct-fields/test2.rs @@ -8,5 +8,7 @@ macro_rules! define_struct { } mod foo { - define_struct! { (foo) } + define_struct! { (foo) } //~ ERROR cannot find type `foo` in this scope } + +fn main() {} diff --git a/src/test/ui/tuple/tuple-struct-fields/test2.stderr b/src/test/ui/tuple/tuple-struct-fields/test2.stderr index 9aba84046a1..baca625b0bd 100644 --- a/src/test/ui/tuple/tuple-struct-fields/test2.stderr +++ b/src/test/ui/tuple/tuple-struct-fields/test2.stderr @@ -4,8 +4,15 @@ error: expected one of `)` or `,`, found `(` LL | struct S3(pub $t ()); | ^ expected one of `)` or `,` here ... -LL | define_struct! { (foo) } +LL | define_struct! { (foo) } //~ ERROR cannot find type `foo` in this scope | ------------------------ in this macro invocation -error: aborting due to previous error +error[E0412]: cannot find type `foo` in this scope + --> $DIR/test2.rs:21:23 + | +LL | define_struct! { (foo) } //~ ERROR cannot find type `foo` in this scope + | ^^^ not found in this scope + +error: aborting due to 2 previous errors +For more information about this error, try `rustc --explain E0412`. diff --git a/src/test/ui/tuple/tuple-struct-fields/test3.rs b/src/test/ui/tuple/tuple-struct-fields/test3.rs index 8d7c7c35caf..6b8534b4524 100644 --- a/src/test/ui/tuple/tuple-struct-fields/test3.rs +++ b/src/test/ui/tuple/tuple-struct-fields/test3.rs @@ -8,5 +8,7 @@ macro_rules! define_struct { } mod foo { - define_struct! { foo } + define_struct! { foo } //~ ERROR cannot find type `foo` in this scope } + +fn main() {} diff --git a/src/test/ui/tuple/tuple-struct-fields/test3.stderr b/src/test/ui/tuple/tuple-struct-fields/test3.stderr index fc71354a9d6..2da34fff53d 100644 --- a/src/test/ui/tuple/tuple-struct-fields/test3.stderr +++ b/src/test/ui/tuple/tuple-struct-fields/test3.stderr @@ -4,8 +4,15 @@ error: expected one of `)` or `,`, found `(` LL | struct S3(pub($t) ()); | ^ expected one of `)` or `,` here ... -LL | define_struct! { foo } +LL | define_struct! { foo } //~ ERROR cannot find type `foo` in this scope | ---------------------- in this macro invocation -error: aborting due to previous error +error[E0412]: cannot find type `foo` in this scope + --> $DIR/test3.rs:21:22 + | +LL | define_struct! { foo } //~ ERROR cannot find type `foo` in this scope + | ^^^ not found in this scope + +error: aborting due to 2 previous errors +For more information about this error, try `rustc --explain E0412`. |
