File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
compiler/rustc_hir_analysis/src/hir_ty_lowering Expand file tree Collapse file tree 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> + '_ {
21092109 ) ;
21102110 self . lower_const_param ( def_id, hir_id)
21112111 }
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) => {
21162113 assert_eq ! ( opt_self_ty, None ) ;
21172114 let _ = self . prohibit_generic_args (
21182115 path. segments . split_last ( ) . unwrap ( ) . 1 . iter ( ) ,
@@ -2125,6 +2122,9 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
21252122 ) ;
21262123 ty:: Const :: new_unevaluated ( tcx, ty:: UnevaluatedConst :: new ( did, args) )
21272124 }
2125+ Res :: Def ( DefKind :: Static { .. } , _) => {
2126+ span_bug ! ( span, "use of bare `static` ConstArgKind::Path's not yet supported" )
2127+ }
21282128 // FIXME(const_generics): create real const to allow fn items as const paths
21292129 Res :: Def ( DefKind :: Fn | DefKind :: AssocFn , _) => ty:: Const :: new_error_with_message (
21302130 tcx,
You can’t perform that action at this time.
0 commit comments