summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/lib.rs
diff options
context:
space:
mode:
authorSantiago Pastorino <spastorino@gmail.com>2024-05-11 11:46:25 +0200
committerSantiago Pastorino <spastorino@gmail.com>2024-05-19 11:10:56 -0300
commit4501ae89f1a442df66e0aeb8f864045d46a98d79 (patch)
treea0d1bf8bf9af187c6120644f93af16c499bd77d9 /compiler/rustc_hir_analysis/src/lib.rs
parent84b9b6d16c9328fa495743638f664f80a7379795 (diff)
downloadrust-4501ae89f1a442df66e0aeb8f864045d46a98d79.tar.gz
rust-4501ae89f1a442df66e0aeb8f864045d46a98d79.zip
Add and use generics.is_empty() and generics.is_own_empty, rather than using generics' attributes
Diffstat (limited to 'compiler/rustc_hir_analysis/src/lib.rs')
-rw-r--r--compiler/rustc_hir_analysis/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_hir_analysis/src/lib.rs b/compiler/rustc_hir_analysis/src/lib.rs
index 654ef4baeb3..d1e50e13894 100644
--- a/compiler/rustc_hir_analysis/src/lib.rs
+++ b/compiler/rustc_hir_analysis/src/lib.rs
@@ -181,7 +181,7 @@ pub fn check_crate(tcx: TyCtxt<'_>) {
         let def_kind = tcx.def_kind(item_def_id);
         match def_kind {
             DefKind::Static { .. } => tcx.ensure().eval_static_initializer(item_def_id),
-            DefKind::Const if tcx.generics_of(item_def_id).own_params.is_empty() => {
+            DefKind::Const if tcx.generics_of(item_def_id).is_empty() => {
                 let instance = ty::Instance::new(item_def_id.into(), ty::GenericArgs::empty());
                 let cid = GlobalId { instance, promoted: None };
                 let param_env = ty::ParamEnv::reveal_all();