Add hard error and migration lint for unsafe attrs

This commit is contained in:
carbotaniuman 2024-06-08 18:39:09 -05:00
parent 33422e72c8
commit a23917cfd0
24 changed files with 473 additions and 53 deletions

View file

@ -1882,7 +1882,7 @@ impl<'a, 'b> InvocationCollector<'a, 'b> {
let mut span: Option<Span> = None;
while let Some(attr) = attrs.next() {
rustc_ast_passes::feature_gate::check_attribute(attr, self.cx.sess, features);
validate_attr::check_attr(&self.cx.sess.psess, attr);
validate_attr::check_attr(features, &self.cx.sess.psess, attr);
let current_span = if let Some(sp) = span { sp.to(attr.span) } else { attr.span };
span = Some(current_span);