From 9af7426b47a99f5f4b06c79d1e294e424eb74a1f Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Thu, 28 Sep 2017 12:30:13 -0300 Subject: Make newtype_index macro use full path to resolve constants --- src/librustc_data_structures/indexed_vec.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/librustc_data_structures') diff --git a/src/librustc_data_structures/indexed_vec.rs b/src/librustc_data_structures/indexed_vec.rs index 7674018075c..01fb2930687 100644 --- a/src/librustc_data_structures/indexed_vec.rs +++ b/src/librustc_data_structures/indexed_vec.rs @@ -47,7 +47,7 @@ macro_rules! newtype_index { impl Idx for $name { fn new(value: usize) -> Self { - assert!(value < (u32::MAX) as usize); + assert!(value < (::std::u32::MAX) as usize); $name(value as u32) } fn index(self) -> usize { @@ -55,8 +55,8 @@ macro_rules! newtype_index { } } - impl Debug for $name { - fn fmt(&self, fmt: &mut Formatter) -> fmt::Result { + impl ::std::fmt::Debug for $name { + fn fmt(&self, fmt: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { write!(fmt, "{}{}", $debug_name, self.0) } } -- cgit 1.4.1-3-g733a5