diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-03-09 06:38:51 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-09 06:38:51 +0100 |
| commit | 3ce01f71babbf39c78847f63affd9ffb2298ec17 (patch) | |
| tree | a38668f6952d24e0a158fa20b53e51e1c760705a /compiler/rustc_passes | |
| parent | d365d5eeaf6219a1bf7b10450c6420dc6d64b944 (diff) | |
| parent | 96515f421a9efe88b46091e58533c1bfe875e09e (diff) | |
| download | rust-3ce01f71babbf39c78847f63affd9ffb2298ec17.tar.gz rust-3ce01f71babbf39c78847f63affd9ffb2298ec17.zip | |
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.
Diffstat (limited to 'compiler/rustc_passes')
| -rw-r--r-- | compiler/rustc_passes/src/check_attr.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs index 22020015550..01b12eec628 100644 --- a/compiler/rustc_passes/src/check_attr.rs +++ b/compiler/rustc_passes/src/check_attr.rs @@ -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 |
