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/parser | |
| 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/parser')
| -rw-r--r-- | src/test/ui/parser/macro/pub-item-macro.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/parser/macro/pub-item-macro.stderr | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/test/ui/parser/macro/pub-item-macro.rs b/src/test/ui/parser/macro/pub-item-macro.rs index 7bab8653982..bae90227c62 100644 --- a/src/test/ui/parser/macro/pub-item-macro.rs +++ b/src/test/ui/parser/macro/pub-item-macro.rs @@ -14,5 +14,5 @@ mod foo { } fn main() { - let y: u32 = foo::x; + let y: u32 = foo::x; //~ ERROR static `x` is private } diff --git a/src/test/ui/parser/macro/pub-item-macro.stderr b/src/test/ui/parser/macro/pub-item-macro.stderr index a801986ed4e..fb7a1fce549 100644 --- a/src/test/ui/parser/macro/pub-item-macro.stderr +++ b/src/test/ui/parser/macro/pub-item-macro.stderr @@ -9,5 +9,12 @@ LL | pub_x!(); | = help: try adjusting the macro to put `pub` inside the invocation -error: aborting due to previous error +error[E0603]: static `x` is private + --> $DIR/pub-item-macro.rs:27:23 + | +LL | let y: u32 = foo::x; //~ ERROR static `x` is private + | ^ + +error: aborting due to 2 previous errors +For more information about this error, try `rustc --explain E0603`. |
