summary refs log tree commit diff
path: root/src/test/compile-fail
AgeCommit message (Collapse)AuthorLines
2018-02-11rustc_mir: insert a dummy access to places being matched on, when building MIR.Eduard-Mihai Burtescu-16/+47
2018-01-12Treat #[path] files as mod.rs filesTaylor Cramer-16/+0
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-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).
2017-12-22Converted moves-based-on-type-tuple test and added MIR borrowck comparison.David Wood-18/+0
2017-12-22Auto merge of #46752 - Yoric:nll, r=arielb1bors-43/+5
Issue #46589 - Kill borrows on a local variable whenever we assign ov… …er this variable This is a first patch for the issue, handling the simple case while I figure out the data structures involved in the more complex cases.
2017-12-22Auto merge of #46732 - estebank:silence-recovered-blocks, r=petrochenkovbors-1/+0
Do not emit type errors on recovered blocks When a parse error occurs on a block, the parser will recover and create a block with the statements collected until that point. Now a flag stating that a recovery has been performed in this block is propagated so that the type checker knows that the type of the block (which will be identified as `()`) shouldn't be checked against the expectation to reduce the amount of irrelevant diagnostic errors shown to the user. Fix #44579.
2017-12-21Auto merge of #46922 - kennytm:rollup, r=kennytmbors-0/+30
Rollup of 14 pull requests - Successful merges: #46636, #46780, #46784, #46809, #46814, #46820, #46839, #46847, #46858, #46878, #46884, #46890, #46898, #46918 - Failed merges:
2017-12-21Do not emit type errors on recovered blocksEsteban Küber-1/+0
When a parse error occurs on a block, the parser will recover and create a block with the statements collected until that point. Now a flag stating that a recovery has been performed in this block is propagated so that the type checker knows that the type of the block (which will be identified as `()`) shouldn't be checked against the expectation to reduce the amount of irrelevant diagnostic errors shown to the user.
2017-12-22Rollup merge of #46858 - QuietMisdreavus:external-doc-error, r=estebankkennytm-0/+16
tweaks and fixes for doc(include) This PR makes a handful of changes around `#[doc(include="file.md")]` (https://github.com/rust-lang/rust/issues/44732): * Turns errors when loading files into full errors. This matches the original RFC text. * Makes the `missing_docs` lint check for `#[doc(include="file.md")]` as well as regular `#[doc="text"]` attributes. * Loads files included by `#[doc(include="file.md")]` into dep-info, mirroring the behavior of `include_str!()` and friends. * Adds or modifies tests to check for all of these.
2017-12-22Rollup merge of #46780 - varkor:contrib-5, r=arielb1kennytm-0/+14
Fix ICE when calling non-functions within closures The visitor for walking function bodies did not previously properly handle error-cases for function calls. These are now ignored, preventing the panic. This fixes #46771.
2017-12-21Issue #46589 - Kill borrows on a local variable whenever we assign over this ↵David Teller-43/+5
variable
2017-12-21Add a feature gate for nested uses of `impl Trait`Taylor Cramer-2/+41
2017-12-21Auto merge of #46877 - Deewiant:gh46843, r=eddybbors-0/+22
MIR: terminate unreachable blocks in construct_const Fixes #46843. #45821 added unreachable blocks in matches, which were terminated in construct_fn but not in construct_const, causing a panic due to "no terminator on block" when constants involved matching on enums. The "unimplemented expression type" error may go away in the future, the key is that we see the E0015 about using a non-const function and then don't ICE.
2017-12-21Auto merge of #46531 - cramertj:no-mo-modrs, r=nikomatsakisbors-4/+30
Implement non-mod.rs mod statements Fixes https://github.com/rust-lang/rust/issues/45385, cc https://github.com/rust-lang/rust/issues/44660 This will fail tidy right now because it doesn't recognize my UI tests as feature-gate tests. However, I'm not sure if compile-fail will work out either because compile-fail usually requires there to be error patterns in the top-level file, which isn't possible with this feature. What's the recommended way to handle this?
2017-12-21Auto merge of #46083 - petrochenkov:morepriv, r=nikomatsakisbors-23/+466
Type privacy polishing Various preparations before implementing https://github.com/rust-lang/rfcs/pull/2145 containing final minor breaking changes (mostly for unstable code or code using `allow(private_in_public)`). (Continuation of https://github.com/rust-lang/rust/pull/42125, https://github.com/rust-lang/rust/pull/44633 and https://github.com/rust-lang/rust/pull/41332.) It would be good to run crater on this. r? @eddyb
2017-12-21Always report private-in-public in associated types as hard errorsVadim Petrochenkov-23/+95
according to RFC 2145. Fix a silly label message.
2017-12-21Prohibit access to private statics from other crates through macros 2.0Vadim Petrochenkov-0/+5
2017-12-21Properly check traits in type privacyVadim Petrochenkov-11/+9
2017-12-21Check associated type bindings for privacy and stabilityVadim Petrochenkov-0/+19
2017-12-21Add tests for associated item privacyVadim Petrochenkov-0/+349
2017-12-20when using feature(nll), don't warn about AST-based region errorsNiko Matsakis-3/+9
Also, keep reporting AST-based region errors that are not occuring in a fn body.
2017-12-20connect NLL machinery to the `NiceRegionError` codeNiko Matsakis-7/+7
2017-12-20Various tweaksEsteban Küber-4/+4
2017-12-20MIR: terminate unreachable blocks in construct_constMatti Niemenmaa-0/+22
Fixes #46843. #45821 added unreachable blocks in matches, which were terminated in construct_fn but not in construct_const, causing a panic due to "no terminator on block" when constants involved matching on enums. The "unimplemented expression type" error may go away in the future, the key is that we see the E0015 about using a non-const function and then don't ICE.
2017-12-20Auto merge of #46733 - nikomatsakis:nll-master-to-rust-master-5, r=arielb1bors-3/+3
nll part 5 Next round of changes from the nll-master branch. Extensions: - we now propagate ty-region-outlives constraints out of closures and into their creator when necessary - we fix a few ICEs that can occur by doing liveness analysis (and the resulting normalization) during type-checking - we handle the implicit region bound that assumes that each type `T` outlives the fn body - we handle normalization of inputs/outputs in fn signatures Not included in this PR (will come next): - handling `impl Trait` - tracking causal information - extended errors r? @arielb1