@@ -41,7 +41,7 @@ use rustc_index::vec::Idx;
41
41
use rustc_middle:: lint:: { in_external_macro, 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 } ;
@@ -2777,7 +2777,7 @@ impl ClashingExternDeclarations {
2777
2777
let mut ty = ty;
2778
2778
loop {
2779
2779
if let ty:: Adt ( def, substs) = * ty. kind ( ) {
2780
- let is_transparent = def. subst ( tcx , substs ) . repr ( ) . transparent ( ) ;
2780
+ let is_transparent = def. repr ( ) . transparent ( ) ;
2781
2781
let is_non_null = crate :: types:: nonnull_optimization_guaranteed ( tcx, def) ;
2782
2782
debug ! (
2783
2783
"non_transparent_ty({:?}) -- type is transparent? {}, type is non-null? {}" ,
@@ -2837,11 +2837,7 @@ impl ClashingExternDeclarations {
2837
2837
2838
2838
ensure_sufficient_stack ( || {
2839
2839
match ( a_kind, b_kind) {
2840
- ( Adt ( a_def, a_substs) , Adt ( b_def, b_substs) ) => {
2841
- let a = a. subst ( cx. tcx , a_substs) ;
2842
- let b = b. subst ( cx. tcx , b_substs) ;
2843
- debug ! ( "Comparing {:?} and {:?}" , a, b) ;
2844
-
2840
+ ( Adt ( a_def, _) , Adt ( b_def, _) ) => {
2845
2841
// We can immediately rule out these types as structurally same if
2846
2842
// their layouts differ.
2847
2843
match compare_layouts ( a, b) {
0 commit comments