File tree Expand file tree Collapse file tree 4 files changed +7
-9
lines changed Expand file tree Collapse file tree 4 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -255,8 +255,8 @@ fn issue_10808(bar: Option<i32>) {
255
255
}
256
256
257
257
match bar {
258
+ #[ rustfmt:: skip]
258
259
Some ( v) => {
259
- // this comment prevents rustfmt from collapsing the block
260
260
unsafe {
261
261
let r = & v as * const i32 ;
262
262
println ! ( "{}" , * r) ;
Original file line number Diff line number Diff line change @@ -179,8 +179,8 @@ error: you seem to be trying to use `match` for destructuring a single pattern.
179
179
--> $DIR/single_match.rs:257:5
180
180
|
181
181
LL | / match bar {
182
+ LL | | #[rustfmt::skip]
182
183
LL | | Some(v) => {
183
- LL | | // this comment prevents rustfmt from collapsing the block
184
184
LL | | unsafe {
185
185
... |
186
186
LL | | _ => {},
@@ -190,7 +190,6 @@ LL | | }
190
190
help: try this
191
191
|
192
192
LL ~ if let Some(v) = bar {
193
- LL + // this comment prevents rustfmt from collapsing the block
194
193
LL + unsafe {
195
194
LL + let r = &v as *const i32;
196
195
LL + println!("{}", *r);
Original file line number Diff line number Diff line change @@ -153,8 +153,8 @@ fn issue_10808(bar: Option<i32>) {
153
153
}
154
154
155
155
match bar {
156
+ #[ rustfmt:: skip]
156
157
Some ( v) => {
157
- // this comment prevents rustfmt from collapsing the block
158
158
unsafe {
159
159
let r = & v as * const i32 ;
160
160
println ! ( "{}" , * r) ;
@@ -171,8 +171,8 @@ fn issue_10808(bar: Option<i32>) {
171
171
println ! ( "Some" ) ;
172
172
println ! ( "{v}" ) ;
173
173
} ,
174
+ #[ rustfmt:: skip]
174
175
None => {
175
- // this comment prevents rustfmt from collapsing the block
176
176
unsafe {
177
177
let v = 0 ;
178
178
let r = & v as * const i32 ;
@@ -182,15 +182,15 @@ fn issue_10808(bar: Option<i32>) {
182
182
}
183
183
184
184
match bar {
185
+ #[ rustfmt:: skip]
185
186
Some ( v) => {
186
- // this comment prevents rustfmt from collapsing the block
187
187
unsafe {
188
188
let r = & v as * const i32 ;
189
189
println ! ( "{}" , * r) ;
190
190
}
191
191
} ,
192
+ #[ rustfmt:: skip]
192
193
None => {
193
- // this comment prevents rustfmt from collapsing the block
194
194
unsafe {
195
195
let v = 0 ;
196
196
let r = & v as * const i32 ;
Original file line number Diff line number Diff line change @@ -175,8 +175,8 @@ error: you seem to be trying to use `match` for destructuring a single pattern.
175
175
--> $DIR/single_match_else.rs:155:5
176
176
|
177
177
LL | / match bar {
178
+ LL | | #[rustfmt::skip]
178
179
LL | | Some(v) => {
179
- LL | | // this comment prevents rustfmt from collapsing the block
180
180
LL | | unsafe {
181
181
... |
182
182
LL | | },
@@ -186,7 +186,6 @@ LL | | }
186
186
help: try this
187
187
|
188
188
LL ~ if let Some(v) = bar {
189
- LL + // this comment prevents rustfmt from collapsing the block
190
189
LL + unsafe {
191
190
LL + let r = &v as *const i32;
192
191
LL + println!("{}", *r);
You can’t perform that action at this time.
0 commit comments