提交 9af7426b 编写于 作者: S Santiago Pastorino

Make newtype_index macro use full path to resolve constants

上级 c8549a15
......@@ -47,7 +47,7 @@ fn index(self) -> usize { self as usize }
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 @@ fn index(self) -> usize {
}
}
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)
}
}
......
......@@ -19,8 +19,6 @@
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> {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册