Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 17 pull requests #55974

Merged
merged 67 commits into from
Nov 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
8d2af4a
Update to new system calls and enviromental variables
jackpot51 Aug 11, 2018
b400005
Remove unused type parameter
jackpot51 Aug 11, 2018
8c277d8
Don't forget to close executable file
jackpot51 Aug 17, 2018
9d42b1b
Interpret shebangs on redox
jD91mZM2 Oct 15, 2018
91c1b7a
Revert liblibc submodule url
jD91mZM2 Oct 18, 2018
51e2a63
Fix tidy checks
jD91mZM2 Oct 18, 2018
52deb6b
Add link to std::mem::size_of to size_of intrinsic documentation
fhartwig Oct 30, 2018
19aa101
Speed up String::from_utf16
ljedrz Oct 31, 2018
7eece47
Add BufWriter::buffer method
fintelia Oct 19, 2018
07d966d
Add some tests
fintelia Oct 27, 2018
40e4144
Suggested edits
fintelia Nov 1, 2018
59a0309
Fix compile errors in test
fintelia Nov 1, 2018
2d368b5
NetBSD: link libstd with librt in addition to libpthread
jakllsch Sep 25, 2018
ece4f47
For diagnostics, set spans of drops of temps to be that of the statem…
pnkfelix Nov 8, 2018
3011ecd
Narrow span of temp holding the value of a Block expression to the bl…
pnkfelix Nov 8, 2018
556f583
Regression test for issue #54382
pnkfelix Nov 8, 2018
e7e1a52
Refactor code so that block_context observations has nicely named (an…
pnkfelix Nov 8, 2018
dd63982
Revise the temp creation for blocks in `stmt_expr` to setup `BlockTai…
pnkfelix Nov 8, 2018
3977133
Allow unsized types in mem::drop and mem::forget
Nov 8, 2018
06cf9ae
Fix return type of forget intrinsic
Nov 8, 2018
f211581
Use T: ?Sized in intrinsics::forget
Nov 8, 2018
c148714
Rewrite `...` as `..=` as a MachineApplicable 2018 idiom lint
varkor Nov 10, 2018
c63df7c
Use non-short suggestion for parenthesised ..=
varkor Nov 10, 2018
0c6a093
Unix RwLock: avoid racy access to write_locked
RalfJung Nov 11, 2018
db13390
do not skip return code check in release builds
RalfJung Nov 11, 2018
39a0969
Make `NodeId` a `newtype_index` to enable niche optimizations
oli-obk Nov 7, 2018
a1d8926
Turn `HirLocalId` into a `newtype_index`
oli-obk Nov 7, 2018
4bf7c33
Fix rustdoc
oli-obk Nov 8, 2018
4c9ee59
Reintroduce the original debug formatting for NodeIds
oli-obk Nov 8, 2018
e5fd34c
Fix fulldeps test with NodeId
oli-obk Nov 8, 2018
3e5dfdd
Typo nit
oli-obk Nov 9, 2018
2203959
Fix fallout it rustc_driver tests
oli-obk Nov 9, 2018
4d2934e
Add forget_unsized only
Nov 12, 2018
56d3a82
Update docs
Nov 12, 2018
2f7b95d
Change sidebar selector to fix compatibility with docs.rs
cynecx Nov 13, 2018
58a2267
hir: remove an unused hir_vec macro pattern
ljedrz Nov 13, 2018
5ea0e0d
hir: simplify fmt::Debug for hir::Path
ljedrz Nov 13, 2018
3d91929
hir: remove an unused type alias
ljedrz Nov 13, 2018
cf4f5c3
hir: simplify a match expression
ljedrz Nov 13, 2018
4e35cbb
fix various typos in doc comments
euclio Nov 12, 2018
98f61a3
core/benches: Add `char::to_digit()` benchmarks
Turbo87 Nov 13, 2018
04aade8
core/char: Replace condition + `panic!()` with `assert!()`
Turbo87 Nov 13, 2018
17f08fe
core/char: Speed up `to_digit()` for `radix <= 10`
Turbo87 Nov 13, 2018
98dab33
Wrap some query results in `Lrc`.
nnethercote Nov 8, 2018
15e7df8
Remove unneeded newline.
frewsxcv Nov 14, 2018
818257e
Use `Mmap` to open the rmeta file.
nnethercote Oct 31, 2018
64a5172
core/char: Drop `radix == 10` special case
Turbo87 Nov 14, 2018
7843e27
core/char: Add comment to `to_digit()`
Turbo87 Nov 14, 2018
055e7b7
add test for issue #55587
euclio Nov 14, 2018
e2ef0f7
add test for issue #54348
euclio Nov 14, 2018
f4ecc1f
Rollup merge of #55182 - jD91mZM2:rebased, r=alexcrichton
pietroalbini Nov 15, 2018
b20bba4
Rollup merge of #55211 - fintelia:bufwriter-buffer, r=shepmaster
pietroalbini Nov 15, 2018
d7c833b
Rollup merge of #55507 - fhartwig:size_of_intrinsic_docs, r=frewsxcv
pietroalbini Nov 15, 2018
3b40434
Rollup merge of #55530 - ljedrz:speed_up_String_from_utf16, r=SimonSapin
pietroalbini Nov 15, 2018
9c5b8aa
Rollup merge of #55556 - nnethercote:MmapMeta, r=eddyb
pietroalbini Nov 15, 2018
756870a
Rollup merge of #55622 - jakllsch:netbsd-librt, r=alexcrichton
pietroalbini Nov 15, 2018
1d5829d
Rollup merge of #55750 - oli-obk:node_id_x, r=michaelwoerister
pietroalbini Nov 15, 2018
97d0d89
Rollup merge of #55778 - nnethercote:LrcPreds, r=eddyb
pietroalbini Nov 15, 2018
6ca7bc0
Rollup merge of #55781 - pnkfelix:issue-54382-more-precise-spans-for-…
pietroalbini Nov 15, 2018
202724c
Rollup merge of #55785 - stjepang:unsized-drop-forget, r=alexcrichton
pietroalbini Nov 15, 2018
3c7acc7
Rollup merge of #55852 - varkor:dotdotequals-lint, r=zackmdavis
pietroalbini Nov 15, 2018
fb45532
Rollup merge of #55865 - RalfJung:unix-rwlock, r=alexcrichton
pietroalbini Nov 15, 2018
66fcb3c
Rollup merge of #55901 - euclio:speling, r=petrochenkov
pietroalbini Nov 15, 2018
12556a4
Rollup merge of #55926 - cynecx:fix-rustdoc-mobile-css, r=GuillaumeGomez
pietroalbini Nov 15, 2018
c915f92
Rollup merge of #55930 - ljedrz:hir_bonuses, r=cramertj
pietroalbini Nov 15, 2018
f40f04b
Rollup merge of #55932 - Turbo87:to_digit, r=alexcrichton
pietroalbini Nov 15, 2018
d0e08ce
Rollup merge of #55956 - euclio:issue-55587, r=estebank
pietroalbini Nov 15, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2278,12 +2278,14 @@ version = "0.0.0"
dependencies = [
"flate2 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
"memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"proc_macro 0.0.0",
"rustc 0.0.0",
"rustc_data_structures 0.0.0",
"rustc_errors 0.0.0",
"rustc_target 0.0.0",
"serialize 0.0.0",
"stable_deref_trait 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"syntax 0.0.0",
"syntax_ext 0.0.0",
"syntax_pos 0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/liballoc/collections/btree/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ struct LeafNode<K, V> {

/// This node's index into the parent node's `edges` array.
/// `*node.parent.edges[node.parent_idx]` should be the same thing as `node`.
/// This is only guaranteed to be initialized when `parent` is nonnull.
/// This is only guaranteed to be initialized when `parent` is non-null.
parent_idx: MaybeUninit<u16>,

/// The number of keys and values this node stores.
Expand Down
2 changes: 1 addition & 1 deletion src/liballoc/raw_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ use boxed::Box;
/// This enables you to use capacity growing logic catch the overflows in your length
/// that might occur with zero-sized types.
///
/// However this means that you need to be careful when roundtripping this type
/// However this means that you need to be careful when round-tripping this type
/// with a `Box<[T]>`: `cap()` won't yield the len. However `with_capacity`,
/// `shrink_to_fit`, and `from_box` will actually set RawVec's private capacity
/// field. This allows zero-sized types to not be special-cased by consumers of
Expand Down
10 changes: 9 additions & 1 deletion src/liballoc/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,15 @@ impl String {
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
pub fn from_utf16(v: &[u16]) -> Result<String, FromUtf16Error> {
decode_utf16(v.iter().cloned()).collect::<Result<_, _>>().map_err(|_| FromUtf16Error(()))
let mut ret = String::with_capacity(v.len());
for c in decode_utf16(v.iter().cloned()) {
if let Ok(c) = c {
ret.push(c);
} else {
return Err(FromUtf16Error(()));
}
}
Ok(ret)
}

/// Decode a UTF-16 encoded slice `v` into a `String`, replacing
Expand Down
42 changes: 42 additions & 0 deletions src/libcore/benches/char/methods.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use test::Bencher;

const CHARS: [char; 9] = ['0', 'x', '2', '5', 'A', 'f', '7', '8', '9'];
const RADIX: [u32; 5] = [2, 8, 10, 16, 32];

#[bench]
fn bench_to_digit_radix_2(b: &mut Bencher) {
b.iter(|| CHARS.iter().cycle().take(10_000).map(|c| c.to_digit(2)).min())
}

#[bench]
fn bench_to_digit_radix_10(b: &mut Bencher) {
b.iter(|| CHARS.iter().cycle().take(10_000).map(|c| c.to_digit(10)).min())
}

#[bench]
fn bench_to_digit_radix_16(b: &mut Bencher) {
b.iter(|| CHARS.iter().cycle().take(10_000).map(|c| c.to_digit(16)).min())
}

#[bench]
fn bench_to_digit_radix_36(b: &mut Bencher) {
b.iter(|| CHARS.iter().cycle().take(10_000).map(|c| c.to_digit(36)).min())
}

#[bench]
fn bench_to_digit_radix_var(b: &mut Bencher) {
b.iter(|| CHARS.iter().cycle()
.zip(RADIX.iter().cycle())
.take(10_000)
.map(|(c, radix)| c.to_digit(*radix)).min())
}
11 changes: 11 additions & 0 deletions src/libcore/benches/char/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

mod methods;
1 change: 1 addition & 0 deletions src/libcore/benches/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ extern crate core;
extern crate test;

mod any;
mod char;
mod hash;
mod iter;
mod num;
Expand Down
25 changes: 17 additions & 8 deletions src/libcore/char/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,24 @@ impl char {
#[stable(feature = "rust1", since = "1.0.0")]
#[inline]
pub fn to_digit(self, radix: u32) -> Option<u32> {
if radix > 36 {
panic!("to_digit: radix is too high (maximum 36)");
}
let val = match self {
'0' ..= '9' => self as u32 - '0' as u32,
'a' ..= 'z' => self as u32 - 'a' as u32 + 10,
'A' ..= 'Z' => self as u32 - 'A' as u32 + 10,
_ => return None,
assert!(radix <= 36, "to_digit: radix is too high (maximum 36)");

// the code is split up here to improve execution speed for cases where
// the `radix` is constant and 10 or smaller
let val = if radix <= 10 {
match self {
'0' ..= '9' => self as u32 - '0' as u32,
_ => return None,
}
} else {
match self {
'0'..='9' => self as u32 - '0' as u32,
'a'..='z' => self as u32 - 'a' as u32 + 10,
'A'..='Z' => self as u32 - 'A' as u32 + 10,
_ => return None,
}
};

if val < radix { Some(val) }
else { None }
}
Expand Down
7 changes: 7 additions & 0 deletions src/libcore/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,9 @@ extern "rust-intrinsic" {
///
/// More specifically, this is the offset in bytes between successive
/// items of the same type, including alignment padding.
///
/// The stabilized version of this intrinsic is
/// [`std::mem::size_of`](../../std/mem/fn.size_of.html).
pub fn size_of<T>() -> usize;

/// Moves a value to an uninitialized memory location.
Expand Down Expand Up @@ -714,6 +717,10 @@ extern "rust-intrinsic" {
/// initialize memory previous set to the result of `uninit`.
pub fn uninit<T>() -> T;

/// Moves a value out of scope without running drop glue.
#[cfg(not(stage0))]
pub fn forget<T: ?Sized>(_: T);

/// Reinterprets the bits of a value of one type as another type.
///
/// Both types must have the same size. Neither the original, nor the result,
Expand Down
1 change: 1 addition & 0 deletions src/libcore/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
#![feature(staged_api)]
#![feature(stmt_expr_attributes)]
#![feature(unboxed_closures)]
#![feature(unsized_locals)]
#![feature(untagged_unions)]
#![feature(unwind_attributes)]
#![feature(doc_alias)]
Expand Down
13 changes: 13 additions & 0 deletions src/libcore/mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,19 @@ pub fn forget<T>(t: T) {
ManuallyDrop::new(t);
}

/// Like [`forget`], but also accepts unsized values.
///
/// This function is just a shim intended to be removed when the `unsized_locals` feature gets
/// stabilized.
///
/// [`forget`]: fn.forget.html
#[inline]
#[cfg(not(stage0))]
#[unstable(feature = "forget_unsized", issue = "0")]
pub fn forget_unsized<T: ?Sized>(t: T) {
unsafe { intrinsics::forget(t) }
}

/// Returns the size of a type in bytes.
///
/// More specifically, this is the offset in bytes between successive elements
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/num/f32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ impl f32 {
/// signaling NaNs on MIPS are quiet NaNs on x86, and vice-versa.
///
/// Rather than trying to preserve signaling-ness cross-platform, this
/// implementation favours preserving the exact bits. This means that
/// implementation favors preserving the exact bits. This means that
/// any payloads encoded in NaNs will be preserved even if the result of
/// this method is sent over the network from an x86 machine to a MIPS one.
///
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/task/wake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ impl Drop for Waker {
/// is ready to be run.
///
/// This is similar to the `Waker` type, but cannot be sent across threads.
/// Task executors can use this type to implement more optimized singlethreaded wakeup
/// Task executors can use this type to implement more optimized single-threaded wakeup
/// behavior.
#[repr(transparent)]
#[derive(Clone)]
Expand Down
12 changes: 6 additions & 6 deletions src/libproc_macro/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ impl TokenTree {
}
}

/// Prints token treee in a form convenient for debugging.
/// Prints token tree in a form convenient for debugging.
#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
impl fmt::Debug for TokenTree {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
Expand Down Expand Up @@ -730,7 +730,7 @@ impl fmt::Debug for Group {

/// An `Punct` is an single punctuation character like `+`, `-` or `#`.
///
/// Multicharacter operators like `+=` are represented as two instances of `Punct` with different
/// Multi-character operators like `+=` are represented as two instances of `Punct` with different
/// forms of `Spacing` returned.
#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
#[derive(Clone)]
Expand Down Expand Up @@ -788,7 +788,7 @@ impl Punct {

/// Returns the spacing of this punctuation character, indicating whether it's immediately
/// followed by another `Punct` in the token stream, so they can potentially be combined into
/// a multicharacter operator (`Joint`), or it's followed by some other token or whitespace
/// a multi-character operator (`Joint`), or it's followed by some other token or whitespace
/// (`Alone`) so the operator has certainly ended.
#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
pub fn spacing(&self) -> Spacing {
Expand Down Expand Up @@ -947,7 +947,7 @@ macro_rules! suffixed_int_literals {
/// This function will create an integer like `1u32` where the integer
/// value specified is the first part of the token and the integral is
/// also suffixed at the end.
/// Literals created from negative numbers may not survive rountrips through
/// Literals created from negative numbers may not survive round-trips through
/// `TokenStream` or strings and may be broken into two tokens (`-` and positive literal).
///
/// Literals created through this method have the `Span::call_site()`
Expand Down Expand Up @@ -1047,7 +1047,7 @@ impl Literal {

/// Creates a new suffixed floating-point literal.
///
/// This consturctor will create a literal like `1.0f32` where the value
/// This constructor will create a literal like `1.0f32` where the value
/// specified is the preceding part of the token and `f32` is the suffix of
/// the token. This token will always be inferred to be an `f32` in the
/// compiler.
Expand Down Expand Up @@ -1096,7 +1096,7 @@ impl Literal {

/// Creates a new suffixed floating-point literal.
///
/// This consturctor will create a literal like `1.0f64` where the value
/// This constructor will create a literal like `1.0f64` where the value
/// specified is the preceding part of the token and `f64` is the suffix of
/// the token. This token will always be inferred to be an `f64` in the
/// compiler.
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/dep_graph/cgu_reuse_tracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// except according to those terms.

//! Some facilities for tracking how codegen-units are reused during incremental
//! compilition. This is used for incremental compiliation tests and debug
//! compilation. This is used for incremental compilation tests and debug
//! output.

use session::Session;
Expand Down
6 changes: 3 additions & 3 deletions src/librustc/dep_graph/dep_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
use mir::interpret::GlobalId;
use hir::def_id::{CrateNum, DefId, DefIndex, CRATE_DEF_INDEX};
use hir::map::DefPathHash;
use hir::{HirId, ItemLocalId};
use hir::HirId;

use ich::{Fingerprint, StableHashingContext};
use rustc_data_structures::stable_hasher::{StableHasher, HashStable};
Expand Down Expand Up @@ -790,11 +790,11 @@ impl<'a, 'gcx: 'tcx + 'a, 'tcx: 'a> DepNodeParams<'a, 'gcx, 'tcx> for HirId {
fn to_fingerprint(&self, tcx: TyCtxt<'_, '_, '_>) -> Fingerprint {
let HirId {
owner,
local_id: ItemLocalId(local_id),
local_id,
} = *self;

let def_path_hash = tcx.def_path_hash(DefId::local(owner));
let local_id = Fingerprint::from_smaller_hash(local_id as u64);
let local_id = Fingerprint::from_smaller_hash(local_id.as_u32().into());

def_path_hash.0.combine(local_id)
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/hir/def.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub enum NonMacroAttrKind {
Tool,
/// Single-segment custom attribute registered by a derive macro (`#[serde(default)]`).
DeriveHelper,
/// Single-segment custom attriubte registered by a legacy plugin (`register_attribute`).
/// Single-segment custom attribute registered by a legacy plugin (`register_attribute`).
LegacyPluginHelper,
/// Single-segment custom attribute not registered in any way (`#[my_attr]`).
Custom,
Expand Down
5 changes: 2 additions & 3 deletions src/librustc/hir/intravisit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ use hir::map::{self, Map};
use super::itemlikevisit::DeepVisitor;

use std::cmp;
use std::u32;

#[derive(Copy, Clone)]
pub enum FnKind<'a> {
Expand Down Expand Up @@ -1152,8 +1151,8 @@ pub struct IdRange {
impl IdRange {
pub fn max() -> IdRange {
IdRange {
min: NodeId::from_u32(u32::MAX),
max: NodeId::from_u32(u32::MIN),
min: NodeId::MAX,
max: NodeId::from_u32(0),
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/librustc/hir/lowering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ impl<'a> LoweringContext<'a> {
*local_id_counter += 1;
hir::HirId {
owner: def_index,
local_id: hir::ItemLocalId(local_id),
local_id: hir::ItemLocalId::from_u32(local_id),
}
})
}
Expand Down Expand Up @@ -616,7 +616,7 @@ impl<'a> LoweringContext<'a> {

hir::HirId {
owner: def_index,
local_id: hir::ItemLocalId(local_id),
local_id: hir::ItemLocalId::from_u32(local_id),
}
})
}
Expand Down
6 changes: 3 additions & 3 deletions src/librustc/hir/map/hir_id_validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ impl<'a, 'hir: 'a> HirIdValidator<'a, 'hir> {
if max != self.hir_ids_seen.len() - 1 {
// Collect the missing ItemLocalIds
let missing: Vec<_> = (0 .. max as u32 + 1)
.filter(|&i| !self.hir_ids_seen.contains_key(&ItemLocalId(i)))
.filter(|&i| !self.hir_ids_seen.contains_key(&ItemLocalId::from_u32(i)))
.collect();

// Try to map those to something more useful
Expand All @@ -110,7 +110,7 @@ impl<'a, 'hir: 'a> HirIdValidator<'a, 'hir> {
for local_id in missing {
let hir_id = HirId {
owner: owner_def_index,
local_id: ItemLocalId(local_id as u32),
local_id: ItemLocalId::from_u32(local_id),
};

trace!("missing hir id {:#?}", hir_id);
Expand All @@ -124,7 +124,7 @@ impl<'a, 'hir: 'a> HirIdValidator<'a, 'hir> {
.enumerate()
.find(|&(_, &entry)| hir_id == entry)
.expect("no node_to_hir_id entry");
let node_id = NodeId::new(node_id);
let node_id = NodeId::from_usize(node_id);
missing_items.push(format!("[local_id: {}, node:{}]",
local_id,
self.hir_map.node_to_string(node_id)));
Expand Down
Loading