summary refs log tree commit diff
path: root/src/test/compile-fail
AgeCommit message (Collapse)AuthorLines
2015-08-04Rollup merge of #27491 - GuillaumeGomez:patch-4, r=ManishearthManish Goregaokar-1/+1
2015-08-03Auto merge of #26783 - eddyb:methrec, r=huonwbors-0/+66
After #26694, the overloaded operator and "impl not known at method lookup time" cases started triggering the lint. I've also added checks for overloaded autoderef and method calls via paths (i.e. `T::method()`). All new 8 test cases did not trigger the lint before #26694. r? @huonw
2015-08-04rustc_lint: handle more method calls in unconditional_recursion.Eduard Burtescu-0/+66
2015-08-03Auto merge of #27210 - vadimcn:win64-eh-pers, r=alexcrichtonbors-0/+1
After this change, the only remaining symbol we are pulling from libgcc on Win64 is `__chkstk_ms` - the stack probing routine.
2015-08-03Update error commentGuillaume Gomez-1/+1
2015-07-31Auto merge of #27382 - brson:gate-assoc-type, r=alexcrichtonbors-0/+23
There are still problems in both the design and implementation of this, so we don't want it landing in 1.2. cc @arielb1 @nikomatsakis cc #27364 r? @alexcrichton
2015-07-30Fix testsBrian Anderson-0/+8
2015-07-30Implement Win64 eh_personality natively.Vadim Chugunov-0/+1
2015-07-29Feature gate associated type defaultsBrian Anderson-0/+15
There are multiple issues with them as designed and implemented. cc #27364
2015-07-29Auto merge of #27353 - arielb1:parenthetical-error, r=steveklabnikbors-3/+3
This also calls the right API, which e.g. prevents a suggestion for #![feature(unboxed_closures)] on stable. Fixes #26970 r? @steveklabnik
2015-07-29Rollup merge of #27313 - nagisa:illegal-to-invalid, r=pnkfelixSteve Klabnik-69/+112
Improves diagnostics in various locations, namely: * A few error messages that orignally were a mix of an error message and suggestion how to fix it have been split up into two messages: an error and help/hint. * Never report “illegal”. Fixes https://github.com/rust-lang/rust/issues/27288
2015-07-29Auto merge of #27349 - arielb1:constant-at, r=alexcrichtonbors-0/+22
Fixes #27033 Fixes #27077 r? @alexcrichton
2015-07-29Auto merge of #27261 - arielb1:drop-sanity-check, r=pnkfelixbors-0/+47
This fixes multiple bugs, and as several of these are soundness issue, is a [breaking-change]. r? @pnkfelix
2015-07-29Auto merge of #27260 - alexcrichton:cap-lints, r=nrcbors-0/+51
This commit is an implementation of [RFC 1193][rfc] which adds the ability to the compiler to cap the lint level for the entire compilation session. This flag will ensure that no lints will go above this level, and Cargo will primarily use this flag passing `--cap-lints allow` to all upstream dependencies. [rfc]: https://github.com/rust-lang/rfcs/pull/1193 Closes #27259
2015-07-28rustc: Add a --cap-lints flag to the compilerAlex Crichton-0/+51
This commit is an implementation of [RFC 1193][rfc] which adds the ability to the compiler to cap the lint level for the entire compilation session. This flag will ensure that no lints will go above this level, and Cargo will primarily use this flag passing `--cap-lints allow` to all upstream dependencies. [rfc]: https://github.com/rust-lang/rfcs/pull/1193 Closes #27259
2015-07-29Replace illegal with invalid in most diagnosticsSimonas Kazlauskas-9/+9
2015-07-29Improve typeck diagnostic messagesSimonas Kazlauskas-44/+87
Mostly by splitting error messages into proper pairs of errors and helps
2015-07-29Improve invalid recursive types diagnosticSimonas Kazlauskas-16/+16
2015-07-28prohibit the lhs of an @-pattern being a constantAriel Ben-Yehuda-0/+22
as this breaks code that worked under some conditions, this is a [breaking-change] Fixes #27033 Fixes #27077
2015-07-28clarify the parenthetical notation stability error messageAriel Ben-Yehuda-3/+3
This also calls the right API, which e.g. prevents a suggestion for #![feature(unboxed_closures)] on stable. Fixes #26970
2015-07-28Auto merge of #27309 - eddyb:snapshot-infdef, r=alexcrichtonbors-1/+11
FreeBSD i386 snapshot is missing, failed tests (possibly spurious). r? @alexcrichton
2015-07-27Turn on `box(PLACE) expr` deprecation warning post-snapshot.Eduard Burtescu-1/+11
2015-07-27Auto merge of #27315 - eefriedman:improper-ctypes-void-ret, r=alexcrichtonbors-0/+3
Fixes issue #27302.
2015-07-26In improper-ctypes lint, handle functions which explicitly return `()`.Eli Friedman-0/+3
Fixes issue #27302.
2015-07-25Add feature gateJared Roesch-0/+5
2015-07-25Make default error reporting deterministicJared Roesch-6/+19
2015-07-25Add cross-crate error message testsJared Roesch-0/+20
2015-07-25Correctly collect defaults from type alises in astconvJared Roesch-17/+0
2015-07-25Implement Default TyParam fallbackJared Roesch-0/+40
This patch allows type parameter defaults to influence type inference. This is a possible breaking change since it effects the way type inference works and will have different behavior when mixing defaults and literal fallback.
2015-07-25Auto merge of #26630 - eefriedman:recursive-static, r=pnkfelixbors-54/+26
***Edit: Fixed now.*** I'm pretty sure the way I'm using LLVMReplaceAllUsesWith here is unsafe... but before I figure out how to fix that, I'd like a reality-check: is this actually useful?
2015-07-25Auto merge of #27253 - bossmc:unbalanced-delimiters-cause-ice, r=nikomatsakisbors-0/+16
This introduces a test for #23389 and improves the error behaviour to treat the malformed LHS as an error, not a compiler bug. The parse phase that precedes the call to `check_lhs_nt_follows` could possibly be enhanced to police the format itself (which the old code suggests was the original intention), but I'm not sure that's any nicer than just parsing the matcher as generic rust code and then policing the specific requirements for being a macro matcher afterwards (as this does). Fixes #23389
2015-07-24Allow writing types which "can't" be instantiated.Eli Friedman-50/+7
The borrow checker doesn't allow constructing such a type at runtime using safe code, but there isn't any reason to ban them in the type checker. Included in this commit is an example of a neat static doubly-linked list. Feature-gated under the static_recursion gate to be on the safe side, but there are unlikely to be any reasons this shouldn't be turned on by default.
2015-07-24Add static_recursion feature gate.Eli Friedman-0/+16
2015-07-24Allow recursive static variables.Eli Friedman-5/+4
There isn't any particularly good reason for this restriction, so just get rid of it, and fix trans to handle this case.
2015-07-24handle all type variants correctly in dropckAriel Ben-Yehuda-0/+47
This fixes a few soundness bugs in dropck, so to anyone who relied on them, this is a [breaking-change] Fixes #24086. Fixes #25389. Fixes #25598. Fixes #25750. Fixes #26641. Fixes #26657. Fixes #27240. Fixes #27241.
2015-07-24Auto merge of #27265 - steveklabnik:rollup, r=steveklabnikbors-0/+21
- Successful merges: #27137, #27145, #27177, #27193, #27212, #27220, #27229, #27235, #27238, #27244, #27251 - Failed merges:
2015-07-24Rollup merge of #27244 - Detegr:master, r=eddybSteve Klabnik-0/+21
Hi all. This is my first contribution to Rust and fixes an issue causing an invalid error message to be presented to the user when using unit struct as length of a repeat expression, issue #27008. The solution is based on suggestions by @oli-obk, but as I'm a complete newbie to this, I have no clue if I got them right :) The biggest concern I have is that if the `NodeId` I'm returning is the correct one or not (it's not meaningful in this case but I think it would be nice to get it right).
2015-07-24Auto merge of #27087 - nikomatsakis:closure-exploration, r=nrcbors-1/+52
Refactors the "desugaring" of closures to expose the types of the upvars. This is necessary to be faithful with how actual structs work. The reasoning of the particular desugaring that I chose is explained in a fairly detailed comment. As a side-effect, recursive closure types are prohibited unless a trait object intermediary is used. This fixes #25954 and also eliminates concerns about unrepresentable closure types that have infinite size, I believe. I don't believe this can cause regressions because of #25954. (As for motivation, besides #25954 etc, this work is also intended as refactoring in support of incremental compilation, since closures are one of the thornier cases encountered when attempting to split node-ids into item-ids and within-item-ids. The goal is to eliminate the "internal def-id" distinction in astdecoding. However, I have to do more work on trans to really make progress there.) r? @nrc
2015-07-24Auto merge of #27215 - pnkfelix:fsk-placer-take-5-just-in, r=nikomatsakisbors-6/+126
Macro desugaring of `in PLACE { BLOCK }` into "simpler" expressions following the in-development "Placer" protocol. Includes Placer API that one can override to integrate support for `in` into one's own type. (See [RFC 809].) [RFC 809]: https://github.com/rust-lang/rfcs/blob/master/text/0809-box-and-in-for-stdlib.md Part of #22181 Replaced PR #26180. Turns on the `in PLACE { BLOCK }` syntax, while leaving in support for the old `box (PLACE) EXPR` syntax (since we need to support that at least until we have a snapshot with support for `in PLACE { BLOCK }`. (Note that we are not 100% committed to the `in PLACE { BLOCK }` syntax. In particular I still want to play around with some other alternatives. Still, I want to get the fundamental framework for the protocol landed so we can play with implementing it for non `Box` types.) ---- Also, this PR leaves out support for desugaring-based `box EXPR`. We will hopefully land that in the future, but for the short term there are type-inference issues injected by that change that we want to resolve separately.
2015-07-24Add regression test for #25368. Fixes #25368.Niko Matsakis-0/+23
2015-07-24Add regression test for #25954 (cyclic closure type), which is nowNiko Matsakis-0/+28
impossible.
2015-07-24Unify the upvar variables found in closures with the actual types of theNiko Matsakis-1/+1
upvars after analysis is done. Remove the `closure_upvars` helper and just consult this list of type variables directly.
2015-07-24Auto merge of #26583 - eefriedman:lint-ffi, r=nrcbors-12/+43
Makes the lint a bit more accurate, and improves the quality of the diagnostic messages by explicitly returning an error message.
2015-07-24Fix license statementAndy Caldwell-2/+12
2015-07-24Add test for issue #23389Andy Caldwell-0/+6
2015-07-23Rewrite the improper_ctypes lint.Eli Friedman-12/+43
Makes the lint a bit more accurate, and improves the quality of the diagnostic messages by explicitly returning an error message. The new lint is also a little more aggressive: specifically, it now rejects tuples, and it recurses into function pointers.
2015-07-23update compile-fail/pushpop-unsafe-rejects.rs to reflect switch from ↵Felix S. Klock II-24/+25
saturated to checked arith.
2015-07-23eval_const_expr_partial now returns ConstVal::Struct instead of None for ↵Antti Keränen-0/+21
unit-struct path expressions. Fixes #27008
2015-07-22Resolve lifetime parameters for foreign functions.Eli Friedman-0/+25
Pretty straightforward; just need to make sure to explicitly handle the generic parameters of each ast::ForeignItemFn. Fixes #26587.
2015-07-22Rollup merge of #27202 - apasel422:issue-21174, r=alexcrichtonSteve Klabnik-1/+1