Allow ~const bounds on inherent impls
This commit is contained in:
parent
146abdd119
commit
f749e05f6b
2 changed files with 24 additions and 1 deletions
|
@ -1655,7 +1655,9 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
|
|||
walk_list!(self, visit_ty, ty);
|
||||
}
|
||||
AssocItemKind::Fn(box FnKind(_, ref sig, ref generics, ref body))
|
||||
if self.in_const_trait_impl || ctxt == AssocCtxt::Trait =>
|
||||
if self.in_const_trait_impl
|
||||
|| ctxt == AssocCtxt::Trait
|
||||
|| matches!(sig.header.constness, Const::Yes(_)) =>
|
||||
{
|
||||
self.visit_vis(&item.vis);
|
||||
self.visit_ident(item.ident);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue