Skip to content

Commit

Permalink
Rollup merge of rust-lang#75855 - jyn514:no-cfg-doc, r=ollie27
Browse files Browse the repository at this point in the history
Use allow(unused_imports) instead of cfg(doc) for imports used only for intra-doc links

This prevents links from breaking when items are re-exported in a
different crate and the original isn't being documented.

Spotted in rust-lang#75832 (comment) (thanks ollie!)

r? @ollie27
  • Loading branch information
JohnTitor authored Aug 24, 2020
2 parents b393873 + 602dd14 commit 30e7430
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/core/src/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ use crate::marker::DiscriminantKind;
use crate::mem;

// These imports are used for simplifying intra-doc links
#[cfg(doc)]
#[allow(unused_imports)]
use crate::sync::atomic::{self, AtomicBool, AtomicI32, AtomicIsize, AtomicU32, Ordering};

#[stable(feature = "drop_in_place", since = "1.8.0")]
Expand Down

0 comments on commit 30e7430

Please sign in to comment.