From 724c1a02e11e3b7d3f18a99bea11d450ebd82c2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Sat, 14 Mar 2026 19:15:56 +0000 Subject: [PATCH] Update rustdoc-ui test --- tests/rustdoc-ui/track-diagnostics.rs | 1 + tests/rustdoc-ui/track-diagnostics.stderr | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/rustdoc-ui/track-diagnostics.rs b/tests/rustdoc-ui/track-diagnostics.rs index f8e710659a5c..6a5d1b53b3c7 100644 --- a/tests/rustdoc-ui/track-diagnostics.rs +++ b/tests/rustdoc-ui/track-diagnostics.rs @@ -11,3 +11,4 @@ //~^ ERROR mismatched types //~| NOTE created at //~| NOTE expected `A`, found `B` +//~| NOTE expected because of the type of the const diff --git a/tests/rustdoc-ui/track-diagnostics.stderr b/tests/rustdoc-ui/track-diagnostics.stderr index a25fd2862aaf..c7dfe07c596f 100644 --- a/tests/rustdoc-ui/track-diagnostics.stderr +++ b/tests/rustdoc-ui/track-diagnostics.stderr @@ -2,7 +2,9 @@ error[E0308]: mismatched types --> $DIR/track-diagnostics.rs:LL:CC | LL | pub const S: A = B; - | ^ expected `A`, found `B` + | - ^ expected `A`, found `B` + | | + | expected because of the type of the constant | = note: -Ztrack-diagnostics: created at compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs:LL:CC