From b54a00accdadc9d98571050888dab701ca7bd2fd Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Wed, 16 Jan 2019 17:55:23 +0100 Subject: allow unused warnings related to rustc_layout_scalar_valid_range_start --- src/libcore/num/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/libcore/num') diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 6827364c0f8..3a3fd27d525 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -47,6 +47,8 @@ assert_eq!(size_of::>(), size_of::<", st #[stable(feature = "nonzero", since = "1.28.0")] #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] #[repr(transparent)] + // FIXME: the rustc_layout_scalar_valid_range_start attr is marked as unused + #[cfg_attr(stage0, allow(unused_attributes))] #[rustc_layout_scalar_valid_range_start(1)] pub struct $Ty($Int); } @@ -68,6 +70,8 @@ assert_eq!(size_of::>(), size_of::<", st #[inline] pub fn new(n: $Int) -> Option { if n != 0 { + // FIXME: this unsafe block is actually needed + #[cfg_attr(stage0, allow(unused_unsafe))] Some(unsafe { $Ty(n) }) } else { None -- cgit 1.4.1-3-g733a5