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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user