Skip to content

Commit 702f251

Browse files
authored
Rollup merge of #90412 - jyn514:macro-use, r=camelid
Remove unnecessary `macro_use`s in rustdoc
2 parents e8c897a + b6851ba commit 702f251

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

src/librustdoc/html/render/context.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ use super::{
2222
BASIC_KEYWORDS,
2323
};
2424

25-
use crate::clean;
26-
use crate::clean::ExternalCrate;
25+
use crate::clean::{self, ExternalCrate};
2726
use crate::config::RenderOptions;
2827
use crate::docfs::{DocFS, PathError};
2928
use crate::error::Error;
@@ -35,6 +34,7 @@ use crate::html::format::Buffer;
3534
use crate::html::markdown::{self, plain_text_summary, ErrorCodes, IdMap};
3635
use crate::html::{layout, sources};
3736
use crate::scrape_examples::AllCallLocations;
37+
use crate::try_err;
3838

3939
/// Major driving force in all rustdoc rendering. This contains information
4040
/// about where in the tree-like hierarchy rendering is occurring and controls

src/librustdoc/html/render/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ use crate::html::highlight;
7777
use crate::html::markdown::{HeadingOffset, Markdown, MarkdownHtml, MarkdownSummaryLine};
7878
use crate::html::sources;
7979
use crate::scrape_examples::CallData;
80+
use crate::try_none;
8081

8182
/// A pair of name and its optional document.
8283
crate type NameDoc = (String, Option<String>);

src/librustdoc/html/render/write_shared.rs

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ use crate::config::{EmitType, RenderOptions};
1717
use crate::docfs::PathError;
1818
use crate::error::Error;
1919
use crate::html::{layout, static_files};
20+
use crate::{try_err, try_none};
2021

2122
static FILES_UNVERSIONED: Lazy<FxHashMap<&str, &[u8]>> = Lazy::new(|| {
2223
map! {

src/librustdoc/lib.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -103,17 +103,14 @@ macro_rules! map {
103103
}}
104104
}
105105

106-
#[macro_use]
107-
mod externalfiles;
108-
109106
mod clean;
110107
mod config;
111108
mod core;
112109
mod docfs;
110+
mod doctest;
113111
mod doctree;
114-
#[macro_use]
115112
mod error;
116-
mod doctest;
113+
mod externalfiles;
117114
mod fold;
118115
mod formats;
119116
// used by the error-index generator, so it needs to be public

0 commit comments

Comments
 (0)