about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2019-02-27Mention `unwind(aborts)` in diagnostics for `#[unwind]`Vadim Petrochenkov-0/+51
Simplify input validation for `#[unwind]`, add tests
2019-02-25Auto merge of #57367 - petrochenkov:unrestab, r=Centrilbors-70/+86
Stabilize `unrestricted_attribute_tokens` In accordance with a plan described in https://internals.rust-lang.org/t/unrestricted-attribute-tokens-feature-status/8561/3. Delimited non-macro non-builtin attributes now support the same syntax as macro attributes: ``` PATH PATH `(` TOKEN_STREAM `)` PATH `[` TOKEN_STREAM `]` PATH `{` TOKEN_STREAM `}` ``` Such attributes mostly serve as inert proc macro helpers or tool attributes. To some extent these attributes are de-facto stable due to a hole in feature gate checking (feature gating is done too late - after macro expansion.) So if macro *removes* such helper attributes during expansion (and it must remove them, unless it's a derive macro), then the code will work on stable. Key-value non-macro non-builtin attributes are now restricted to bare minimum required to support what we support on stable - unsuffixed literals (https://github.com/rust-lang/rust/issues/34981). ``` PATH `=` LITERAL ``` (Key-value macro attributes are not supported at all right now.) Crater run in https://github.com/rust-lang/rust/pull/57321 found no regressions for this change. There are multiple possible ways to extend key-value attributes (https://github.com/rust-lang/rust/pull/57321#issuecomment-451574065), but I'd expect an RFC for that and it's not a pressing enough issue to block stabilization of delimited attributes. Built-in attributes are still restricted to the "classic" meta-item syntax, nothing changes here. https://github.com/rust-lang/rust/pull/57321 goes further and adds some additional restrictions (more consistent input checking) to built-in attributes. Closes https://github.com/rust-lang/rust/issues/55208
2019-02-25Auto merge of #58302 - SimonSapin:tryfrom, r=alexcrichtonbors-8/+6
Stabilize TryFrom and TryInto with a convert::Infallible empty enum This is the plan proposed in https://github.com/rust-lang/rust/issues/33417#issuecomment-423073898
2019-02-25Stabilize `unrestricted_attribute_tokens`Vadim Petrochenkov-62/+19
2019-02-25Restrict value in key-value attributes to literalsVadim Petrochenkov-13/+72
2019-02-25Rollup merge of #58725 - jamwt:fix-27949, r=CentrilMazdak Farrokhzad-0/+41
Test that binop subtyping in rustc_typeck fixes #27949
2019-02-25Rollup merge of #55632 - ollie27:deny_overflowing_literals, r=CentrilMazdak Farrokhzad-17/+30
Deny the `overflowing_literals` lint for all editions The `overflowing_literals` was made deny by default for the 2018 edition by #54507, however I'm not aware of any reason it can't be made deny by default for the 2015 edition as well.
2019-02-25Test that binop subtyping in rustc_typeck fixes #27949Jamie Turner-0/+41
2019-02-25Auto merge of #57609 - matthewjasper:more-restrictive-match, r=pnkfelixbors-361/+441
Use normal mutable borrows in matches `ref mut` borrows are currently two-phase with NLL enabled. This changes them to be proper mutable borrows. To accommodate this, first the position of fake borrows is changed: ```text [ 1. Pre-match ] | [ (old create fake borrows) ] [ 2. Discriminant testing -- check discriminants ] <-+ | | | (once a specific arm is chosen) | | | [ (old read fake borrows) ] | [ 3. Create "guard bindings" for arm ] | [ (create fake borrows) ] | | | [ 4. Execute guard code ] | [ (read fake borrows) ] --(guard is false)-----------+ | | (guard results in true) | [ 5. Create real bindings and execute arm ] | [ Exit match ] ``` The following additional changes are made to accommodate `ref mut` bindings: * We no longer create fake `Shared` borrows. These borrows are no longer needed for soundness, just to avoid some arguably strange cases. * `Shallow` borrows no longer conflict with existing borrows, avoiding conflicting access between the guard borrow access and the `ref mut` borrow. There is some further clean up done in this PR: * Avoid the "later used here" note for Shallow borrows (since it's not relevant with the message provided) * Make any use of a two-phase borrow activate it. * Simplify the cleanup_post_borrowck passes into a single pass. cc #56254 r? @nikomatsakis
2019-02-25Rollup merge of #58370 - nox:relax-bounds, r=dtolnayMazdak Farrokhzad-10/+11
Relax some Hash bounds on HashMap<K, V, S> and HashSet<T, S> Notably, hash iterators don't require any trait bounds to be iterated.
2019-02-24Auto merge of #58315 - gnzlbg:returns_twice, r=alexcrichtonbors-0/+45
Implement unstable ffi_return_twice attribute This PR implements [RFC2633](https://github.com/rust-lang/rfcs/pull/2633) r? @eddyb
2019-02-24Auto merge of #58691 - Centril:rollup, r=Centrilbors-0/+75
Rollup of 6 pull requests Successful merges: - #57364 (Improve parsing diagnostic for negative supertrait bounds) - #58183 (Clarify guarantees for `Box` allocation) - #58442 (Simplify the unix `Weak` functionality) - #58454 (Refactor Windows stdio and remove stdin double buffering ) - #58511 (Const to op simplification) - #58642 (rustdoc: support methods on primitives in intra-doc links) Failed merges: r? @ghost
2019-02-24Rollup merge of #58642 - tspiteri:intra-rustdoc-prim-method, r=GuillaumeGomezMazdak Farrokhzad-0/+3
rustdoc: support methods on primitives in intra-doc links Fixes #58598.
2019-02-24Rollup merge of #57364 - hdhoang:33418_negative_bounds, r=estebankMazdak Farrokhzad-0/+72
Improve parsing diagnostic for negative supertrait bounds closes #33418 r? @estebank
2019-02-24Auto merge of #58304 - gnzlbg:simd_saturated, r=nagisabors-0/+830
Add generic simd saturated add/sub intrinsics r? @eddyb
2019-02-24Auto merge of #58232 - ljedrz:HirIdification_continued, r=Zoxcbors-3/+3
HirId-ify intravisit A big step towards https://github.com/rust-lang/rust/pull/57578. This affects mostly `hir::{collector, intravisit}` and `rustc::lint`.
2019-02-23rustdoc: support methods on primitives in intra-doc linksTrevor Spiteri-0/+3
2019-02-23Use E0724 instead of E0723 as an error codegnzlbg-2/+2
2019-02-23Fix attribute checkgnzlbg-2/+3
2019-02-23Use pattern to match attributesgnzlbg-9/+5
2019-02-23Correct error messagegnzlbg-3/+3
2019-02-23Implement ffi_returns_twice attributegnzlbg-0/+48
2019-02-23Rollup merge of #58658 - pmccarter:align_msg, r=matthewjasperMazdak Farrokhzad-6/+8
Add expected/provided byte alignments to validation error message Fixes #58617
2019-02-23Rollup merge of #58648 - pnkfelix:issue-23926-update-tests, r=nikomatsakisMazdak Farrokhzad-12/+24
Update tests to account for cross-platform testing and miri. Fix #23926
2019-02-23Rollup merge of #58526 - pmccarter:master, r=estebankMazdak Farrokhzad-0/+19
Special suggestion for illegal unicode curly quote pairs Fixes #58436 Did not end up expanding the error message span to include the full string literal since I figured the start of the token was the issue, while the help suggestion span would include up to the closing quotation mark. The look ahead logic does not affect the reader position, not sure if that is an issue (if eg it should still continue to parse after the closing quote without erroring out).
2019-02-23Rollup merge of #58353 - matthewjasper:typeck-pattern-constants, r=arielb1Mazdak Farrokhzad-20/+58
Check the Self-type of inherent associated constants r? @arielb1
2019-02-23Rollup merge of #58199 - clintfred:partial-move-err-msg, r=estebankMazdak Farrokhzad-10/+10
Add better error message for partial move closes #56657 r? @davidtwco
2019-02-23Improve parsing diagnostic for negative supertrait boundsHoàng Đức Hiếu-0/+72
2019-02-22#58658 bless after line split for tidyPatrick McCarter-5/+5
2019-02-22tidy line length override #58617Patrick McCarter-0/+1
2019-02-22Change byte align message wording #58617Patrick McCarter-2/+2
2019-02-22Invalid byte alignment expected/provided in message #58617Patrick McCarter-5/+6
2019-02-22Switch from error patterns to `//~ ERROR` markers.Felix S. Klock II-8/+11
AFAICT, we do not have the same const-eval issues that we used to when rust-lang/rust#23926 was filed. (Probably because of the switch to miri for const-evaluation.)
2019-02-22Make target pointer-width specific variants of (very old) ↵Felix S. Klock II-4/+13
huge-array-simple.rs test. (and now unignore the test since it shouldn't break tests of cross-compiles anymore.)
2019-02-22Rollup merge of #58555 - scottmcm:try-2015, r=CentrilMazdak Farrokhzad-0/+2
Add a note about 2018e if someone uses `try {` in 2015e Inspired by https://github.com/rust-lang/rust/issues/58491, where a `try_blocks` example was accidentally run in 2015, which of course produces a bunch of errors. What's the philosophy about gating for this? The keyword is stably a keyword in 2018, so I haven't gated it for now but am not mentioning what the keyword _does_. Let me know if I should do differently. Resolves #53672
2019-02-22Rollup merge of #58198 - ↵Mazdak Farrokhzad-4/+4
igorsdv:suggest-removing-parentheses-surrounding-lifetimes, r=estebank Suggest removing parentheses surrounding lifetimes Fixes #57386. r? @estebank
2019-02-22Rollup merge of #58059 - RalfJung:before_exec, r=alexcrichtonMazdak Farrokhzad-83/+115
deprecate before_exec in favor of unsafe pre_exec Fixes https://github.com/rust-lang/rust/issues/39575 As per the [lang team decision](https://github.com/rust-lang/rust/issues/39575#issuecomment-442993358): > The language team agreed that before_exec should be unsafe, and leaves the details of a transition plan to the libs team. Cc @alexcrichton @rust-lang/libs how would you like to proceed?
2019-02-22Auto merge of #56113 - spastorino:erroneous-loop-diagnostic-in-nll, r=pnkfelixbors-17/+82
Erroneous loop diagnostic in nll Closes #53773 r? @nikomatsakis
2019-02-21Move the exit block of the match to the endMatthew Jasper-121/+121
2019-02-21Fix codegen testMatthew Jasper-2/+2
2019-02-21Simplify the cleanup_post_borrowck passesMatthew Jasper-5/+5
2019-02-21Add address stability test for matchesMatthew Jasper-0/+39
2019-02-21Use normal mutable borrows in MIR match loweringMatthew Jasper-142/+101
2019-02-21Clean up MIR match loweringMatthew Jasper-270/+259
* 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-32/+125
2019-02-21partially revert 904a0bde93f0348f69914ee90b1f8b6e4e0d7cbcNiko Matsakis-5/+19
This preserves the error you currently get on stable for the old-lub-glb-object.rs test.
2019-02-21update test files to reflect new outputNiko Matsakis-300/+834
One surprise: old-lub-glb-object.rs, may indicate a bug
2019-02-21restore the actual leak-checkNiko Matsakis-0/+84
2019-02-20Auto merge of #58056 - nikomatsakis:issue-57843-universe-leak, r=pnkfelixbors-24/+60
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-20./x.py test src/test/ui --stage 1 --bless -i --compare-mode=nllClint Frederickson-8/+8