about summary refs log tree commit diff
path: root/src/test/compile-fail
AgeCommit message (Collapse)AuthorLines
2017-06-29Move unsized_tuple_coercion behind a feature gate.Masaki Hara-0/+24
2017-06-29Add unsized tuple coercions.Masaki Hara-0/+109
2017-06-29Check explicitly that tuple initializer is Sized.Masaki Hara-0/+1
2017-06-29Change some terminology around keywords and reserved identifierspetrochenkov-2/+2
2017-06-29Make `$crate` a keywordVadim Petrochenkov-0/+68
2017-06-29Auto merge of #42887 - GuillaumeGomez:remove-err-methods, r=nikomatsakisbors-0/+31
Remove err methods To be merged after #42519. cc @Susurrus @QuietMisdreavus
2017-06-29Rollup merge of #42953 - estebank:fix-20729, r=petrochenkovAriel Ben-Yehuda-40/+0
Move type parameter shadowing test to `ui` Fix #20729.
2017-06-29Rollup merge of #42886 - durka:pplmm-mwe, r=petrochenkovAriel Ben-Yehuda-0/+36
syntax: allow negative integer literal expression to be interpolated as pattern Fixes #42820. r? @jseyfried
2017-06-29Rollup merge of #42219 - pwoolcoc:add-allow-fail-to-libtest, r=GuillaumeGomezAriel Ben-Yehuda-0/+17
add `allow_fail` test attribute This change allows the user to add an `#[allow_fail]` attribute to tests that will cause the test to compile & run, but if the test fails it will not cause the entire test run to fail. The test output will show the failure, but in yellow instead of red, and also indicate that it was an allowed failure. Here is an example of the output: http://imgur.com/a/wt7ga
2017-06-29Add E0620Guillaume Gomez-0/+13
2017-06-29Add E0619Guillaume Gomez-0/+18
2017-06-29Auto merge of #42642 - venkatagiri:issue_42312, r=nikomatsakisbors-6/+25
rustc_typeck: enforce argument type is sized closes #42312 r? @nikomatsakis
2017-06-28Move type parameter shadowing test to `ui`Esteban Küber-40/+0
2017-06-28rustc_typeck: use body-id of type-checking item in need_type_infoVenkata Giri Reddy-2/+2
2017-06-28Auto merge of #42850 - estebank:unwanted-return-rotj, r=nikomatsakisbors-258/+0
Detect missing `;` on methods with return type `()` - Point out the origin of a type requirement when it is the return type of a method - Point out possibly missing semicolon when the return type is `()` and the implicit return makes sense as a statement - Suggest changing the return type of methods with default return type - Don't suggest changing the return type on `fn main()` - Don't suggest changing the return type on impl fn - Suggest removal of semicolon (instead of being help)
2017-06-28rustc_typeck: enforce argument type is sizedVenkata Giri Reddy-4/+23
2017-06-27syntax: allow negative integer literal expression to be interpolated as patternAlex Burka-0/+36
2017-06-27tests: work around fallout from normalizing signatures separately.Eduard-Mihai Burtescu-0/+10
2017-06-27rustc_typeck: support functions in variance computation.Eduard-Mihai Burtescu-68/+4
2017-06-27rustc: move the PolyFnSig out of TyFnDef.Eduard-Mihai Burtescu-2/+2
2017-06-26Simplify `hygiene::Mark` application, andJeffrey Seyfried-2/+1
remove variant `Token::SubstNt` in favor of `quoted::TokenTree::MetaVar`.
2017-06-24Add compile-fail test for the new feature gatePaul Woolcock-0/+17
2017-06-24wording improvementGuillaume Gomez-18/+14
2017-06-24Add E0607Guillaume Gomez-0/+14
2017-06-24Add E0606Guillaume Gomez-0/+13
2017-06-24Add E0605Guillaume Gomez-0/+19
2017-06-24Add E0604Guillaume Gomez-0/+13
2017-06-24Auto merge of #42724 - Mark-Simulacrum:tests, r=alexcrichtonbors-0/+288
Add tests for a few issues. Fixes #41998 Fixes #38381 Fixes #37515 Fixes #37510 Fixes #37366 Fixes #37323 Fixes #37051 Fixes #36839 Fixes #35570 Fixes #34373 Fixes #34222 Certainly not all of the E-needstest issues right now, but I started to get bored.
2017-06-23Move tests to `ui`Esteban Küber-258/+0
2017-06-23Add tests for a few issues.Mark Simulacrum-0/+288
2017-06-23Rollup merge of #42833 - durka:non-constant-used-with-constant, ↵Mark Simulacrum-21/+3
r=Mark-Simulacrum change span label for E0435 r? @Mark-Simulacrum
2017-06-23Auto merge of #42304 - Mark-Simulacrum:issue-37157, r=nikomatsakisbors-138/+13
Print the two types in the span label for transmute errors. Fixes #37157. I'm not entirely happy with the changes here but overall it's better in my opinion; we certainly avoid the odd language in that issue, which changes to: ``` error[E0512]: transmute called with differently sized types: <C as TypeConstructor<'a>>::T (size can vary because of <C as TypeConstructor>::T) to <C as TypeConstructor<'b>>::T (size can vary because of <C as TypeConstructor>::T) --> test.rs:8:5 | 8 | ::std::mem::transmute(x) | ^^^^^^^^^^^^^^^^^^^^^ transmuting between <C as TypeConstructor<'a>>::T and <C as TypeConstructor<'b>>::T error: aborting due to previous error(s) ```
2017-06-22Auto merge of #42614 - GuillaumeGomez:new-error-codes, r=pnkfelixbors-3/+117
New error codes Part of #42229. cc @Susurrus @frewsxcv @QuietMisdreavus
2017-06-22remove duplicate E0435 testAlex Burka-19/+1
2017-06-22change span label for E0435 (fix #41871)Alex Burka-2/+2
2017-06-22Auto merge of #42634 - Zoxc:for-desugar2, r=nikomatsakisbors-0/+19
Change the for-loop desugar so the `break` does not affect type inference. Fixes #42618 Rewrite the `for` loop desugaring to avoid contaminating the inference results. Under the older desugaring, `for x in vec![] { .. }` would erroneously type-check, even though the type of `vec![]` is unconstrained. (written by @nikomatsakis)
2017-06-22Auto merge of #42682 - alexcrichton:jobserver, r=michaelwoeristerbors-17/+58
Integrate jobserver support to parallel codegen This commit integrates the `jobserver` crate into the compiler. The crate was previously integrated in to Cargo as part of rust-lang/cargo#4110. The purpose here is to two-fold: * Primarily the compiler can cooperate with Cargo on parallelism. When you run `cargo build -j4` then this'll make sure that the entire build process between Cargo/rustc won't use more than 4 cores, whereas today you'd get 4 rustc instances which may all try to spawn lots of threads. * Secondarily rustc/Cargo can now integrate with a foreign GNU `make` jobserver. This means that if you call cargo/rustc from `make` or another jobserver-compatible implementation it'll use foreign parallelism settings instead of creating new ones locally. As the number of parallel codegen instances in the compiler continues to grow over time with the advent of incremental compilation it's expected that this'll become more of a problem, so this is intended to nip concurrent concerns in the bud by having all the tools to cooperate! Note that while rustc has support for itself creating a jobserver it's far more likely that rustc will always use the jobserver configured by Cargo. Cargo today will now set a jobserver unconditionally for rustc to use.
2017-06-21Rollup merge of #42620 - wesleywiser:compile_error, r=brsonCorey Farwell-0/+28
Add compile_error! Related to #40872
2017-06-21Rollup merge of #42397 - sfackler:syncsender-sync, r=alexcrichtonCorey Farwell-3/+1
Implement Sync for SyncSender r? @alexcrichton
2017-06-21Integrate jobserver support to parallel codegenAlex Crichton-17/+58
This commit integrates the `jobserver` crate into the compiler. The crate was previously integrated in to Cargo as part of rust-lang/cargo#4110. The purpose here is to two-fold: * Primarily the compiler can cooperate with Cargo on parallelism. When you run `cargo build -j4` then this'll make sure that the entire build process between Cargo/rustc won't use more than 4 cores, whereas today you'd get 4 rustc instances which may all try to spawn lots of threads. * Secondarily rustc/Cargo can now integrate with a foreign GNU `make` jobserver. This means that if you call cargo/rustc from `make` or another jobserver-compatible implementation it'll use foreign parallelism settings instead of creating new ones locally. As the number of parallel codegen instances in the compiler continues to grow over time with the advent of incremental compilation it's expected that this'll become more of a problem, so this is intended to nip concurrent concerns in the bud by having all the tools to cooperate! Note that while rustc has support for itself creating a jobserver it's far more likely that rustc will always use the jobserver configured by Cargo. Cargo today will now set a jobserver unconditionally for rustc to use.
2017-06-21Auto merge of #42076 - alex-ozdemir:master, r=nrcbors-109/+136
Clearer Error Message for Duplicate Definition Clearer use of the error message and span labels to communicate duplication definitions/imports. fixes #42061
2017-06-20Show type name for unused_must_use lintSeo Sanghyeon-4/+4
2017-06-19Add compile_error!Wesley Wiser-0/+28
Related to #40872
2017-06-18Update transmute size lints.Mark Simulacrum-138/+13
Also moves a few transmute tests to UI tests to better test their output.
2017-06-18Add tests for various issuesMalo Jaffré-0/+124
Fixes #11740. Fixes #19601. Fixes #22603 Fixes #22789. Fixes #26614. r? @Mark-Simulacrum.
2017-06-17Auto merge of #42649 - estebank:if-cond, r=nikomatsakisbors-48/+0
Report error for assignment in `if` condition For code like `if x = 3 {}`, output: ``` error[E0308]: mismatched types --> $DIR/issue-17283.rs:25:8 | 25 | if x = x { | ^^^^^ | | | help: did you mean to compare equality? `x == x` | expected bool, found () | = note: expected type `bool` found type `()` ``` Fix #40926.
2017-06-16Auto merge of #41840 - arielb1:deduplicate-selection-errors, r=nikomatsakisbors-37/+19
Suppress trait errors that are implied by other errors this is currently a hack and should be cleaned up somewhat. Posting this to get some feedback. r? @nikomatsakis cc @estebank
2017-06-16Rollup merge of #42656 - VBChunguk:struct-field-attributes, r=nikomatsakisCorey Farwell-24/+0
Remove struct_field_attributes feature gate Part of #41681. ~This PR only removes the feature gate; this *does not* update any documentations.~ This PR removes the feature gate and the corresponding chapter of the Unstable Book. I'm not very sure about the changes I made though... Just followed the stabilization guideline. r? @nikomatsakis
2017-06-16Rollup merge of #42654 - GuillaumeGomez:error-codes-new, r=QuietMisdreavusCorey Farwell-2/+22
Error codes new Part of #42229. cc @Susurrus @frewsxcv @QuietMisdreavus
2017-06-16Auto merge of #42568 - GuillaumeGomez:E0608, r=QuietMisdreavusbors-9/+22
E0608 Part of #42229. cc @Susurrus