mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-31 17:12:53 +00:00
Use #[rustfmt::skip]
This commit is contained in:
parent
e926148188
commit
9fd34e0c75
@ -255,8 +255,8 @@ fn issue_10808(bar: Option<i32>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
match bar {
|
match bar {
|
||||||
|
#[rustfmt::skip]
|
||||||
Some(v) => {
|
Some(v) => {
|
||||||
// this comment prevents rustfmt from collapsing the block
|
|
||||||
unsafe {
|
unsafe {
|
||||||
let r = &v as *const i32;
|
let r = &v as *const i32;
|
||||||
println!("{}", *r);
|
println!("{}", *r);
|
||||||
|
@ -179,8 +179,8 @@ error: you seem to be trying to use `match` for destructuring a single pattern.
|
|||||||
--> $DIR/single_match.rs:257:5
|
--> $DIR/single_match.rs:257:5
|
||||||
|
|
|
|
||||||
LL | / match bar {
|
LL | / match bar {
|
||||||
|
LL | | #[rustfmt::skip]
|
||||||
LL | | Some(v) => {
|
LL | | Some(v) => {
|
||||||
LL | | // this comment prevents rustfmt from collapsing the block
|
|
||||||
LL | | unsafe {
|
LL | | unsafe {
|
||||||
... |
|
... |
|
||||||
LL | | _ => {},
|
LL | | _ => {},
|
||||||
@ -190,7 +190,6 @@ LL | | }
|
|||||||
help: try this
|
help: try this
|
||||||
|
|
|
|
||||||
LL ~ if let Some(v) = bar {
|
LL ~ if let Some(v) = bar {
|
||||||
LL + // this comment prevents rustfmt from collapsing the block
|
|
||||||
LL + unsafe {
|
LL + unsafe {
|
||||||
LL + let r = &v as *const i32;
|
LL + let r = &v as *const i32;
|
||||||
LL + println!("{}", *r);
|
LL + println!("{}", *r);
|
||||||
|
@ -153,8 +153,8 @@ fn issue_10808(bar: Option<i32>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
match bar {
|
match bar {
|
||||||
|
#[rustfmt::skip]
|
||||||
Some(v) => {
|
Some(v) => {
|
||||||
// this comment prevents rustfmt from collapsing the block
|
|
||||||
unsafe {
|
unsafe {
|
||||||
let r = &v as *const i32;
|
let r = &v as *const i32;
|
||||||
println!("{}", *r);
|
println!("{}", *r);
|
||||||
@ -171,8 +171,8 @@ fn issue_10808(bar: Option<i32>) {
|
|||||||
println!("Some");
|
println!("Some");
|
||||||
println!("{v}");
|
println!("{v}");
|
||||||
},
|
},
|
||||||
|
#[rustfmt::skip]
|
||||||
None => {
|
None => {
|
||||||
// this comment prevents rustfmt from collapsing the block
|
|
||||||
unsafe {
|
unsafe {
|
||||||
let v = 0;
|
let v = 0;
|
||||||
let r = &v as *const i32;
|
let r = &v as *const i32;
|
||||||
@ -182,15 +182,15 @@ fn issue_10808(bar: Option<i32>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
match bar {
|
match bar {
|
||||||
|
#[rustfmt::skip]
|
||||||
Some(v) => {
|
Some(v) => {
|
||||||
// this comment prevents rustfmt from collapsing the block
|
|
||||||
unsafe {
|
unsafe {
|
||||||
let r = &v as *const i32;
|
let r = &v as *const i32;
|
||||||
println!("{}", *r);
|
println!("{}", *r);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
#[rustfmt::skip]
|
||||||
None => {
|
None => {
|
||||||
// this comment prevents rustfmt from collapsing the block
|
|
||||||
unsafe {
|
unsafe {
|
||||||
let v = 0;
|
let v = 0;
|
||||||
let r = &v as *const i32;
|
let r = &v as *const i32;
|
||||||
|
@ -175,8 +175,8 @@ error: you seem to be trying to use `match` for destructuring a single pattern.
|
|||||||
--> $DIR/single_match_else.rs:155:5
|
--> $DIR/single_match_else.rs:155:5
|
||||||
|
|
|
|
||||||
LL | / match bar {
|
LL | / match bar {
|
||||||
|
LL | | #[rustfmt::skip]
|
||||||
LL | | Some(v) => {
|
LL | | Some(v) => {
|
||||||
LL | | // this comment prevents rustfmt from collapsing the block
|
|
||||||
LL | | unsafe {
|
LL | | unsafe {
|
||||||
... |
|
... |
|
||||||
LL | | },
|
LL | | },
|
||||||
@ -186,7 +186,6 @@ LL | | }
|
|||||||
help: try this
|
help: try this
|
||||||
|
|
|
|
||||||
LL ~ if let Some(v) = bar {
|
LL ~ if let Some(v) = bar {
|
||||||
LL + // this comment prevents rustfmt from collapsing the block
|
|
||||||
LL + unsafe {
|
LL + unsafe {
|
||||||
LL + let r = &v as *const i32;
|
LL + let r = &v as *const i32;
|
||||||
LL + println!("{}", *r);
|
LL + println!("{}", *r);
|
||||||
|
Loading…
Reference in New Issue
Block a user