about summary refs log tree commit diff
path: root/src/test/compile-fail
AgeCommit message (Collapse)AuthorLines
2018-01-12Ignore CTFE errors while lowering patternsSeiichi Uchida-0/+21
Closes #43105.
2018-01-11Don't track local_needs_drop separately in qualify_consts (fixes #47351).Alexander Regueiro-0/+10
2018-01-11Add tests to fixed issues.Seiichi Uchida-0/+16
Closes #36792. Closes #38091. Closes #39687. Closes #42148. Closes #42956.
2018-01-10Modify message to match labelEsteban Küber-1/+1
2018-01-10Updated other tests affected by change.David Wood-12/+12
2018-01-09Treat #[path] files as mod.rs filesTaylor Cramer-16/+0
2018-01-07Assignment to immutable argument: diagnostic tweakEsteban Küber-2/+2
2018-01-07`struct` pattern parsing and diagnostic tweaksEsteban Küber-1/+1
- Recover from struct parse error on match and point out missing match body. - Point at struct when finding non-identifier while parsing its fields. - Add label to "expected identifier, found {}" error.
2018-01-07Auto merge of #47156 - petrochenkov:extpath, r=nikomatsakisbors-0/+98
Support `extern` in paths Implement the primary alternative to https://github.com/rust-lang/rust/pull/46613 + https://github.com/rust-lang/rust/pull/45771, achieving the same effect without requiring changes to other imports. Both need to be experimentally evaluated before making further progress. The PR also adds docs for all these related features into the unstable book. cc https://github.com/rust-lang/rust/issues/44660 r? @nikomatsakis
2018-01-05Auto merge of #46907 - varkor:contrib-8, r=nagisabors-0/+8
Allow non-alphabetic underscores in camel case Certain identifiers, such as `X86_64`, cannot currently be unambiguously represented in camel case (`X8664`, `X86_64`, `X8_664`, etc. are all transformed to the same identifier). This change relaxes the rules so that underscores are permitted between two non-alphabetic characters under `#[forbid(non_camel_case_types)]`. Fixes #34633 and fixes #41621.
2018-01-04Auto merge of #47124 - estebank:loan-paths, r=nikomatsakisbors-7/+9
Reword reason for move note On move errors, when encountering an enum variant, be more ambiguous and do not refer to the type on the cause note, to avoid referring to `(maybe as std::prelude::v1::Some).0`, and instead refer to `the value`. Sidesteps part of the problem with #41962: ``` error[E0382]: use of partially moved value: `maybe` --> file.rs:5:30 | 5 | if let Some(thing) = maybe { | ----- ^^^^^ value used here after move | | | value moved here = note: move occurs because the value has type `std::vec::Vec<bool>`, which does not implement the `Copy` trait error[E0382]: use of moved value: `(maybe as std::prelude::v1::Some).0` --> file.rs:5:21 | 5 | if let Some(thing) = maybe { | ^^^^^ value moved here in previous iteration of loop = note: move occurs because the value has type `std::vec::Vec<bool>`, which does not implement the `Copy` trait error: aborting due to 2 previous errors ``` Previous discussion: #44360 r? @arielb1
2018-01-03Auto merge of #46984 - arielb1:pre-statement-effect, r=nikomatsakisbors-1/+0
NLL fixes First, introduce pre-statement effects to dataflow to fix #46875. Edge dataflow effects might make that redundant, but I'm not sure of the best way to integrate them with liveness etc., and if this is a hack, this is one of the cleanest hacks I've seen. And I want a small fix to avoid the torrent of bug reports. Second, fix linking of projections to fix #46974 r? @pnkfelix
2018-01-03Auto merge of #47127 - EdSchouten:cloudabi-tests, r=kennytmbors-0/+7
First cut at getting some part of the test suite working for CloudABI I am currently working on creating a Docker container for automated CI for CloudABI. Here are some of the trivial changes that need to land to make tests pass.
2018-01-03Support `extern` in pathsVadim Petrochenkov-0/+98
2018-01-03Rollup merge of #47104 - matthewjasper:dont-panic-on-generic-drop, r=estebankkennytm-0/+24
Delay panic from incoherent drop implementation Closes #41974
2018-01-02Be ambiguous when type cannot be properly mentionedEsteban Küber-3/+6
2018-01-02Auto merge of #47105 - matthewjasper:dont-panic-for-mut-in-static, r=estebankbors-0/+21
Delay panic for aliasing violation for static items. Closes #46604
2018-01-02Add 'ignore-cloudabi' to tests that don't and won't build on CloudABI.Ed Schouten-0/+7
It looks like many of these tests are already disabled on emscripten, which also doesn't seem to support environment variables and subprocess spawning. Just add a similar tag for CloudABI. While there, sort some of the lists of operating systems alphabetically.
2018-01-02Auto merge of #47111 - rkruppe:repr-transparent, r=estebankbors-45/+0
Check all repr hints together when checking for mis-applied attributes Fixes #47094 Besides fixing that bug, this change has a user-visible effect on the spans in the "incompatible repr hints" warning and another error: they now point at `foo` and/or `bar` in `repr(foo, bar)` instead of the whole attribute. This is sometimes more precise (e.g., `#[repr(C, packed)]` on an enum points at the `packed`) but sometimes not. I moved a compile-fail test to a ui test to illustrate how it now looks in the common case of only one attribute.
2018-01-01Move reason for move to labelEsteban Küber-7/+6
2018-01-01Check all repr hints together when checking for mis-applied attributesRobin Kruppe-45/+0
Fixes #47094 Besides fixing that bug, this change has a user-visible effect on the spans in the "incompatible repr hints" warning and another error: they now point at `foo` and/or `bar` in `repr(foo, bar)` instead of the whole attribute. This is sometimes more precise (e.g., `#[repr(C, packed)]` on an enum points at the `packed`) but sometimes not. I moved a compile-fail test to a ui test to illustrate how it now looks in the common case of only one attribute.
2018-01-01Delay panic for aliasing violation for static items.matthewjasper-0/+21
2018-01-01Delay panic from incoherent drop implementationmatthewjasper-0/+24
2018-01-01Auto merge of #47098 - estebank:immutable-field, r=nagisabors-2/+2
Reword trying to operate in immutable fields The previous message ("cannot assign/mutably borrow immutable field") when trying to modify a field of an immutable binding gave the (incorrect) impression that fields can be mutable independently of their ADT's binding. Slightly reword the message to read "cannot assign/mutably borrow field of immutable binding". Re #35937.
2018-01-01Auto merge of #47064 - kennytm:force-trailing-newlines, r=estebankbors-9/+5
Add a tidy check for missing or too many trailing newlines. I've noticed recently there are lots of review comments requesting to fix trailing newlines. If this is going to be an official style here, it's better to let the CI do this repetitive check.
2017-12-31Reword trying to operate in immutable fieldsEsteban Küber-2/+2
The previous message ("cannot assign/mutably borrow immutable field") when trying to modify a field of an immutable binding gave the (incorrect) impression that fields can be mutable independently of their ADT's binding. Slightly reword the message to read "cannot assign/mutably borrow field of immutable binding".
2017-12-31Removed unnecessary output of linker options when linker is not installedFelix Schütt-1/+1
It's unnecessary to print the linker options if there is no linker installed. Currently, for libraries, the output is still printed, see #46998 for discussion
2017-12-31Auto merge of #47044 - topecongiro:fixed-ices, r=estebankbors-0/+111
Add tests on fixed ICEs Closes #29924. Closes #38857. Closes #39665. Closes #39872. Closes #41210. Closes #41880. Closes #43483. Note that compile-fail/E0599.rs is for #41210.
2017-12-30Add tests on fixed ICEsSeiichi Uchida-0/+111
Closes #29924. Closes #38857. Closes #39665. Closes #39872. Closes #39553. Closes #41210. Closes #41880. Closes #43483.
2017-12-30Remove excessive trailing newlines.kennytm-4/+0
2017-12-30Add trailing newlines to files which have no trailing newlines.kennytm-5/+5
2017-12-28Auto merge of #47031 - topecongiro:issue-41719, r=jseyfriedbors-0/+18
Report an error when resolving non-ident macro path failed Closes #41719. Please feel free to bikeshed on the error message.
2017-12-28Auto merge of #47013 - topecongiro:issue-46655, r=petrochenkovbors-0/+23
Do not expand a derive invocation when derive is not allowed Closes #46655. The first commit is what actually closes #46655. The second one is just a refactoring I have done while waiting on a test.
2017-12-28Auto merge of #47017 - topecongiro:issue-33469, r=estebankbors-0/+19
Do not panic on interpolated token inside quote macro Closes #33469.
2017-12-27Auto merge of #47014 - topecongiro:fixed-ices, r=estebankbors-0/+79
Add tests to fixed ICEs Closes #27078. Closes #27985. Closes #39848. Closes #42164. Closes #42479. Closes #45662. Closes #45965. Closes #46152.
2017-12-28Report an error when resolving non-ident macro path failedtopecongiro-0/+18
2017-12-27Auto merge of #46479 - bkchr:termination_trait, r=arielb1bors-3/+23
Implements RFC 1937: `?` in `main` This is the first part of the RFC 1937 that supports new `Termination` trait in the rust `main` function. Thanks @nikomatsakis, @arielb1 and all other people in the gitter channel for all your help! The support for doctest and `#[test]` is still missing, bu as @nikomatsakis said, smaller pull requests are better :)
2017-12-26Auto merge of #46975 - matthewjasper:mir-moveck-asm, r=arielb1bors-1/+103
[MIR Borrowck] Moveck inline asm statements Closes #45695 New behavior: * Input operands to `asm!` are moved, direct output operands are initialized. * Direct, non-read-write outputs match the assignment changes in #46752 (Shallow writes, end borrows).
2017-12-26Do not panic on interpolated token inside quote macroSeiichi Uchida-0/+19
2017-12-26Adds termination_trait feature gateBastian Köcher-0/+15
2017-12-26Fixes testsBastian Köcher-12/+2
2017-12-26Implements RFC 1937: `?` in `main`Bastian Köcher-0/+15
This is the first part of the RFC 1937 that supports new `Termination` trait in the rust `main` function.
2017-12-26Add tests to fixed ICEsSeiichi Uchida-0/+79
Closes #27078. Closes #27985. Closes #39848. Closes #42164. Closes #42479. Closes #45152. Closes #45662. Closes #45876. Closes #45965.
2017-12-26Do not expand a derive invocation when derive is not allowedSeiichi Uchida-0/+23
1. Change the return type of `expand_invoc()` and its subroutines to `Option<Expansion>` from `Expansion`. 2. Return `None` when expanding a derive invocation if the item cannot have derive on it (in `expand_derive_invoc()`).
2017-12-25Auto merge of #46949 - davidtwco:issue-46631, r=arielb1bors-18/+0
MIR borrowck: no "move occurs because `X` is not Copy` error Fixes #46631. r? @arielb1
2017-12-24Make killing of out-of-scope borrows a pre-statement effectAriel Ben-Yehuda-1/+0
Fixes #46875. Fixes #46917. Fixes #46935.
2017-12-24Auto merge of #46888 - cramertj:nested-impl-trait-error, r=nikomatsakisbors-2/+41
Add a feature gate for nested uses of `impl Trait` This allows us to delay stabilization of nested `impl Trait` until we have a plan to solve the problem posed [here](https://github.com/rust-lang/rust/issues/34511#issuecomment-350715858). r? @nikomatsakis
2017-12-23Give MIR borrowck a better understanding of inline asmMatthew Jasper-1/+103
2017-12-23Auto merge of #46864 - estebank:closure-type-err-sp, r=nikomatsakisbors-4/+4
Closure type error ui tweak Do not point at the same span on all notes/help messages, and instead show them without a span.
2017-12-22Auto merge of #46838 - pnkfelix:issue-46112-followup, r=estebankbors-12/+32
Followup for #46112. Sorting by crate-num should ensure that we favor `std::foo::bar` over `any_other_crate::foo::bar`. Interestingly, *this* change had a much larger impact on our internal test suite than PR #46708 (which was my original fix to #46112).