File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
compiler/rustc_hir_analysis/src/astconv Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -2630,7 +2630,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
26302630 assert_eq ! ( opt_self_ty, None ) ;
26312631 self . prohibit_generics ( path. segments . split_last ( ) . unwrap ( ) . 1 . iter ( ) , |_| { } ) ;
26322632
2633- if let Some ( identity_def_id) = tcx. lang_items ( ) . identity_type ( ) {
2633+ if let Some ( identity_def_id) = tcx. lang_items ( ) . identity_type ( ) && std :: env :: var ( "TEST_WITH_IDENTITY" ) . is_ok ( ) {
26342634 let item_segment = path. segments . split_last ( ) . unwrap ( ) ;
26352635
26362636 let substs = self . ast_path_substs_for_ty ( span, def_id, item_segment. 0 ) ;
Original file line number Diff line number Diff line change @@ -786,11 +786,15 @@ unsafe impl<T: ?Sized> Freeze for &mut T {}
786786/// // becomes:
787787/// type Foo = <Bar as Identity>::Identity;
788788/// ```
789- pub ( crate ) trait Identity : Sized {
789+ #[ stable( feature = "pin" , since = "1.33.0" ) ]
790+ pub trait Identity : Sized {
790791 #[ cfg_attr( not( bootstrap) , lang = "identity" ) ]
792+ #[ stable( feature = "pin" , since = "1.33.0" ) ]
793+ /// lol
791794 type Identity ;
792795}
793796
797+ #[ stable( feature = "pin" , since = "1.33.0" ) ]
794798impl < T > Identity for T {
795799 type Identity = T ;
796800}
You can’t perform that action at this time.
0 commit comments