File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
compiler/rustc_middle/src/ty Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -2735,6 +2735,8 @@ impl<'tcx> Ty<'tcx> {
27352735 | ty:: Error ( _)
27362736 // Extern types have metadata = ().
27372737 | ty:: Foreign ( ..)
2738+ // `dyn*` has no metadata
2739+ | ty:: Dynamic ( _, _, DynKind :: DynStar )
27382740 // If returned by `struct_tail_without_normalization` this is a unit struct
27392741 // without any fields, or not a struct, and therefore is Sized.
27402742 | ty:: Adt ( ..)
@@ -2743,7 +2745,7 @@ impl<'tcx> Ty<'tcx> {
27432745 | ty:: Tuple ( ..) => ( tcx. types . unit , false ) ,
27442746
27452747 ty:: Str | ty:: Slice ( _) => ( tcx. types . usize , false ) ,
2746- ty:: Dynamic ( .. ) => {
2748+ ty:: Dynamic ( _ , _ , DynKind :: Dyn ) => {
27472749 let dyn_metadata = tcx. require_lang_item ( LangItem :: DynMetadata , None ) ;
27482750 ( tcx. type_of ( dyn_metadata) . instantiate ( tcx, & [ tail. into ( ) ] ) , false )
27492751 } ,
You can’t perform that action at this time.
0 commit comments