Initial addition of the Embedded Rust Book
This PR adds the Embedded Rust Book to the bookshelf as a submodule, and adds text for the bookshelf page. I have added a new section after "Master Rust" called "Specialize Rust", with the plan that future domain WG books can also reside here. This now extends the titles down to H3, where formerly only H1 and H2 were used.
The added submodule tracks the master branch of the Embedded WG repo.
If there are additional steps necessary to make this work in CI (perhaps adding this to `src/ci/docker/x86_64-gnu-tools/checktools.sh:32` or so?), please let me know.
CC @steveklabnik @japaric
Also CC issue https://github.com/rust-embedded/wg/issues/257
Some confusion about split popped up at https://news.ycombinator.com/item?id=19080931 since the docs sorta sound like `&str`, `char` and closures are the only types that can be patterns.
cc @steveklabnik
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
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.