提交 d795eb4b 编写于 作者: B bors

Auto merge of #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 https://github.com/rust-lang/rust/pull/75832#discussion_r475275837 (thanks ollie!)

r? @ollie27
...@@ -58,7 +58,8 @@ ...@@ -58,7 +58,8 @@
use crate::mem; use crate::mem;
// These imports are used for simplifying intra-doc links // 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}; use crate::sync::atomic::{self, AtomicBool, AtomicI32, AtomicIsize, AtomicU32, Ordering};
#[stable(feature = "drop_in_place", since = "1.8.0")] #[stable(feature = "drop_in_place", since = "1.8.0")]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册