about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2024-07-29 14:38:47 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2024-08-13 20:14:57 +0200
commitf1c1c4921637f39e617f3128977773b8ff6b7de0 (patch)
treebe1a522f74ba41c31232460b1a96e1f1601c43e1
parenta708d0bc779afad3b23eea4a323b00d5de7a2fa9 (diff)
downloadrust-f1c1c4921637f39e617f3128977773b8ff6b7de0.tar.gz
rust-f1c1c4921637f39e617f3128977773b8ff6b7de0.zip
Run fmt
-rw-r--r--src/librustdoc/doctest/make.rs3
-rw-r--r--src/librustdoc/doctest/runner.rs4
-rw-r--r--src/librustdoc/doctest/rust.rs3
-rw-r--r--src/librustdoc/doctest/tests.rs3
-rw-r--r--tests/run-make/doctests-keep-binaries-2024/rmake.rs3
-rw-r--r--tests/run-make/doctests-merge/rmake.rs3
6 files changed, 11 insertions, 8 deletions
diff --git a/src/librustdoc/doctest/make.rs b/src/librustdoc/doctest/make.rs
index 1e8e403985b..aed079e5887 100644
--- a/src/librustdoc/doctest/make.rs
+++ b/src/librustdoc/doctest/make.rs
@@ -1,8 +1,6 @@
 //! Logic for transforming the raw code given by the user into something actually
 //! runnable, e.g. by adding a `main` function if it doesn't already exist.
 
-use crate::html::markdown::LangString;
-
 use std::io;
 
 use rustc_ast as ast;
@@ -18,6 +16,7 @@ use rustc_span::symbol::sym;
 use rustc_span::FileName;
 
 use super::GlobalTestOptions;
+use crate::html::markdown::LangString;
 
 /// This struct contains information about the doctest itself which is then used to generate
 /// doctest source code appropriately.
diff --git a/src/librustdoc/doctest/runner.rs b/src/librustdoc/doctest/runner.rs
index b7d9bffb23a..b91333e5f81 100644
--- a/src/librustdoc/doctest/runner.rs
+++ b/src/librustdoc/doctest/runner.rs
@@ -1,8 +1,8 @@
+use std::fmt::Write;
+
 use rustc_data_structures::fx::FxHashSet;
 use rustc_span::edition::Edition;
 
-use std::fmt::Write;
-
 use crate::doctest::{
     run_test, DocTestBuilder, GlobalTestOptions, IndividualTestOptions, RunnableDocTest,
     RustdocOptions, ScrapedDocTest, TestFailure, UnusedExterns,
diff --git a/src/librustdoc/doctest/rust.rs b/src/librustdoc/doctest/rust.rs
index 243fb5d05fd..abd66f15dc0 100644
--- a/src/librustdoc/doctest/rust.rs
+++ b/src/librustdoc/doctest/rust.rs
@@ -15,7 +15,8 @@ use rustc_span::source_map::SourceMap;
 use rustc_span::{BytePos, FileName, Pos, Span, DUMMY_SP};
 
 use super::{DocTestVisitor, ScrapedDocTest};
-use crate::clean::{types::AttributesExt, Attributes};
+use crate::clean::types::AttributesExt;
+use crate::clean::Attributes;
 use crate::html::markdown::{self, ErrorCodes, LangString, MdRelLine};
 
 struct RustCollector {
diff --git a/src/librustdoc/doctest/tests.rs b/src/librustdoc/doctest/tests.rs
index b076b6dccf5..160d0f222b4 100644
--- a/src/librustdoc/doctest/tests.rs
+++ b/src/librustdoc/doctest/tests.rs
@@ -1,8 +1,9 @@
 use std::path::PathBuf;
 
-use super::{DocTestBuilder, GlobalTestOptions};
 use rustc_span::edition::DEFAULT_EDITION;
 
+use super::{DocTestBuilder, GlobalTestOptions};
+
 fn make_test(
     test_code: &str,
     crate_name: Option<&str>,
diff --git a/tests/run-make/doctests-keep-binaries-2024/rmake.rs b/tests/run-make/doctests-keep-binaries-2024/rmake.rs
index a6fddf6d336..791867fa05f 100644
--- a/tests/run-make/doctests-keep-binaries-2024/rmake.rs
+++ b/tests/run-make/doctests-keep-binaries-2024/rmake.rs
@@ -1,9 +1,10 @@
 // Check that valid binaries are persisted by running them, regardless of whether the
 // --run or --no-run option is used.
 
+use std::path::Path;
+
 use run_make_support::fs_wrapper::{create_dir, remove_dir_all};
 use run_make_support::{run, rustc, rustdoc};
-use std::path::Path;
 
 fn setup_test_env<F: FnOnce(&Path, &Path)>(callback: F) {
     let out_dir = Path::new("doctests");
diff --git a/tests/run-make/doctests-merge/rmake.rs b/tests/run-make/doctests-merge/rmake.rs
index ac3951c6ceb..a25da7403e2 100644
--- a/tests/run-make/doctests-merge/rmake.rs
+++ b/tests/run-make/doctests-merge/rmake.rs
@@ -1,6 +1,7 @@
-use run_make_support::{cwd, diff, rustc, rustdoc};
 use std::path::Path;
 
+use run_make_support::{cwd, diff, rustc, rustdoc};
+
 fn test_and_compare(input_file: &str, stdout_file: &str, edition: &str, dep: &Path) {
     let mut cmd = rustdoc();