File tree 1 file changed +3
-10
lines changed
compiler/rustc_hir_analysis/src/hir_ty_lowering
1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -2262,18 +2262,11 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
2262
2262
_ => None ,
2263
2263
} ;
2264
2264
2265
- if let Some ( lit_input) = lit_input {
2266
- // If an error occurred, ignore that it's a literal and leave reporting the error up to
2267
- // mir.
2268
-
2265
+ lit_input
2269
2266
// Allow the `ty` to be an alias type, though we cannot handle it here, we just go through
2270
2267
// the more expensive anon const code path.
2271
- if !lit_input. ty . has_aliases ( ) {
2272
- return Some ( tcx. at ( expr. span ) . lit_to_const ( lit_input) ) ;
2273
- }
2274
- }
2275
-
2276
- None
2268
+ . filter ( |l| !l. ty . has_aliases ( ) )
2269
+ . map ( |l| tcx. at ( expr. span ) . lit_to_const ( l) )
2277
2270
}
2278
2271
2279
2272
fn lower_delegation_ty ( & self , idx : hir:: InferDelegationKind ) -> Ty < ' tcx > {
You can’t perform that action at this time.
0 commit comments