diff options
| author | Scott Schafer <schaferjscott@gmail.com> | 2025-06-02 23:40:01 -0600 |
|---|---|---|
| committer | Scott Schafer <schaferjscott@gmail.com> | 2025-07-03 07:19:25 -0600 |
| commit | 6bef238b6346911d29a1ee0b067dc003da15f828 (patch) | |
| tree | ac560f56261d7b5bfd3c0bdb285b9609b2fbb9d4 /tests/rustdoc-ui | |
| parent | d6120810e56387730b2e86115471354c8084ca4a (diff) | |
| download | rust-6bef238b6346911d29a1ee0b067dc003da15f828.tar.gz rust-6bef238b6346911d29a1ee0b067dc003da15f828.zip | |
refactor: Make -Ztrack-diagnostics emit like a note
Diffstat (limited to 'tests/rustdoc-ui')
| -rw-r--r-- | tests/rustdoc-ui/track-diagnostics.rs | 6 | ||||
| -rw-r--r-- | tests/rustdoc-ui/track-diagnostics.stderr | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/tests/rustdoc-ui/track-diagnostics.rs b/tests/rustdoc-ui/track-diagnostics.rs index d18d26bf794..f8e710659a5 100644 --- a/tests/rustdoc-ui/track-diagnostics.rs +++ b/tests/rustdoc-ui/track-diagnostics.rs @@ -1,5 +1,4 @@ //@ compile-flags: -Z track-diagnostics -//@ error-pattern: created at // Normalize the emitted location so this doesn't need // updating everytime someone adds or removes a line. @@ -8,4 +7,7 @@ struct A; struct B; -pub const S: A = B; //~ ERROR mismatched types +pub const S: A = B; +//~^ ERROR mismatched types +//~| NOTE created at +//~| NOTE expected `A`, found `B` diff --git a/tests/rustdoc-ui/track-diagnostics.stderr b/tests/rustdoc-ui/track-diagnostics.stderr index fb0d7b86644..a25fd2862aa 100644 --- a/tests/rustdoc-ui/track-diagnostics.stderr +++ b/tests/rustdoc-ui/track-diagnostics.stderr @@ -3,7 +3,8 @@ error[E0308]: mismatched types | LL | pub const S: A = B; | ^ expected `A`, found `B` --Ztrack-diagnostics: created at compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs:LL:CC + | + = note: -Ztrack-diagnostics: created at compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs:LL:CC error: aborting due to 1 previous error |
