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(
1784
1784
} ;
1785
1785
1786
1786
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) ) ,
1788
1788
|c| {
1789
1789
let c = ctx. lower_const ( c, ctx. lower_ty ( & p. ty ) ) ;
1790
1790
c. cast ( Interner )
Original file line number Diff line number Diff line change @@ -480,10 +480,10 @@ impl Generics {
480
480
crate :: to_placeholder_idx ( db, id. into ( ) ) . to_ty ( Interner ) . cast ( Interner )
481
481
}
482
482
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) )
484
484
. cast ( Interner ) ,
485
485
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 )
487
487
}
488
488
} ) ,
489
489
)
Original file line number Diff line number Diff line change @@ -279,7 +279,8 @@ impl flags::AnalysisStats {
279
279
let mut all = 0 ;
280
280
let mut fail = 0 ;
281
281
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 ( ) {
283
284
// Data types with generics don't have layout.
284
285
continue ;
285
286
}
You can’t perform that action at this time.
0 commit comments