Skip to content

Commit

Permalink
rustfmt tests/run-make-fulldeps/.
Browse files Browse the repository at this point in the history
Note: I inserted blank lines between the items in
`pretty-expanded/input.rs` because it looked better that way.
  • Loading branch information
nnethercote committed Jun 3, 2024
1 parent 5875f3f commit d161d06
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 9 deletions.
1 change: 0 additions & 1 deletion rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 17,6 @@ ignore = [
"/tests/incremental/", # These tests are somewhat sensitive to source code layout.
"/tests/pretty/", # These tests are very sensitive to source code layout.
"/tests/run-make/translation/test.rs", # This test contains syntax errors.
"/tests/run-make-fulldeps/",
"/tests/run-pass-valgrind/",
"/tests/rustdoc/",
"/tests/rustdoc-gui/",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 27,9 @@ use std::any::Any;
struct TheBackend;

impl CodegenBackend for TheBackend {
fn locale_resource(&self) -> &'static str { "" }
fn locale_resource(&self) -> &'static str {
""
}

fn codegen_crate<'a, 'tcx>(
&self,
Expand Down Expand Up @@ -62,7 64,10 @@ impl CodegenBackend for TheBackend {
codegen_results: CodegenResults,
outputs: &OutputFilenames,
) -> Result<(), ErrorGuaranteed> {
use rustc_session::{config::{CrateType, OutFileName}, output::out_filename};
use rustc_session::{
config::{CrateType, OutFileName},
output::out_filename,
};
use std::io::Write;
let crate_name = codegen_results.crate_info.local_crate_name;
for &crate_type in sess.opts.crate_types.iter() {
Expand Down
29 changes: 23 additions & 6 deletions tests/run-make-fulldeps/pretty-expanded/input.rs
Original file line number Diff line number Diff line change
@@ -1,8 1,25 @@
// #13544

#[derive(Debug)] pub struct A;
#[derive(Debug)] pub struct B(isize);
#[derive(Debug)] pub struct C { x: isize }
#[derive(Debug)] pub enum D {}
#[derive(Debug)] pub enum E { y }
#[derive(Debug)] pub enum F { z(isize) }
#[derive(Debug)]
pub struct A;

#[derive(Debug)]
pub struct B(isize);

#[derive(Debug)]
pub struct C {
x: isize,
}

#[derive(Debug)]
pub enum D {}

#[derive(Debug)]
pub enum E {
y,
}

#[derive(Debug)]
pub enum F {
z(isize),
}

0 comments on commit d161d06

Please sign in to comment.