File tree 1 file changed +4
-4
lines changed
compiler/rustc_hir_analysis/src/hir_ty_lowering
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2109,10 +2109,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
2109
2109
) ;
2110
2110
self . lower_const_param ( def_id, hir_id)
2111
2111
}
2112
- Res :: Def (
2113
- DefKind :: Const | DefKind :: Static { .. } | DefKind :: Ctor ( _, CtorKind :: Const ) ,
2114
- did,
2115
- ) => {
2112
+ Res :: Def ( DefKind :: Const | DefKind :: Ctor ( _, CtorKind :: Const ) , did) => {
2116
2113
assert_eq ! ( opt_self_ty, None ) ;
2117
2114
let _ = self . prohibit_generic_args (
2118
2115
path. segments . split_last ( ) . unwrap ( ) . 1 . iter ( ) ,
@@ -2125,6 +2122,9 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
2125
2122
) ;
2126
2123
ty:: Const :: new_unevaluated ( tcx, ty:: UnevaluatedConst :: new ( did, args) )
2127
2124
}
2125
+ Res :: Def ( DefKind :: Static { .. } , _) => {
2126
+ span_bug ! ( span, "use of bare `static` ConstArgKind::Path's not yet supported" )
2127
+ }
2128
2128
// FIXME(const_generics): create real const to allow fn items as const paths
2129
2129
Res :: Def ( DefKind :: Fn | DefKind :: AssocFn , _) => ty:: Const :: new_error_with_message (
2130
2130
tcx,
You can’t perform that action at this time.
0 commit comments