about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2019-02-16Reuse the `Pointer` type instead of passing reassembling it at many use sitesOliver Scherer-23/+20
2019-02-16Add a test for const parameter uppercase lintvarkor-0/+27
2019-02-16Don't abort early when collecting const genericsvarkor-4/+19
2019-02-16Check for Const param in collectvarkor-4/+4
2019-02-16Burn some invariants we keep up into codeOliver Scherer-3/+3
2019-02-16Remove an intermediate value from discriminant readingOliver Scherer-3/+3
2019-02-16Expose const -> op functions that don't allow violiting const eval invariantsOliver Scherer-46/+37
2019-02-16Notify myself when Clippy toolstate changesPhilipp Hansch-1/+1
2019-02-16Rollup merge of #58468 - RalfJung:maybe-uninit-split, r=Centrilkennytm-33/+55
split MaybeUninit into several features, expand docs a bit This splits the `maybe_uninit` feature gate into several: * `maybe_uninit` for what we will hopefully stabilize soon-ish. * `maybe_uninit_ref` for creating references into `MaybeUninit`, for which the rules are not yet clear. * `maybe_uninit_slice` for handling slices of `MaybeUninit`, which needs more API design work. * `maybe_uninit_array` for creating arrays of `MaybeUninit` using a macro (because we don't have https://github.com/rust-lang/rust/issues/49147 yet). Is that an okay thing to do? The goal is to help people avoid APIs we do not want to stabilize yet. I used this to make sure rustc itself does not use `get_ref` and `get_mut`. I also extended the docs to advise against uninitialized integers -- again this is something for which the rules are still being discussed.
2019-02-16Rollup merge of #58448 - euclio:missing-summaries, r=QuietMisdreavuskennytm-1/+6
rustdoc: mask `compiler_builtins` docs Fixes #46783. I wasn't able to fully confirm the underlying cause, but my theory is that functions in `compiler_builtins` were overwriting functions with the same names in libcore in the search index. Since the functions in `compiler_builtins` didn't have docs, that's why they weren't appearing in the results. Masking the `compiler_builtins` crate fixes the search results. It appears that this crate was accidentally unmasked in #49503.
2019-02-16Rollup merge of #58440 - gnzlbg:v6, r=japarickennytm-0/+2
Whitelist the ARM v6 target-feature
2019-02-16Rollup merge of #58438 - cuviper:posix_spawn_file_actions_addchdir_np, ↵kennytm-2/+22
r=alexcrichton Use posix_spawn_file_actions_addchdir_np when possible This is a non-POSIX extension implemented in Solaris and in glibc 2.29. With this we can still use `posix_spawn()` when `Command::current_dir()` has been set, otherwise we fallback to `fork(); chdir(); exec()`.
2019-02-16Rollup merge of #58433 - RalfJung:miri-mark-tests, r=TimNNkennytm-79/+150
Update which libcore/liballoc tests Miri ignores, and document why
2019-02-16Rollup merge of #58429 - RalfJung:box, r=TimNNkennytm-3/+8
fix Box::into_unique effecitvely transmuting to a raw ptr Miri/Stacked Borrows treat `Box` specially: they assert that it is unique, and tag it appropriately. However, currently, `Box::into_inner` is not aware of that and returns a raw pointer (wrapped in a `Unique`) that carries the same tag as the box, meaning it carries a `Uniq` tag. This leads to all sorts of problems when people use the raw pointer they get out of the `Unique` type. In the future, it'd be interesting to make `Unique` also carry some kind of uniqueness. In that case, something like this would instead be needed whenever a raw pointer is extracted from a `Unique`. However, that is out-of-scope for the current version of Stacked Borrows. So until then, this changes `into_unique` to perform a proper reference-to-raw-ptr-cast, which clears the tag.
2019-02-16Rollup merge of #58359 - taiki-e:impl_snapshot_for, r=oli-obkkennytm-8/+6
librustc_mir: use ? in impl_snapshot_for! macro
2019-02-16Rollup merge of #58306 - GuillaumeGomez:crate-browser-history, r=QuietMisdreavuskennytm-1/+1
Don't default on std crate when manipulating browser history Fixes #58263. r? @QuietMisdreavus
2019-02-16Rollup merge of #58293 - xfix:patch-16, r=Mark-Simulacrumkennytm-23/+7
Remove code for updating copyright years in generate-deriving-span-tests It's no longer necessary, as there is no license header anymore.
2019-02-16Rollup merge of #58196 - varkor:const-fn-feature-gate-error, r=oli-obkkennytm-103/+352
Add specific feature gate error for const-unstable features Before: ``` error: `impl Trait` in const fn is unstable --> src/lib.rs:7:19 | 7 | const fn foo() -> impl T { | ^^^^^^ error: aborting due to previous error ``` After: ``` error[E0723]: `impl Trait` in const fn is unstable (see issue #57563) --> src/lib.rs:7:19 | 7 | const fn foo() -> impl T { | ^^^^^^ = help: add #![feature(const_fn)] to the crate attributes to enable error: aborting due to previous error ``` This improves the situation with https://github.com/rust-lang/rust/issues/57563. Fixes https://github.com/rust-lang/rust/issues/57544. Fixes https://github.com/rust-lang/rust/issues/54469. r? @oli-obk
2019-02-16Rollup merge of #58074 - scottmcm:stabilize-sort_by_cached_key, r=SimonSapinkennytm-14/+9
Stabilize slice_sort_by_cached_key I was going to ask on the tracking issue (https://github.com/rust-lang/rust/issues/34447), but decided to just send this and hope for an FCP here. The method was added last March by https://github.com/rust-lang/rust/pull/48639. Signature: https://doc.rust-lang.org/std/primitive.slice.html#method.sort_by_cached_key ```rust impl [T] { pub fn sort_by_cached_key<K, F>(&mut self, f: F) where F: FnMut(&T) -> K, K: Ord; } ``` That's an identical signature to the existing `sort_by_key`, so I think the questions are just naming, implementation, and the usual "do we want this?". The implementation seems to have proven its use in rustc at least, which many uses: https://github.com/rust-lang/rust/search?l=Rust&q=sort_by_cached_key (I'm asking because it's exactly what I just needed the other day: ```rust all_positions.sort_by_cached_key(|&n| data::CITIES.iter() .map(|x| *metric_closure.get_edge(n, x.pos).unwrap()) .sum::<usize>() ); ``` since caching that key is a pretty obviously good idea.) Closes #34447
2019-02-16Rollup merge of #57981 - Zoxc:fix-57979, r=nikomatsakiskennytm-1/+60
Fix #57730 cc https://github.com/rust-lang/rust/pull/57730 r? @cramertj
2019-02-15nll: remove `IdentityMap` and `LiveVariableMap`Lucas Molas-97/+41
With `NllLivenessMap` and `LiveVar` removed, the `IdentityMap` (remaining structure implementing the `LiveVariableMap` trait) loses its meaning. Specialize the `LiveVarSet` to a `BitSet<Local>` removing the `V` and related parameters. The `LiveVarSet<V>` was only being used as `LiveVarSet<Local>` so this commit doesn't bring any change to the logic, it just removes an unused parameter (that without `LiveVar` now, it couldn't have been specialized to anything but `Local`).
2019-02-15nll: remove `NllLivenessMap` and `LiveVar`Lucas Molas-117/+71
Extract the `compute` logic (now renamed `compute_live_locals`) from `NllLivenessMap` to the `liveness` module. Remove the unused structures.
2019-02-15nll: remove `NllLivenessMap` from `LocalUseMap`Lucas Molas-33/+52
Extend `LocalUseMap`'s `IndexVec`s that track def/use/drop data to store the original `Local` indexes and not the compacted `LiveVar` ones (favoring speed and code simplicity over space). Remove the `NllLivenessMap` embedded inside it since it's no longer needed to perform the `LiveVar`/`Local` conversion.
2019-02-15nll: remove `NllLivenessMap` from `LivenessContext`Lucas Molas-32/+27
It was used in `compute_for_all_locals` to iterate only the `Local`s that need liveness analysis (filtered through `compute`). Instead, explicitly extract that reduced set (as `live_locals`) in `trace` and pass it to `compute_for_all_locals`. Change the variable type used in `compute_for_all_locals` from `LiveVar` to `Local` and do the same for its helper functions (and the functions in `LocalUseMap` they rely on): * `add_defs_for` -> `LocalUseMap::defs` * `compute_use_live_points_for` -> `LocalUseMap::uses` * `compute_drop_live_points_for` -> `LocalUseMap::drops` Push back the use of `LiveVar` to the `LocalUseMap` (where the other `NllLivenessMap` remains embedded) functions which internally do the `from_local` conversion.
2019-02-15Fix rebase issuevarkor-2/+2
2019-02-15Update testsvarkor-12/+12
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-15Take Const into account with nonstandard style lintvarkor-0/+10
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-15Drive-by cleanupvarkor-20/+10
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-15Take Const into account in HIRvarkor-113/+166
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-15Add E0111varkor-0/+4
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-15Add Const kind to rustdocvarkor-6/+75
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-15Move const generic error from lowering to collectvarkor-16/+28
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-15Add pretty-printing for const genericsvarkor-18/+21
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-15Add Const kind to HIRvarkor-1/+17
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-15Auto merge of #57880 - Zoxc:error-on-cycle, r=michaelwoeristerbors-178/+149
Always emit an error for a query cycle r? @michaelwoerister cc @nikomatsakis @wesleywiser
2019-02-15Fix documentation for std::path::PathBuf::popNathan-2/+1
Closes #58474.
2019-02-15Auto merge of #58406 - Disasm:rv64-support, r=nagisabors-0/+68
Add riscv64{imac,gc}-unknown-none-elf targets Previous attempt by @fintelia: https://github.com/rust-lang/rust/pull/58012 Related: https://github.com/rust-embedded/wg/issues/218
2019-02-15fix tests post-rebaseFelix S. Klock II-14/+14
2019-02-15Fix runtime error in generate-keyword-testsKonrad Borowski-2/+2
The script was made unusable after removing license headers.
2019-02-15make generalization code create new variables in correct universeNiko Matsakis-31/+110
In our type inference system, when we "generalize" a type T to become a suitable value for a type variable V, we sometimes wind up creating new inference variables. So, for example, if we are making V be some subtype of `&'X u32`, then we might instantiate V with `&'Y u32`. This generalized type is then related `&'Y u32 <: &'X u32`, resulting in a region constriant `'Y: 'X`. Previously, however, we were making these fresh variables like `'Y` in the "current universe", but they should be created in the universe of V. Moreover, we sometimes cheat in an invariant context and avoid creating fresh variables if we know the result must be equal -- we can only do that when the universes work out.
2019-02-15include more universe information in `debug!` printoutsNiko Matsakis-5/+17
2019-02-15print more information for closures when `-Zverbose` is givenNiko Matsakis-0/+9
Ideally, we'd probably print the closure substs themselves actually.
2019-02-15Auto merge of #58403 - eddyb:requalify, r=oli-obkbors-579/+851
rustc_mir: split qualify_consts' "value qualification" bitflags into separate computations. Prerequisite for computing those bits through a dataflow algorithm ~~(which I might do in this PR later)~~. This PR should not change behavior overall, other than treating `simd_shuffle*` identically to `#[rustc_args_required_const]` (maybe we should just have `#[rustc_args_required_const]` on the intrinsic imports of `simd_shuffle*`? cc @gnzlbg) cc @oli-obk @alexreg
2019-02-15Fix SECURITY_SQOS_PRESENT missingPaul Dicker-2/+5
if security_qos_flags(SECURITY_ANONYMOUS) is set
2019-02-15compile-pass test for #53606Saleem Jaffer-0/+8
2019-02-15Fix the syntax error in publish_toolstate.pykennytm-3/+3
2019-02-15Remove `stolen`John Kåre Alsaker-4/+0
2019-02-15Always emit an error for a query cycleJohn Kåre Alsaker-178/+153
2019-02-14make Centril happyRalf Jung-3/+3
2019-02-14Whitelist the ARM v8 target-featuregnzlbg-0/+1