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>) {
255255 }
256256
257257 match bar {
258+ #[ rustfmt:: skip]
258259 Some ( v) => {
259- // this comment prevents rustfmt from collapsing the block
260260 unsafe {
261261 let r = & v as * const i32 ;
262262 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.
179179 --> $DIR/single_match.rs:257:5
180180 |
181181LL | / match bar {
182+ LL | | #[rustfmt::skip]
182183LL | | Some(v) => {
183- LL | | // this comment prevents rustfmt from collapsing the block
184184LL | | unsafe {
185185... |
186186LL | | _ => {},
@@ -190,7 +190,6 @@ LL | | }
190190help: try this
191191 |
192192LL ~ if let Some(v) = bar {
193- LL + // this comment prevents rustfmt from collapsing the block
194193LL + unsafe {
195194LL + let r = &v as *const i32;
196195LL + println!("{}", *r);
Original file line number Diff line number Diff line change @@ -153,8 +153,8 @@ fn issue_10808(bar: Option<i32>) {
153153 }
154154
155155 match bar {
156+ #[ rustfmt:: skip]
156157 Some ( v) => {
157- // this comment prevents rustfmt from collapsing the block
158158 unsafe {
159159 let r = & v as * const i32 ;
160160 println ! ( "{}" , * r) ;
@@ -171,8 +171,8 @@ fn issue_10808(bar: Option<i32>) {
171171 println ! ( "Some" ) ;
172172 println ! ( "{v}" ) ;
173173 } ,
174+ #[ rustfmt:: skip]
174175 None => {
175- // this comment prevents rustfmt from collapsing the block
176176 unsafe {
177177 let v = 0 ;
178178 let r = & v as * const i32 ;
@@ -182,15 +182,15 @@ fn issue_10808(bar: Option<i32>) {
182182 }
183183
184184 match bar {
185+ #[ rustfmt:: skip]
185186 Some ( v) => {
186- // this comment prevents rustfmt from collapsing the block
187187 unsafe {
188188 let r = & v as * const i32 ;
189189 println ! ( "{}" , * r) ;
190190 }
191191 } ,
192+ #[ rustfmt:: skip]
192193 None => {
193- // this comment prevents rustfmt from collapsing the block
194194 unsafe {
195195 let v = 0 ;
196196 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.
175175 --> $DIR/single_match_else.rs:155:5
176176 |
177177LL | / match bar {
178+ LL | | #[rustfmt::skip]
178179LL | | Some(v) => {
179- LL | | // this comment prevents rustfmt from collapsing the block
180180LL | | unsafe {
181181... |
182182LL | | },
@@ -186,7 +186,6 @@ LL | | }
186186help: try this
187187 |
188188LL ~ if let Some(v) = bar {
189- LL + // this comment prevents rustfmt from collapsing the block
190189LL + unsafe {
191190LL + let r = &v as *const i32;
192191LL + println!("{}", *r);
You can’t perform that action at this time.
0 commit comments