1
Fork 0

Turn useless #[unstable] attributes into errors.

This commit is contained in:
Mara Bos 2020-09-10 09:36:17 +02:00
parent 1854f8b3d8
commit e5c645f40e

View file

@ -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 <https://github.com/rust-lang/rust/issues/55436> for more information.",