Add rustfmt::skip to some files

Five of the files being skipped here are because rustfmt is buggy (see
the error messages below). The others have clearly preferable manual
formatting.

    error[internal]: left behind trailing whitespace
      --> tests/fail/validity/transmute_through_ptr.rs:18:18:1
       |
    18 |
       | ^^^^
       |

    warning: rustfmt has failed to format. See previous 1 errors.

    error[internal]: left behind trailing whitespace
      --> tests/fail/stacked_borrows/illegal_read2.rs:10:10:1
       |
    10 |
       | ^^^^
       |

    warning: rustfmt has failed to format. See previous 1 errors.

    error[internal]: left behind trailing whitespace
      --> tests/fail/stacked_borrows/illegal_read5.rs:15:15:1
       |
    15 |
       | ^^^^
       |

    warning: rustfmt has failed to format. See previous 1 errors.

    error[internal]: left behind trailing whitespace
      --> tests/fail/stacked_borrows/illegal_read1.rs:10:10:1
       |
    10 |
       | ^^^^
       |

    warning: rustfmt has failed to format. See previous 1 errors.

    error[internal]: left behind trailing whitespace
     --> tests/fail/erroneous_const2.rs:9:9:1
      |
    9 |
      | ^^^^
      |

    warning: rustfmt has failed to format. See previous 1 errors.
This commit is contained in:
David Tolnay 2022-04-30 11:07:36 -07:00
parent 2baabf796c
commit 817adda794
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
7 changed files with 8 additions and 0 deletions

File diff suppressed because one or more lines are too long

View File

@ -4,6 +4,7 @@
//~^ERROR any use of this value
//~|WARN previously accepted
#[rustfmt::skip] // rustfmt bug: https://github.com/rust-lang/rustfmt/issues/5391
fn main() {
println!("{}", FOO); //~ERROR post-monomorphization error
//~|ERROR evaluation of constant value failed

View File

@ -1,6 +1,7 @@
// A callee may not read the destination of our `&mut` without
// us noticing.
#[rustfmt::skip] // rustfmt bug: https://github.com/rust-lang/rustfmt/issues/5391
fn main() {
let mut x = 15;
let xraw = &mut x as *mut _;

View File

@ -1,6 +1,7 @@
// A callee may not read the destination of our `&mut` without
// us noticing.
#[rustfmt::skip] // rustfmt bug: https://github.com/rust-lang/rustfmt/issues/5391
fn main() {
let mut x = 15;
let xraw = &mut x as *mut _;

View File

@ -5,6 +5,7 @@
use std::cell::RefCell;
use std::{mem, ptr};
#[rustfmt::skip] // rustfmt bug: https://github.com/rust-lang/rustfmt/issues/5391
fn main() {
let rc = RefCell::new(0);
let mut refmut = rc.borrow_mut();

View File

@ -7,6 +7,7 @@ fn evil(x: &mut Bool) {
unsafe { *x = 44; } // out-of-bounds enum tag
}
#[rustfmt::skip] // rustfmt bug: https://github.com/rust-lang/rustfmt/issues/5391
fn main() {
let mut x = Bool::True;
evil(&mut x);

View File

@ -64,6 +64,7 @@ pub enum E1 {
// from the `bool` field of `V1`), overflowing for variants with large enough
// indices (`V3` and `V4`), causing them to be interpreted as other variants.
#[allow(dead_code)]
#[rustfmt::skip] // rustfmt prefers every variant on its own line
pub enum E2<X> {
V1 { f: bool },