From e5c645f40e98bfcda81a10929aaaf18dd0a00414 Mon Sep 17 00:00:00 2001 From: Mara Bos Date: Thu, 10 Sep 2020 09:36:17 +0200 Subject: [PATCH] Turn useless #[unstable] attributes into errors. --- compiler/rustc_passes/src/stability.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.",