This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1784,7 +1784,7 @@ pub(crate) fn generic_defaults_query(
17841784 } ;
17851785
17861786 let mut val = p. default . as_ref ( ) . map_or_else (
1787- || unknown_const_as_generic ( db. const_param_ty ( id. into ( ) ) ) ,
1787+ || unknown_const_as_generic ( db. const_param_ty ( id) ) ,
17881788 |c| {
17891789 let c = ctx. lower_const ( c, ctx. lower_ty ( & p. ty ) ) ;
17901790 c. cast ( Interner )
Original file line number Diff line number Diff line change @@ -480,10 +480,10 @@ impl Generics {
480480 crate :: to_placeholder_idx ( db, id. into ( ) ) . to_ty ( Interner ) . cast ( Interner )
481481 }
482482 GenericParamId :: ConstParamId ( id) => crate :: to_placeholder_idx ( db, id. into ( ) )
483- . to_const ( Interner , db. const_param_ty ( id. into ( ) ) )
483+ . to_const ( Interner , db. const_param_ty ( id) )
484484 . cast ( Interner ) ,
485485 GenericParamId :: LifetimeParamId ( id) => {
486- crate :: lt_to_placeholder_idx ( db, id. into ( ) ) . to_lifetime ( Interner ) . cast ( Interner )
486+ crate :: lt_to_placeholder_idx ( db, id) . to_lifetime ( Interner ) . cast ( Interner )
487487 }
488488 } ) ,
489489 )
Original file line number Diff line number Diff line change @@ -279,7 +279,8 @@ impl flags::AnalysisStats {
279279 let mut all = 0 ;
280280 let mut fail = 0 ;
281281 for & a in adts {
282- if db. generic_params ( a. into ( ) ) . iter ( ) . next ( ) . is_some ( ) {
282+ let generic_params = db. generic_params ( a. into ( ) ) ;
283+ if generic_params. iter ( ) . next ( ) . is_some ( ) || generic_params. iter_lt ( ) . next ( ) . is_some ( ) {
283284 // Data types with generics don't have layout.
284285 continue ;
285286 }
You can’t perform that action at this time.
0 commit comments