Rollup merge of #94686 - ChayimFriedman2:issue-94629, r=jackh726
Do not allow `#[rustc_legacy_const_generics]` on methods It caused an ICE since `item` was `None`. Fixes #94629.
This commit is contained in:
commit
3ce01f71ba
3 changed files with 17 additions and 4 deletions
|
@ -1345,7 +1345,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