File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -552,8 +552,12 @@ impl Rewrite for ast::GenericBound {
552552 ast:: TraitBoundModifier :: MaybeConstMaybe => poly_trait_ref
553553 . rewrite ( context, shape. offset_left ( 8 ) ?)
554554 . map ( |s| format ! ( "~const ?{}" , s) ) ,
555- rustc_ast:: TraitBoundModifier :: Negative
556- | rustc_ast:: TraitBoundModifier :: MaybeConstNegative => None ,
555+ ast:: TraitBoundModifier :: Negative => poly_trait_ref
556+ . rewrite ( context, shape. offset_left ( 1 ) ?)
557+ . map ( |s| format ! ( "!{}" , s) ) ,
558+ ast:: TraitBoundModifier :: MaybeConstNegative => poly_trait_ref
559+ . rewrite ( context, shape. offset_left ( 8 ) ?)
560+ . map ( |s| format ! ( "~const !{}" , s) ) ,
557561 } ;
558562 rewrite. map ( |s| if has_paren { format ! ( "({})" , s) } else { s } )
559563 }
Original file line number Diff line number Diff line change 1+ fn negative ( )
2+ where
3+ i32 : !Copy ,
4+ {
5+ }
6+
7+ fn maybe_const_negative ( )
8+ where
9+ i32 : ~const !Copy ,
10+ {
11+ }
You can’t perform that action at this time.
0 commit comments