about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2019-02-22Auto merge of #56113 - spastorino:erroneous-loop-diagnostic-in-nll, r=pnkfelixbors-194/+361
Erroneous loop diagnostic in nll Closes #53773 r? @nikomatsakis
2019-02-22Auto merge of #58574 - RalfJung:pin, r=Mark-Simulacrumbors-49/+310
improve Pin documentation Incorporates a bunch of the documentation-related comments that came up when discussing `Pin` stabilization. Cc @alexcrichton @withoutboats @cramertj @jonhoo Fixes https://github.com/rust-lang/rust/issues/58130
2019-02-22Auto merge of #58616 - vertexclique:destabilize-fixed-width-atomic-integers, ↵bors-1/+14
r=dtolnay Destabilize fixed-width const defined atomic integers With this PR version 1.34.0 onwards const declarations of atomic integers will be unstable. * Closes https://github.com/rust-lang/rust/issues/58089 * Reverts partially: https://github.com/rust-lang/rust/pull/57425
2019-02-21Optimise vec![false; N] to zero-allocIngvar Stepanyan-0/+1
Nowadays booleans have a well-defined representation, so there is no reason not to optimise their allocation.
2019-02-21take a bit more space for new_unchecked examplesRalf Jung-4/+10
2019-02-21Auto merge of #58592 - nikomatsakis:universe-leak-check, r=aturonbors-372/+1280
Re-implement leak check in terms of universes This PR temporarily restores the leak-check, but implemented in terms of universes. This is not because the leak check behavior was necessarily **correct**, but because (a) we may want to have a transition period and because (b) we want to have more breathing room to work through the full implications of handling higher-ranked types correctly. Note that this PR builds atop https://github.com/rust-lang/rust/pull/58056. Fixes #58451 Fixes #46989 Fixes #57639 r? @aturon cc @arielb1, @lqd ~~Temporary note: I've not finished running `./x.py test` locally -- I'm confident a lot of error messages in tests will need updating. I sort of expect them to revert to the older, (imo) less good error messages, which is mildly unfortunate. There might be a way to preserve the new error messages, not sure.~~
2019-02-21Move the exit block of the match to the endMatthew Jasper-126/+130
2019-02-21Fix error index exampleMatthew Jasper-2/+2
2019-02-21Fix codegen testMatthew Jasper-2/+2
2019-02-21Simplify the cleanup_post_borrowck passesMatthew Jasper-90/+25
2019-02-21Add address stability test for matchesMatthew Jasper-0/+39
2019-02-21Activate two phase borrows on all usesMatthew Jasper-28/+16
Two phase borrows are only used for adjustments now, so there's no need to not activate them for shared borrows.
2019-02-21Use normal mutable borrows in MIR match loweringMatthew Jasper-308/+227
2019-02-21Match discriminant -> scrutineeMatthew Jasper-22/+22
2019-02-21Clean up MIR match loweringMatthew Jasper-804/+838
* Adjust fake borrows to only be live over guards. * Remove unused `slice_len_checked` field. * Split the methods on builder into those for matches and those for all kinds of pattern bindings.
2019-02-21Improve error message and add tests for borrowck match handlingMatthew Jasper-43/+144
2019-02-21Update miri linksPhilipp Hansch-1/+1
Miri has been moved to `rust-lang` a couple of days ago.
2019-02-21partially revert 904a0bde93f0348f69914ee90b1f8b6e4e0d7cbcNiko Matsakis-6/+38
This preserves the error you currently get on stable for the old-lub-glb-object.rs test.
2019-02-21Auto merge of #58584 - ehuss:update-cargo, r=alexcrichtonbors-0/+0
Update cargo 9 commits in 865cb70106a6b1171a500ff68f93ab52eea56e72..b33ce7fc9092962b0657b4c25354984b5e5c47e4 2019-02-10 15:49:37 +0000 to 2019-02-19 18:42:50 +0000 - Don't retry invalid credentials from git credential helpers (rust-lang/cargo#6681) - Fix some typos in resolver tests (rust-lang/cargo#6682) - Add an unstable option to build proc macros for both the host and the target (rust-lang/cargo#6547) - Test cases proving RUSTC_WRAPPER can be a relative path (rust-lang/cargo#6638) - Add support for Azure DevOps (rust-lang/cargo#6264) - Update docs for removed `patch` restriction. (rust-lang/cargo#6663) - Fix incorrect help message (rust-lang/cargo#6555) - Stabilize Alternative Registries (rust-lang/cargo#6654) - Having a [patch] section when publishing is not an error (rust-lang/cargo#6535)
2019-02-21update test files to reflect new outputNiko Matsakis-300/+846
One surprise: old-lub-glb-object.rs, may indicate a bug
2019-02-21restore the actual leak-checkNiko Matsakis-14/+277
2019-02-21introduce a dummy leak check and invoke it in all the right placesNiko Matsakis-39/+105
This set of diffs was produced by combing through b68fad670bb3612cac26e50751e4fd9150e59977 and seeing where the `leak_check` used to be invoked and how.
2019-02-21reintroduce `commit_if_ok` calls to `subtype_predicate`Niko Matsakis-14/+16
2019-02-21reintroduce `commit_if_ok` call into `higher_ranked_sub`Niko Matsakis-26/+25
2019-02-21s/skol_/placeholder_/Niko Matsakis-10/+10
2019-02-21introduce benchmarks of BTreeSet.intersectionStein Somers-0/+89
2019-02-21fix linkRalf Jung-1/+1
2019-02-21remark about the one place where place computation calls size_and_align_ofRalf Jung-2/+4
2019-02-21this is for you, tidyRalf Jung-2/+2
2019-02-21explain unsafeRalf Jung-2/+2
2019-02-21we only list some examples of basic typesRalf Jung-1/+1
2019-02-21tweaks and fix weird spaceRalf Jung-2/+2
2019-02-21Apply suggestions from code reviewMazdak Farrokhzad-39/+42
Co-Authored-By: RalfJung <post@ralfj.de>
2019-02-21codegen and write_metadata can mutate ModuleLLvm.Gabriela Alexandra Moldovan-2/+2
2019-02-21Destabilize fixed-width const defined atomic integersMahmut Bulut-1/+14
* With this PR 1.34.0 onwards const declarations of atomic integers will be unstable.
2019-02-21explain why we use static alignment in ref-to-place conversionRalf Jung-0/+4
2019-02-21Auto merge of #58535 - RalfJung:miri, r=oli-obkbors-14/+14
update miri r? @oli-obk Fixes https://github.com/rust-lang/rust/issues/58558
2019-02-21final pin projections tweakingRalf Jung-27/+23
2019-02-21more pin projections tweakingRalf Jung-10/+17
2019-02-21Enable feature duration_constants in examplesStjepan Glavina-0/+4
2019-02-20Remove braces from most E0505 examplesAlex Gurganus-15/+9
The solution which uses braces to release the borrow before it is moved is only required to satisfy the 2015 edition borrow checker. All other examples give the expected results for both 2015 and 2018 editions.
2019-02-20Allow Self::Module to be mutated.Gabriela Alexandra Moldovan-8/+8
`codegen_allocator` and `write_metadata` mutate the underlying LLVM module. As such, it makes sense for these two functions to receive a mutable reference to the module (as opposed to an immutable one).
2019-02-20Auto merge of #58056 - nikomatsakis:issue-57843-universe-leak, r=pnkfelixbors-50/+150
make generalization code create new variables in correct universe 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. Fixes #57843 r? @pnkfelix
2019-02-20Put Future trait into spotlightStjepan Glavina-0/+1
2019-02-20Add examples for duration constantsStjepan Glavina-0/+32
2019-02-20Fixes #58586: Make E0505 explain example fail for 2018 editionAlex Gurganus-3/+16
2019-02-20expand pinning projectionsRalf Jung-38/+41
2019-02-20Search for target_triple.json only if builtin target not foundgnzlbg-6/+16
Before this commit, if the builtin target was found, but an error happened when instantiating it (e.g. validating the target specification file failed, etc.), then we ignored those errors and proceeded to try to find a `target_triple.json` file, and if that failed, reported that as an error. With this commit, if rustc is supposed to provide the builtin target, and something fails while instantiating it, that error will get properly propagated.
2019-02-20Use standard Read/Write traits in sys::stdioPaul Dicker-75/+114
2019-02-20Address review commentsPaul Dicker-22/+36