Skip to content

Commit d795eb4

Browse files
committed
Auto merge of rust-lang#75855 - jyn514:no-cfg-doc, r=ollie27
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
2 parents c4b6d94 + 5aac94a commit d795eb4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

library/core/src/intrinsics.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ use crate::marker::DiscriminantKind;
5858
use crate::mem;
5959

6060
// These imports are used for simplifying intra-doc links
61-
#[cfg(doc)]
61+
#[allow(unused_imports)]
62+
#[cfg(all(target_has_atomic = "8", target_has_atomic = "32", target_has_atomic = "ptr"))]
6263
use crate::sync::atomic::{self, AtomicBool, AtomicI32, AtomicIsize, AtomicU32, Ordering};
6364

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

0 commit comments

Comments
 (0)