We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e3f9fa3 commit fae3918Copy full SHA for fae3918
compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs
@@ -2223,7 +2223,9 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
2223
}
2224
// We error when the type contains unsubstituted generics since we do not currently
2225
// give the anon const any of the generics from the parent.
2226
- if anon_const_type.has_non_region_param() {
+ if tcx.features().generic_const_parameter_types()
2227
+ && anon_const_type.has_non_region_param()
2228
+ {
2229
let e = self.dcx().span_err(
2230
const_arg.span(),
2231
"anonymous constants referencing generics are not yet supported",
0 commit comments