File tree 2 files changed +17
-2
lines changed
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 {
552
552
ast:: TraitBoundModifier :: MaybeConstMaybe => poly_trait_ref
553
553
. rewrite ( context, shape. offset_left ( 8 ) ?)
554
554
. 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) ) ,
557
561
} ;
558
562
rewrite. map ( |s| if has_paren { format ! ( "({})" , s) } else { s } )
559
563
}
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