File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
compiler/rustc_middle/src/ty
src/test/ui/rfc-2632-const-trait-impl Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1054,15 +1054,15 @@ pub fn trivial_const_drop<'tcx>(ty: Ty<'tcx>) -> bool {
10541054 | ty:: RawPtr ( _)
10551055 | ty:: Ref ( ..)
10561056 | ty:: FnDef ( ..)
1057- | ty:: FnPtr ( _) => true ,
1057+ | ty:: FnPtr ( _)
1058+ | ty:: Never => true ,
10581059
10591060 ty:: Opaque ( ..)
10601061 | ty:: Dynamic ( ..)
10611062 | ty:: Error ( _)
10621063 | ty:: Bound ( ..)
10631064 | ty:: Param ( _)
10641065 | ty:: Placeholder ( _)
1065- | ty:: Never
10661066 | ty:: Foreign ( _)
10671067 | ty:: Projection ( _)
10681068 | ty:: Infer ( _) => false ,
Original file line number Diff line number Diff line change 33#![ feature( const_trait_impl) ]
44#![ feature( const_fn_trait_bound) ]
55#![ feature( const_mut_refs) ]
6+ #![ feature( never_type) ]
67#![ cfg_attr( precise, feature( const_precise_live_drops) ) ]
78
89struct S < ' a > ( & ' a mut u8 ) ;
@@ -77,6 +78,7 @@ implements_const_drop! {
7778 & 1 ,
7879 & 1 as * const i32 ,
7980 ConstDropWithBound :: <( ) >,
81+ Result :: <i32 , !>:: Ok ( 1 ) ,
8082}
8183
8284fn main ( ) {
You can’t perform that action at this time.
0 commit comments