diff --git a/compiler/rustc_passes/src/stability.rs b/compiler/rustc_passes/src/stability.rs index d3141c34d0e1..dc82c80d205b 100644 --- a/compiler/rustc_passes/src/stability.rs +++ b/compiler/rustc_passes/src/stability.rs @@ -555,7 +555,7 @@ impl Visitor<'tcx> for Checker<'tcx> { .iter() .find(|a| a.has_name(sym::unstable)) .map_or(item.span, |a| a.span); - self.tcx.sess.span_warn( + self.tcx.sess.span_err( span, "An `#[unstable]` annotation here has no effect. \ See issue #55436 for more information.",