From d161d06241af26d13ee22bddbfbd4e0e9c562757 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Mon, 3 Jun 2024 16:03:45 +1000 Subject: [PATCH] rustfmt `tests/run-make-fulldeps/`. Note: I inserted blank lines between the items in `pretty-expanded/input.rs` because it looked better that way. --- rustfmt.toml | 1 - .../hotplug_codegen_backend/the_backend.rs | 9 ++++-- .../pretty-expanded/input.rs | 29 +++++++++++++++---- 3 files changed, 30 insertions(+), 9 deletions(-) diff --git a/rustfmt.toml b/rustfmt.toml index 7cc029d2776df..91abd35d7483d 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -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/", diff --git a/tests/run-make-fulldeps/hotplug_codegen_backend/the_backend.rs b/tests/run-make-fulldeps/hotplug_codegen_backend/the_backend.rs index 28a1e27cccccd..07466440aabf5 100644 --- a/tests/run-make-fulldeps/hotplug_codegen_backend/the_backend.rs +++ b/tests/run-make-fulldeps/hotplug_codegen_backend/the_backend.rs @@ -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, @@ -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() { diff --git a/tests/run-make-fulldeps/pretty-expanded/input.rs b/tests/run-make-fulldeps/pretty-expanded/input.rs index 02b235068a1d2..64ed97572ee97 100644 --- a/tests/run-make-fulldeps/pretty-expanded/input.rs +++ b/tests/run-make-fulldeps/pretty-expanded/input.rs @@ -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), +}