Skip to content

Commit 9af7426

Browse files
committed
Make newtype_index macro use full path to resolve constants
1 parent c8549a1 commit 9af7426

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/librustc_data_structures/indexed_vec.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,16 @@ macro_rules! newtype_index {
4747

4848
impl Idx for $name {
4949
fn new(value: usize) -> Self {
50-
assert!(value < (u32::MAX) as usize);
50+
assert!(value < (::std::u32::MAX) as usize);
5151
$name(value as u32)
5252
}
5353
fn index(self) -> usize {
5454
self.0 as usize
5555
}
5656
}
5757

58-
impl Debug for $name {
59-
fn fmt(&self, fmt: &mut Formatter) -> fmt::Result {
58+
impl ::std::fmt::Debug for $name {
59+
fn fmt(&self, fmt: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
6060
write!(fmt, "{}{}", $debug_name, self.0)
6161
}
6262
}

src/librustc_mir/transform/nll/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ use rustc::util::nodemap::FxHashSet;
1919
use rustc_data_structures::indexed_vec::{IndexVec, Idx};
2020
use syntax_pos::DUMMY_SP;
2121
use std::collections::HashMap;
22-
use std::fmt::{self, Debug, Formatter};
23-
use std::u32;
2422

2523
#[allow(dead_code)]
2624
struct NLLVisitor<'a, 'gcx: 'a + 'tcx, 'tcx: 'a> {

0 commit comments

Comments
 (0)