Adjust #[no_mangle]
-related checks and lints for impl
items
This commit is contained in:
parent
c84beefd83
commit
0bb2ea653e
13 changed files with 573 additions and 56 deletions
|
@ -1499,6 +1499,10 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
|
|||
}
|
||||
|
||||
fn visit_assoc_item(&mut self, item: &'a AssocItem, ctxt: AssocCtxt) {
|
||||
if self.session.contains_name(&item.attrs, sym::no_mangle) {
|
||||
self.check_nomangle_item_asciionly(item.ident, item.span);
|
||||
}
|
||||
|
||||
if ctxt == AssocCtxt::Trait || !self.in_trait_impl {
|
||||
self.check_defaultness(item.span, item.kind.defaultness());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue