File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -778,8 +778,10 @@ fn write_bounds_like_dyn_trait(
778
778
}
779
779
WhereClause :: AliasEq ( alias_eq) if is_fn_trait => {
780
780
is_fn_trait = false ;
781
- write ! ( f, " -> " ) ?;
782
- alias_eq. ty . hir_fmt ( f) ?;
781
+ if !alias_eq. ty . is_unit ( ) {
782
+ write ! ( f, " -> " ) ?;
783
+ alias_eq. ty . hir_fmt ( f) ?;
784
+ }
783
785
}
784
786
WhereClause :: AliasEq ( AliasEq { ty, alias } ) => {
785
787
// in types in actual Rust, these will always come
Original file line number Diff line number Diff line change @@ -3095,16 +3095,16 @@ fn foo() {
3095
3095
478..576 '{ ...&s); }': ()
3096
3096
488..489 's': Option<i32>
3097
3097
492..504 'Option::None': Option<i32>
3098
- 514..515 'f': Box<dyn FnOnce(&Option<i32>) -> () >
3098
+ 514..515 'f': Box<dyn FnOnce(&Option<i32>)>
3099
3099
549..562 'box (|ps| {})': Box<|{unknown}| -> ()>
3100
3100
554..561 '|ps| {}': |{unknown}| -> ()
3101
3101
555..557 'ps': {unknown}
3102
3102
559..561 '{}': ()
3103
- 568..569 'f': Box<dyn FnOnce(&Option<i32>) -> () >
3103
+ 568..569 'f': Box<dyn FnOnce(&Option<i32>)>
3104
3104
568..573 'f(&s)': ()
3105
3105
570..572 '&s': &Option<i32>
3106
3106
571..572 's': Option<i32>
3107
- 549..562: expected Box<dyn FnOnce(&Option<i32>) -> () >, got Box<|{unknown}| -> ()>
3107
+ 549..562: expected Box<dyn FnOnce(&Option<i32>)>, got Box<|{unknown}| -> ()>
3108
3108
"# ] ] ,
3109
3109
) ;
3110
3110
}
You can’t perform that action at this time.
0 commit comments