Skip to content

Commit

Permalink
Auto merge of #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 #75832 (comment) (thanks ollie!)

r? @ollie27
  • Loading branch information
bors committed Aug 24, 2020
2 parents c4b6d94 + 5aac94a commit d795eb4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion library/core/src/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ use crate::marker::DiscriminantKind;
use crate::mem;

// These imports are used for simplifying intra-doc links
#[cfg(doc)]
#[allow(unused_imports)]
#[cfg(all(target_has_atomic = "8", target_has_atomic = "32", target_has_atomic = "ptr"))]
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 d795eb4

Please sign in to comment.