diff options
| author | Gary Guo <gary@garyguo.net> | 2021-10-02 12:59:26 +0100 |
|---|---|---|
| committer | Gary Guo <gary@garyguo.net> | 2021-11-07 03:59:06 +0000 |
| commit | 02c1774cd3e4239c26b67ae78a21a87f4e460fad (patch) | |
| tree | 7deb64813c4b5b61f7f3d0672789f865a2e6707a /compiler/rustc_monomorphize/src | |
| parent | 089a016919b0a9daaed9f676804102d6ba3f8f9d (diff) | |
| download | rust-02c1774cd3e4239c26b67ae78a21a87f4e460fad.tar.gz rust-02c1774cd3e4239c26b67ae78a21a87f4e460fad.zip | |
Give inline const separate DefKind
Diffstat (limited to 'compiler/rustc_monomorphize/src')
| -rw-r--r-- | compiler/rustc_monomorphize/src/polymorphize.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_monomorphize/src/polymorphize.rs b/compiler/rustc_monomorphize/src/polymorphize.rs index e6e4438b6d4..ba62a6eea10 100644 --- a/compiler/rustc_monomorphize/src/polymorphize.rs +++ b/compiler/rustc_monomorphize/src/polymorphize.rs @@ -167,6 +167,7 @@ fn mark_used_by_default_parameters<'tcx>( | DefKind::Use | DefKind::ForeignMod | DefKind::AnonConst + | DefKind::InlineConst | DefKind::OpaqueTy | DefKind::Field | DefKind::LifetimeParam @@ -303,7 +304,7 @@ impl<'a, 'tcx> TypeVisitor<'tcx> for MarkUsedGenericParams<'a, 'tcx> { ControlFlow::CONTINUE } ty::ConstKind::Unevaluated(uv) - if self.tcx.def_kind(uv.def.did) == DefKind::AnonConst => + if matches!(self.tcx.def_kind(uv.def.did), DefKind::AnonConst | DefKind::InlineConst) => { self.visit_child_body(uv.def.did, uv.substs(self.tcx)); ControlFlow::CONTINUE |
