From 37b6c249ede0f141a2fcf0332ef11d7cbf68e350 Mon Sep 17 00:00:00 2001 From: Denis Vasilik Date: Fri, 21 Aug 2020 19:19:58 +0200 Subject: [PATCH] Rework imports used solely for docs --- library/core/src/intrinsics.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/library/core/src/intrinsics.rs b/library/core/src/intrinsics.rs index 67cb411effb..eac63bf85c0 100644 --- a/library/core/src/intrinsics.rs +++ b/library/core/src/intrinsics.rs @@ -53,18 +53,13 @@ issue = "none" )] #![allow(missing_docs)] -#![allow(unused_imports)] use crate::marker::DiscriminantKind; use crate::mem; // These imports are used for simplifying intra-doc links -use crate::sync::atomic; -use crate::sync::atomic::AtomicBool; -use crate::sync::atomic::AtomicI32; -use crate::sync::atomic::AtomicIsize; -use crate::sync::atomic::AtomicU32; -use crate::sync::atomic::Ordering; +#[cfg(doc)] +use crate::sync::atomic::{self, AtomicBool, AtomicI32, AtomicIsize, AtomicU32, Ordering}; #[stable(feature = "drop_in_place", since = "1.8.0")] #[rustc_deprecated(