]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_passes/src/check_attr.rs
Rollup merge of #94686 - ChayimFriedman2:issue-94629, r=jackh726
[rust.git] / compiler / rustc_passes / src / check_attr.rs
index 2202001555084523b9afc39c584b15447409a7b8..01b12eec628ec074877dc828802fdd3fea137f7b 100644 (file)
@@ -1345,7 +1345,7 @@ fn check_rustc_legacy_const_generics(
         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