HirIdification: add key HirId methods
This is another PR in a series dedicated to `HirId`-ification, i.e. deprecating `ast::NodeId`s after the AST > HIR lowering process. The bigger proof of concept can be seen in #57578.
**Phase 2**: add key `HirId` methods mirroring the `NodeId` ones.
These should be counterparts of the most widely used `Hir` methods using `NodeId`s. Note that this expands `hir::map::Definitions` with an additional `hir_to_def_index` map (with the intention of later removing `node_to_def_index`).
As a bonus there is also a small cleanup commit removing unnecessary calls to `node_to_hir_id` where `HirId` is already available.
r? @Zoxc
Cc @varkor
This change updates the future and task API as discussed in the stabilization RFC at https://github.com/rust-lang/rfcs/pull/2592.
Changes:
- Replacing UnsafeWake with RawWaker and RawWakerVtable
- Removal of LocalWaker
- Removal of Arc-based Wake trait
Transition liballoc to Rust 2018
This transitions liballoc to Rust 2018 edition and applies relevant idiom lints.
I also did a small bit of drive-by cleanup along the way.
r? @oli-obk
I started with liballoc since it seemed easiest. In particular, adding `edition = "2018"` to libcore gave me way too many errors due to stdsimd. Ideally we should be able to continue this crate-by-crate until all crates use 2018.
submodule: update clippy from 6ce78d1 to 3bda5486ce78d1...3bda548
Rustup: unused trim result
Auto merge of #3727 - phansch:rustup_unused_trim, r=matthiaskrgr …
Travis: Don't run integration tests on every PR commit …
Auto merge of #3726 - phansch:some_renaming, r=oli-obk …
Fix ICE in vec_box lint and add run-rustfix …
Make vec_box MachineApplicable
Remove conditionals from base builds …
Adding lint for too many lines.
Updating number of lines for the failing test to be > 100. …
Running util/dev to update README/CHANGELOG
Reworking function logic, and adding doc example. …
Moving tests to ui-toml to make use of clippy.toml
rustfmt
Adding back tests, but also reducing threshold by 1
Updating to just warn for one test.
Fix test broken by removing comment.
Skipping check if in external macro.
Adding lint for too many lines.
Updating number of lines for the failing test to be > 100. …
Moving tests to ui-toml to make use of clippy.toml
rustfmt
Adding back tests, but also reducing threshold by 1
Updating to just warn for one test.
Fix test broken by removing comment.
Changing single character string to a character match.
Updated readme.
Updating code to ignore rustfmt issue.
phansch and avborhanian
Update clippy_lints/src/types.rs …
Update clippy_lints/src/types.rs …
Auto merge of #3732 - phansch:fix_ice_3720, r=oli-obk …
Auto merge of #3731 - phansch:travis, r=phansch …
Auto merge of #2857 - avborhanian:master, r=phansch …
Fix breakage due to rust-lang/rust#58079 …
Auto merge of #3736 - mikerite:fix-build-20190203, r=phansch …
related with: #58024
Update visibility of intermediate use items.
Fixes#57410 and fixes#53925 and fixes#47816.
Currently, the target of a use statement will be updated with
the visibility of the use statement itself (if the use statement was
visible).
This PR ensures that if the path to the target item is via another
use statement then that intermediate use statement will also have the
visibility updated like the target. This silences incorrect
`unreachable_pub` lints with inactionable suggestions.
Fix `std::os::fortanix_sgx::usercalls::raw::UsercallNrs`
It was 0-indexed but should be 1-indexed. This PR just removes the duplicate code and re-exports the internal enum.
Fixes https://github.com/fortanix/rust-sgx/issues/88
r? @joshtriplett
hir: add HirId to main Hir nodes
This is the 1st PR in a series dedicated to `HirId`-ification, i.e. deprecating `ast::NodeId`s after the AST > HIR lowering process. The bigger proof of concept can be seen in https://github.com/rust-lang/rust/pull/57578.
**Phase 1**: store `HirId` in all remaining (some already have it) main HIR nodes (excluding `*Id` objects).
- [x] `Field`
- [x] `FieldPat`
- [x] `ForeignItem`
- [x] `GenericParam`
- [x] `Lifetime`
- [x] `MacroDef`
- [x] `PathSegment`
- [x] `PatKind::Binding`
- [x] `Stmt`
- [x] `StructField`
- [x] `TypeBinding`
- [x] `VariantData`
- [x] `WhereClause`
- [x] `WhereEqPredicate`
r? @Zoxc
Cc @varkor
Currently, the target of a use statement will be updated with
the visibility of the use statement itself (if the use statement was
visible).
This commit ensures that if the path to the target item is via another
use statement then that intermediate use statement will also have the
visibility updated like the target. This silences incorrect
`unreachable_pub` lints with inactionable suggestions.