about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/ty
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-10-05 09:39:33 +0000
committerMichael Goulet <michael@errs.io>2023-11-25 17:52:43 +0000
commita992defc8b0d7937d0422003984b7b5d3e5f472e (patch)
treed20e70c6d2d1a999597fa7998a28673edb5bc913 /compiler/rustc_middle/src/ty
parentfe3038f263349190f02491d7467198e17ffb0858 (diff)
downloadrust-a992defc8b0d7937d0422003984b7b5d3e5f472e.tar.gz
rust-a992defc8b0d7937d0422003984b7b5d3e5f472e.zip
Remove mir::Const::from_anon_const
Diffstat (limited to 'compiler/rustc_middle/src/ty')
-rw-r--r--compiler/rustc_middle/src/ty/consts.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/ty/consts.rs b/compiler/rustc_middle/src/ty/consts.rs
index 0f5817c78e0..d0a1c943292 100644
--- a/compiler/rustc_middle/src/ty/consts.rs
+++ b/compiler/rustc_middle/src/ty/consts.rs
@@ -216,6 +216,10 @@ impl<'tcx> Const<'tcx> {
             }
         }
 
+        // FIXME(const_generics): We currently have to special case parameters because `min_const_generics`
+        // does not provide the parents generics to anonymous constants. We still allow generic const
+        // parameters by themselves however, e.g. `N`. These constants would cause an ICE if we were to
+        // ever try to substitute the generic parameters in their bodies.
         match expr.kind {
             hir::ExprKind::Path(hir::QPath::Resolved(
                 _,