Rename `subst::Kind` to `subst::GenericArg`
And `subst::UnpackedKind` to `subst::GenericArgKind`. Individual variable names (e.g. `kind`) are not renamed, which would be an infeasible mission.
Fixes https://github.com/rust-lang/rust/issues/64352.
r? @eddyb
reserve `impl<T> From<!> for T`
this is necessary for never-type stabilization.
cc #57012#35121
I think we wanted a crater run for this @nikomatsakis?
r? @nikomatsakis
Update cargo
4 commits in aa6b7e01abce30091cc594cb23a15c46cead6e24..ab6fa8908c9b6c8f7e2249231c395eebfbc49891
2019-09-24 17:19:12 +0000 to 2019-09-25 17:00:56 +0000
- Fix macOS collection of CPU data (rust-lang/cargo#7429)
- Don't ever capture CPU state if timings are disabled (rust-lang/cargo#7428)
- Change build-std to use --sysroot (rust-lang/cargo#7421)
- set -Zmtime_on_use from config or ENV (rust-lang/cargo#7411)
4 commits in aa6b7e01abce30091cc594cb23a15c46cead6e24..ab6fa8908c9b6c8f7e2249231c395eebfbc49891
2019-09-24 17:19:12 +0000 to 2019-09-25 17:00:56 +0000
- Fix macOS collection of CPU data (rust-lang/cargo#7429)
- Don't ever capture CPU state if timings are disabled (rust-lang/cargo#7428)
- Change build-std to use --sysroot (rust-lang/cargo#7421)
- set -Zmtime_on_use from config or ENV (rust-lang/cargo#7411)
Rollup of 6 pull requests
Successful merges:
- #62975 (Almost fully deprecate hir::map::Map.hir_to_node_id)
- #64386 (use `sign` variable in abs and wrapping_abs methods)
- #64508 (or-patterns: Push `PatKind/PatternKind::Or` at top level to HIR & HAIR)
- #64738 (Add const-eval support for SIMD types, insert, and extract)
- #64759 (Refactor mbe a tiny bit)
- #64764 (Master is now 1.40 )
Failed merges:
r? @ghost
or-patterns: Push `PatKind/PatternKind::Or` at top level to HIR & HAIR
Following up on work in https://github.com/rust-lang/rust/pull/64111, https://github.com/rust-lang/rust/pull/63693, and https://github.com/rust-lang/rust/pull/61708, in this PR:
- We change `hair::Arm.patterns: Vec<Pattern<'_>>` into `hir::Arm.pattern: Pattern<'_>`.
- `fn hair::Arm::top_pats_hack` is introduced as a temporary crutch in MIR building to avoid more changes.
- We change `hir::Arm.pats: HirVec<P<Pat>>` into `hir::Arm.pat: P<Pat>`.
- The hacks in `rustc::hir::lowering` are removed since the representation hack is no longer necessary.
- In some places, `fn hir::Arm::top_pats_hack` is introduced to leave some things as future work.
- Misc changes: HIR pretty printing is adjusted to behave uniformly wrt. top/inner levels, rvalue promotion is adjusted, regionck, and dead_code is also.
- Type checking is adjusted to uniformly handle or-patterns at top/inner levels.
To make things compile, `p_0 | ... | p_n` is redefined as a "reference pattern" in [`fn is_non_ref_pat`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_typeck/check/struct.FnCtxt.html#method.is_non_ref_pat) for now. This is done so that reference types are not eagerly stripped from the `expected: Ty<'tcx>`.
- Liveness is adjusted wrt. the `unused_variables` and `unused_assignments` lints to handle top/inner levels uniformly and the handling of `fn` parameters, `let` locals, and `match` arms are unified in this respect. This is not tested for now as exhaustiveness checks are reachable and will ICE.
- In `check_match`, checking `@` and by-move bindings is adjusted. However, exhaustiveness checking is not adjusted the moment and is handled by @dlrobertson in https://github.com/rust-lang/rust/pull/63688.
- AST borrowck (`construct.rs`) is not adjusted as AST borrowck will be removed soon.
r? @matthewjasper
cc @dlrobertson @varkor @oli-obk
use `sign` variable in abs and wrapping_abs methods
This also makes the code easier to understand by hinting at the significance of `self >> ($BITS - 1)`.
Also, now `overflowing_abs` simply uses `wrapping_abs`, which is clearer and avoids a potential performance regression in the LLVM IR.
This PR follows from the discussion from #63786.
r? @eddyb
cc @nikic
Almost fully deprecate hir::map::Map.hir_to_node_id
- HirIdify `doctree::Module.id`
- HirIdify `hir::Crate.modules`
- introduce a `HirId` to `DefIndex` map in `map::Definitions`
The only last uses of `hir::map::Map.hir_to_node_id` in the compiler are:
- for the purposes of `driver::pretty` (in `map::nodes_matching_suffix`), but I don't know if we can remove `NodeId`s in there (I think when I attempted it previously there was some issue due to `HirId` not being representable with an integer)
- in `ty::query::on_disk_cache` (not sure about the purpose of this one)
- in `mir::transform::check_unsafety` (only important for error message order)
Any suggestions how to kill these off?
r? @Zoxc