summary refs log tree commit diff
path: root/src/test/compile-fail
AgeCommit message (Collapse)AuthorLines
2016-09-16Make `private_in_public` compatibility lint warn-by-default againVadim Petrochenkov-2/+6
2016-09-12typeck: use NoExpectation to check return type of diverging fnAlex Burka-0/+16
This fixes #35849, a regression introduced by the typeck refactoring around TyNever/!.
2016-08-16Auto merge of #35617 - jseyfried:fix_unused_cfg_attr_path, r=eddybbors-2/+14
Fix incorrect unused import warnings on `cfg_attr`ed `path` attributes Fixes #35584. r? @eddyb
2016-08-16Auto merge of #35162 - canndrew:bang_type_coerced, r=nikomatsakisbors-102/+93
Implement the `!` type This implements the never type (`!`) and hides it behind the feature gate `#[feature(never_type)]`. With the feature gate off, things should build as normal (although some error messages may be different). With the gate on, `!` is usable as a type and diverging type variables (ie. types that are unconstrained by anything in the code) will default to `!` instead of `()`.
2016-08-15Auto merge of #35680 - GuillaumeGomez:err_codes, r=jonathandturnerbors-0/+242
Err codes r? @jonathandturner
2016-08-15Add new error code testsGuillaume Gomez-0/+242
2016-08-15Auto merge of #35567 - creativcoder:e0261, r=jonathandturnerbors-0/+3
Update E0261 and E0262 to new error format Fixes #35516 and #35517 . Part of #35233 r? @jonathandturner
2016-08-14Rollup merge of #35646 - theypsilon:master, r=jonathandturnerEduard-Mihai Burtescu-0/+1
E0094 error message updated Part of #35233 Fixes #35231 r? @jonathandturner
2016-08-14Rollup merge of #35644 - garekkream:update-E0302-new-error-format, ↵Eduard-Mihai Burtescu-0/+1
r=jonathandturner Update E0302 to the new format Part of #35233. Fixes #35523. r? @jonathandturner
2016-08-14Rollup merge of #35643 - garekkream:update-E0301-new-error-format, ↵Eduard-Mihai Burtescu-0/+1
r=jonathandturner Update E0301 to the new format Part of #35233. Fixes #35522. r? @jonathandturner
2016-08-14Rollup merge of #35616 - clementmiao:E0067_new_error_format, r=jonathandturnerEduard-Mihai Burtescu-0/+2
changed E0067 to new error format Updated E0067 to new error format. Part of #35233 Fixes #35502 Passes all the tests when running: `python src/bootstrap/bootstrap.py --step check-cfail --stage 1` **This seems strange, given that the format for E0067 has been changed.** It feels like it should fail some unit tests maybe? Let me know if I'm mistaken. Otherwise I can create a unit test for it. Thanks for letting me help! r? @jonathandturner
2016-08-14Rollup merge of #35615 - clementmiao:E0070_new_error_format, r=jonathandturnerEduard-Mihai Burtescu-0/+1
Update E0070 to new error format Updated E0070 to new error format. Part of #35233 Fixes #35503 Thanks for letting me help! r? @jonathandturner
2016-08-14Rollup merge of #35611 - jonathandturner:ptr-helper, r=nikomatsakisEduard-Mihai Burtescu-21/+21
Improve &-ptr printing This PR replaces printing `&-ptr` with a more readable description. To do so it uses a few heuristics. If the name of the type is unknown, too long (longer than just saying "reference"), or too complex (a type with explicit lifetime annotations), it will instead opt to print either "reference" or "mutable reference", depending on the mutability of the type. Before: ``` error[E0308]: mismatched types --> src/test/compile-fail/issue-7061.rs:14:46 | 14 | fn foo(&'a mut self) -> Box<BarStruct> { self } | ^^^^ expected box, found &-ptr | = note: expected type `Box<BarStruct>` = note: found type `&'a mut BarStruct` error: aborting due to previous error ``` After: ``` error[E0308]: mismatched types --> src/test/compile-fail/issue-7061.rs:14:46 | 14 | fn foo(&'a mut self) -> Box<BarStruct> { self } | ^^^^ expected box, found mutable reference | = note: expected type `Box<BarStruct>` = note: found type `&'a mut BarStruct` error: aborting due to previous error ```
2016-08-14Rollup merge of #35596 - crypto-universe:E0254_style_and_tests, ↵Eduard-Mihai Burtescu-1/+4
r=jonathandturner Add label to E0254 This issue #35513 is a part of #35233. r? @jonathandturner
2016-08-14Rollup merge of #35586 - shyaamsundhar:SqushCom, r=jonathandturnerEduard-Mihai Burtescu-0/+2
E0248, E0267 & E0268 Change into issue format r? @jonathandturner Part of #35391, #35519 and #35520. I have squashed all changes into a single commit. Please review the changes. E0248 Change in issue format E0267 UT New Format E0268 UT New Format E0267 & E0268 New Error Format
2016-08-14Rollup merge of #35573 - wdv4758h:E0138, r=jonathandturnerEduard-Mihai Burtescu-1/+4
Update E0138 to new format Part of #35233 Fix #35510 r? @jonathandturner ![e0138](https://cloud.githubusercontent.com/assets/2716047/17562415/7200d93c-5f5d-11e6-98ff-e15c29f40e03.png) Question: How can I only underline the function name ? I have observed the debug output and the struct of item, but I can't find the `Span` for function name. Should I modify the struct I get to save function name's position or there is another way to get it ? (I can only find `Span`s for function attributes, inputs, outputs, blocks)
2016-08-14Rollup merge of #35558 - lukehinds:master, r=nikomatsakisEduard-Mihai Burtescu-1/+3
Update error message for E0253 #35512 Fixes #35512. Part of #35233.
2016-08-14Rollup merge of #35491 - sanxiyn:pub-restricted-span, r=nikomatsakisEduard-Mihai Burtescu-30/+0
Correct span for pub_restricted field Fix #35435.
2016-08-14Auto merge of #34206 - petrochenkov:pipdeny, r=nikomatsakisbors-55/+92
Make `private_in_public` compatibility lint deny-by-default In accordance with the [plan](https://internals.rust-lang.org/t/fcp-for-various-future-compatibility-warnings/3590/5?u=petrochenkov). r? @nikomatsakis
2016-08-14updated compile-fail testsRahul Sharma-0/+3
2016-08-13Auto merge of #35453 - jseyfried:hygienize_metavariables, r=nrcbors-1/+28
macros: Make metavariables hygienic This PR makes metavariables hygienic. For example, consider: ```rust macro_rules! foo { ($x:tt) => { // Suppose that this token tree argument is always a metavariable. macro_rules! bar { ($x:expr, $y:expr) => { ($x, $y) } } } } fn main() { foo!($z); // This currently compiles. foo!($y); // This is an error today but compiles after this PR. } ``` Today, the `macro_rules! bar { ... }` definition is only valid when the metavariable passed to `foo` is not `$y` (since it unhygienically conflicts with the `$y` in the definition of `bar`) or `$x` (c.f. #35450). After this PR, the definition of `bar` is always valid (and `bar!(a, b)` always expands to `(a, b)` as expected). This can break code that was allowed in #34925 (landed two weeks ago). For example, ```rust macro_rules! outer { ($t:tt) => { macro_rules! inner { ($i:item) => { $t } } } } outer!($i); // This `$i` should not interact with the `$i` in the definition of `inner!`. inner!(fn main() {}); // After this PR, this is an error ("unknown macro variable `i`"). ``` Due to the severe limitations on nested `macro_rules!` before #34925, this is not a breaking change for stable/beta. Fixes #35450. r? @nrc
2016-08-13Add regression test.Jeffrey Seyfried-2/+14
2016-08-13Improve comments on ! testsAndrew Cann-0/+1
2016-08-13Add explanations to testsAndrew Cann-0/+16
2016-08-13Add tests for ! typeAndrew Cann-0/+118
2016-08-13Add some tests for ! typeAndrew Cann-0/+34
2016-08-13Remove invalid compile-fail tests related to `!`Andrew Cann-178/+0
These tests check for the old error messages "`return` in a function declared as diverging" and "computation may converge in a function declared as diverging". The first of these is now invalid as `return` is permitted in functions that return `!`. The second of these is subsumed by the "mismatched types" error.
2016-08-13E0094 error message updatedJosé manuel Barroso Galindo-0/+1
Part of #35233 Fixes #35231
2016-08-13updated E0067 to new error formatClement Miao-0/+2
2016-08-12Auto merge of #35138 - petrochenkov:clarify, r=eddybbors-127/+192
Implement RFC 1506 "Clarify the relationships between various kinds of structs and variants" cc https://github.com/rust-lang/rust/issues/35626
2016-08-13Update E0302 to the new formatKrzysztof Garczynski-0/+1
2016-08-13Update E0301 to the new formatKrzysztof Garczynski-0/+1
2016-08-13Parse numeric fields in struct expressions and patternsVadim Petrochenkov-0/+20
2016-08-13Remove restrictions from tuple structs/variantsVadim Petrochenkov-137/+182
Hard errors are turned into feature gates
2016-08-12updated E0070 to new error formatClement Miao-0/+1
2016-08-12Auto merge of #35431 - GuillaumeGomez:err_codes, r=jonathandturnerbors-0/+190
Err codes r? @jonathandturner
2016-08-12Correct span for pub_restricted fieldSeo Sanghyeon-30/+0
2016-08-11Improve &-ptr printingJonathan Turner-21/+21
2016-08-12test: add more extensive tests for impl Trait.Eduard Burtescu-0/+248
2016-08-12typeck: leak auto trait obligations through impl Trait.Eduard Burtescu-0/+70
2016-08-12rustc: don't reveal specializable polymorphic projections.Eduard Burtescu-0/+12
2016-08-11Add test for #28514Vadim Petrochenkov-0/+45
Fixes #28514
2016-08-11Make `private_in_public` compatibility lint deny-by-defaultVadim Petrochenkov-55/+47
2016-08-11Auto merge of #35592 - jonathandturner:rollup, r=jonathandturnerbors-35/+93
Rollup of 23 pull requests - Successful merges: #35279, #35331, #35358, #35375, #35445, #35448, #35482, #35486, #35505, #35528, #35530, #35532, #35536, #35537, #35541, #35552, #35554, #35555, #35557, #35562, #35565, #35569, #35576 - Failed merges: #35395, #35415, #35563
2016-08-11Fix tidy testscrypto-universe-1/+1
2016-08-11Add label to E0254crypto-universe-1/+4
This issue #35513 is a part of #35233. r? @jonathandturner
2016-08-11Rollup merge of #35576 - circuitfox:E0072-update-error-format, r=jonathandturnerJonathan Turner-0/+5
E0072 update error format Part of #35233 Fixes #35506 r? @jonathandturner The bonus for this issue currently seems to be impossible to do reliably, as the compiler seems to lack span information for item names alone, like `Foo` in `struct Foo { ... }`. It would be possible to hack something together by computing span offsets, but that seems like a solution that would be begging for trouble. A proper solution to this would, of course, be to add span information to the right place (seems to be `rustc::hir::Item::name` but I may be wrong).
2016-08-11Rollup merge of #35565 - wdv4758h:E0133, r=jonathandturnerJonathan Turner-4/+12
Update E0133 to new format Part of #35233 Fix #35509 r? @jonathandturner
2016-08-11Rollup merge of #35557 - Limeth:master, r=jonathandturnerJonathan Turner-1/+5
E0263 updated to new format. Fixes #35518. Part of #35233. r? @jonathandturner
2016-08-11Rollup merge of #35555 - circuitfox:E0128-update-error-format, r=jonathandturnerJonathan Turner-0/+2
E0128 update error format Fixes #35508 Part of #35233 r? @jonathandturner