Do not allow #[rustc_legacy_const_generics]
on methods
It caused an ICE since `item` was `None`.
This commit is contained in:
parent
38a0b81b1c
commit
96515f421a
3 changed files with 17 additions and 4 deletions
|
@ -1372,7 +1372,7 @@ impl CheckAttrVisitor<'_> {
|
|||
target: Target,
|
||||
item: Option<ItemLike<'_>>,
|
||||
) -> bool {
|
||||
let is_function = matches!(target, Target::Fn | Target::Method(..));
|
||||
let is_function = matches!(target, Target::Fn);
|
||||
if !is_function {
|
||||
self.tcx
|
||||
.sess
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue