Skip to content

Commit

Permalink
Run fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Jul 29, 2024
1 parent 4bfc8e7 commit e890807
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
3 changes: 1 addition & 2 deletions src/librustdoc/doctest/make.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/librustdoc/doctest/runner.rs
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
3 changes: 2 additions & 1 deletion src/librustdoc/doctest/rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion src/librustdoc/doctest/tests.rs
Original file line number Diff line number Diff line change
@@ -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>,
Expand Down
3 changes: 2 additions & 1 deletion tests/run-make/doctests-keep-binaries-2024/rmake.rs
Original file line number Diff line number Diff line change
@@ -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");
Expand Down
3 changes: 2 additions & 1 deletion tests/run-make/doctests-merge/rmake.rs
Original file line number Diff line number Diff line change
@@ -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();

Expand Down

0 comments on commit e890807

Please sign in to comment.