@@ -41,7 +41,7 @@ use rustc_index::vec::Idx;
41
41
use rustc_middle:: lint:: LintDiagnosticBuilder ;
42
42
use rustc_middle:: ty:: layout:: { LayoutError , LayoutOf } ;
43
43
use rustc_middle:: ty:: print:: with_no_trimmed_paths;
44
- use rustc_middle:: ty:: subst:: { GenericArgKind , Subst } ;
44
+ use rustc_middle:: ty:: subst:: GenericArgKind ;
45
45
use rustc_middle:: ty:: Instance ;
46
46
use rustc_middle:: ty:: { self , Ty , TyCtxt } ;
47
47
use rustc_session:: lint:: { BuiltinLintDiagnostics , FutureIncompatibilityReason } ;
@@ -2776,7 +2776,7 @@ impl ClashingExternDeclarations {
2776
2776
let mut ty = ty;
2777
2777
loop {
2778
2778
if let ty:: Adt ( def, substs) = * ty. kind ( ) {
2779
- let is_transparent = def. subst ( tcx , substs ) . repr ( ) . transparent ( ) ;
2779
+ let is_transparent = def. repr ( ) . transparent ( ) ;
2780
2780
let is_non_null = crate :: types:: nonnull_optimization_guaranteed ( tcx, def) ;
2781
2781
debug ! (
2782
2782
"non_transparent_ty({:?}) -- type is transparent? {}, type is non-null? {}" ,
@@ -2836,11 +2836,7 @@ impl ClashingExternDeclarations {
2836
2836
2837
2837
ensure_sufficient_stack ( || {
2838
2838
match ( a_kind, b_kind) {
2839
- ( Adt ( a_def, a_substs) , Adt ( b_def, b_substs) ) => {
2840
- let a = a. subst ( cx. tcx , a_substs) ;
2841
- let b = b. subst ( cx. tcx , b_substs) ;
2842
- debug ! ( "Comparing {:?} and {:?}" , a, b) ;
2843
-
2839
+ ( Adt ( a_def, _) , Adt ( b_def, _) ) => {
2844
2840
// We can immediately rule out these types as structurally same if
2845
2841
// their layouts differ.
2846
2842
match compare_layouts ( a, b) {
0 commit comments