about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorSantiago Pastorino <spastorino@gmail.com>2017-09-28 12:30:13 -0300
committerSantiago Pastorino <spastorino@gmail.com>2017-10-04 23:50:53 -0300
commit9af7426b47a99f5f4b06c79d1e294e424eb74a1f (patch)
treef525c278941f23439928dafb12dfb6eae95b839b /src
parentc8549a158648db323690fbb42356042f6b5d956b (diff)
downloadrust-9af7426b47a99f5f4b06c79d1e294e424eb74a1f.tar.gz
rust-9af7426b47a99f5f4b06c79d1e294e424eb74a1f.zip
Make newtype_index macro use full path to resolve constants
Diffstat (limited to 'src')
-rw-r--r--src/librustc_data_structures/indexed_vec.rs6
-rw-r--r--src/librustc_mir/transform/nll/mod.rs2
2 files changed, 3 insertions, 5 deletions
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)
             }
         }
diff --git a/src/librustc_mir/transform/nll/mod.rs b/src/librustc_mir/transform/nll/mod.rs
index c6acc53f5fa..7ef8e3bdbd5 100644
--- a/src/librustc_mir/transform/nll/mod.rs
+++ b/src/librustc_mir/transform/nll/mod.rs
@@ -19,8 +19,6 @@ use rustc::util::nodemap::FxHashSet;
 use rustc_data_structures::indexed_vec::{IndexVec, Idx};
 use syntax_pos::DUMMY_SP;
 use std::collections::HashMap;
-use std::fmt::{self, Debug, Formatter};
-use std::u32;
 
 #[allow(dead_code)]
 struct NLLVisitor<'a, 'gcx: 'a + 'tcx, 'tcx: 'a> {