diff options
| author | mejrs <> | 2022-10-19 00:08:20 +0200 |
|---|---|---|
| committer | mejrs <> | 2022-10-19 00:08:20 +0200 |
| commit | 406e1dc8ebdeb509515c0c8be7cfe015c5eced30 (patch) | |
| tree | 89007e9a41db189b3228175001218ee04363b205 /src/test | |
| parent | a24a020e6d926dffe6b472fc647978f92269504e (diff) | |
| download | rust-406e1dc8ebdeb509515c0c8be7cfe015c5eced30.tar.gz rust-406e1dc8ebdeb509515c0c8be7cfe015c5eced30.zip | |
Implement -Ztrack-diagnostics
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/track-diagnostics/track.rs | 6 | ||||
| -rw-r--r-- | src/test/ui/track-diagnostics/track.stderr | 26 |
2 files changed, 32 insertions, 0 deletions
diff --git a/src/test/ui/track-diagnostics/track.rs b/src/test/ui/track-diagnostics/track.rs new file mode 100644 index 00000000000..3427c593e85 --- /dev/null +++ b/src/test/ui/track-diagnostics/track.rs @@ -0,0 +1,6 @@ +// compile-flags: -Z track-diagnostics +// error-pattern: created at + +fn main() { + break rust +} diff --git a/src/test/ui/track-diagnostics/track.stderr b/src/test/ui/track-diagnostics/track.stderr new file mode 100644 index 00000000000..83ff935dbab --- /dev/null +++ b/src/test/ui/track-diagnostics/track.stderr @@ -0,0 +1,26 @@ +error[E0425]: cannot find value `rust` in this scope + --> $DIR/track.rs:5:11 + | +LL | break rust + | ^^^^ not found in this scope +-Ztrack-diagnostics: created at compiler/rustc_resolve/src/late/diagnostics.rs:289:28 + +error[E0268]: `break` outside of a loop + --> $DIR/track.rs:5:5 + | +LL | break rust + | ^^^^^^^^^^ cannot `break` outside of a loop +-Ztrack-diagnostics: created at compiler/rustc_passes/src/errors.rs:957:10 + +error: internal compiler error: It looks like you're trying to break rust; would you like some ICE? + +note: the compiler expectedly panicked. this is a feature. + +note: we would appreciate a joke overview: https://github.com/rust-lang/rust/issues/43162#issuecomment-320764675 + +note: rustc 1.66.0-dev running on x86_64-pc-windows-msvc + +error: aborting due to 3 previous errors + +Some errors have detailed explanations: E0268, E0425. +For more information about an error, try `rustc --explain E0268`. |
