about summary refs log tree commit diff
path: root/src/test/compile-fail
AgeCommit message (Collapse)AuthorLines
2016-10-27Implement field shorthands in struct literal expressions.Eduard Burtescu-0/+72
2016-10-27deprecation message for custom deriveNick Cameron-1/+3
2016-10-27deprecate no_debugNick Cameron-0/+15
2016-10-26Rollup merge of #37396 - mikhail-m1:e0221, r=jonathandturnerGuillaume Gomez-11/+21
Make error E0221 more helpful fix #35970 as part of #35233 r? @jonathandturner
2016-10-26Rollup merge of #37394 - cramertj:cramertj/unused-import-with-id, ↵Guillaume Gomez-8/+8
r=GuillaumeGomez Add identifier to unused import warnings Fix #37376. For some reason, though, I'm getting warnings with messages like "76:9: 76:16: unused import: `self::g`" instead of "unused import: `self::g`". @pnkfelix Any ideas what might be causing this?
2016-10-27add back test for issue #6804Ariel Ben-Yehuda-0/+34
2016-10-26flatten nested slice patterns in HAIR constructionAriel Ben-Yehuda-0/+16
nested slice patterns have the same functionality as non-nested ones, so flatten them in HAIR construction. Fixes #26158.
2016-10-26handle mixed byte literal and byte array patternsAriel Ben-Yehuda-0/+73
Convert byte literal pattern to byte array patterns when they are both used together. so matching them is properly handled. I could've done the conversion eagerly, but that could have caused a bad worst-case for massive byte-array matches. Fixes #18027. Fixes #25051. Fixes #26510.
2016-10-26remove StaticInliner and NaN checkingAriel Ben-Yehuda-43/+1
NaN checking was a lint for a deprecated feature. It can go away.
2016-10-26change match checking to use HAIRAriel Ben-Yehuda-4/+4
no intended functional changes
2016-10-26Prohibit patterns in trait methods without bodiesVadim Petrochenkov-0/+23
2016-10-25Auto merge of #36421 - TimNN:check-abis, r=alexcrichtonbors-2/+2
check target abi support This PR checks for each extern function / block whether the ABI / calling convention used is supported by the current target. This was achieved by adding an `abi_blacklist` field to the target specifications, listing the calling conventions unsupported for that target.
2016-10-25Auto merge of #37361 - jseyfried:fix_crate_var_regressions, r=nrcbors-0/+42
Fix `$crate`-related regressions Fixes #37345, fixes #37357, fixes #37352, and improves the `unused_extern_crates` lint. r? @nrc
2016-10-25Avoid false positive `unused_extern_crates`.Jeffrey Seyfried-0/+2
2016-10-25Support `use $crate;` with a future compatibility warning.Jeffrey Seyfried-0/+33
2016-10-25Fix `$crate`-related regressions.Jeffrey Seyfried-0/+7
2016-10-25Auto merge of #37111 - TimNN:sized-enums, r=nikomatsakisbors-23/+73
Disallow Unsized Enums Fixes #16812. This PR is a potential fix for #16812, an issue which is reported [again](https://github.com/rust-lang/rust/issues/36801) and [again](https://github.com/rust-lang/rust/issues/36975), with over a dozen duplicates by now. This PR is mainly meant to promoted discussion about the issue and the correct way to fix it. This is a [breaking-change] since the error is now reported during wfchecking, so that even the definition of a (potentially) unsized enum will cause an error (whereas it would previously cause an ICE at trans time if the enum was used in an unsized manner).
2016-10-25adapt testsTim Neumann-2/+2
2016-10-25Add identifier to unused import warningsTaylor Cramer-8/+8
2016-10-25Auto merge of #37360 - jseyfried:fix_label_scope, r=nrcbors-0/+3
resolve: fix label scopes Fixes #37353 (turns an ICE back into an error). r? @nrc
2016-10-24Rollup merge of #37324 - GuillaumeGomez:trait_error_message, r=jonathandturnerJonathan Turner-34/+37
Improve E0277 help message Fixes #37319. r? @jonathandturner
2016-10-24add new test caseTim Neumann-0/+68
2016-10-24adapt existing testsTim Neumann-23/+5
2016-10-23Make error E0221 more helpfulMikhail Modin-11/+21
2016-10-22Fix label scopes.Jeffrey Seyfried-0/+3
2016-10-22Reword error when data-less enum variant called as functionEsteban Küber-2/+6
Given a file like: ```rust enum Test { Variant, Variant2 {a: u32}, } fn main(){ let x = Test::Variant("Hello"); let y = Test::Variant2("World"); } ``` The errors now look this way: ```bash error[E0423]: `Test::Variant2` is the name of a struct or struct variant, but this expression uses it like a function name --> file3.rs:10:13 | 10 | let y = Test::Variant2("Hello"); | ^^^^^^^^^^^^^^ struct called like a function | = help: did you mean to write: `Test::Variant2 { /* fields */ }`? error: `Test::Variant` is being called, but it is not a function --> file3.rs:9:13 | 9 | let x = Test::Variant("World"); | ^^^^^^^^^^^^^^^^^^^^^^ | = help: did you mean to write: `Test::Variant`? note: defined here --> file3.rs:2:5 | 2 | Variant, | ^^^^^^^ error: aborting due to previous error ```
2016-10-21Auto merge of #37174 - mikhail-m1:dnlle, r=jonathandturnerbors-1186/+0
improve "Doesn't live long enough" error I've fixed only with same case issue #36537 part of #35233 r? @jonathandturner
2016-10-21Improve E0277 help messageGuillaume Gomez-34/+37
2016-10-21Auto merge of #37290 - petrochenkov:pnp, r=jseyfriedbors-8/+93
syntax: Tweak path parsing logic Associated paths starting with `<<` are parsed in patterns. Paths like `self::foo::bar` are interpreted as paths and not as `self` arguments in methods (cc @matklad). Now, I believe, *all* paths are consistently parsed greedily in case of ambiguity. Detection of `&'a mut self::` requires pretty large (but still fixed) lookahead, so I had to increase the size of parser's lookahead buffer. Curiously, if `lookahead_distance >= lookahead_buffer_size` was used previously, the parser hung forever, I fixed this as well, now it ICEs. r? @jseyfried
2016-10-20improve "Doesn't live long enough" errorMikhail Modin-1186/+0
2016-10-20Tweak path parsing logicVadim Petrochenkov-8/+93
2016-10-19Future proof `#[no_link]`.Jeffrey Seyfried-1/+1
2016-10-19Rollup merge of #37202 - petrochenkov:pretty, r=nrcEduard-Mihai Burtescu-20/+0
Fix some pretty printing tests Many pretty-printing tests are un-ignored. Some issues in classification of comments (trailing/isolated) and blank line counting are fixed. Some comments are printed more carefully. Some minor refactoring in pprust.rs `no-pretty-expanded` annotations are removed because this is the default now. `pretty-expanded` annotations are removed from compile-fail tests, they are not tested with pretty-printer. Closes https://github.com/rust-lang/rust/issues/23623 in favor of more specific https://github.com/rust-lang/rust/issues/37201 and https://github.com/rust-lang/rust/issues/37199 r? @nrc
2016-10-19Rollup merge of #37193 - ↵Eduard-Mihai Burtescu-5/+5
zackmdavis:pluralization_of_expected_type_arguments, r=nrc correct erroneous pluralization of '1 type argument' error messages This is in the matter of #37042.
2016-10-19Rollup merge of #37117 - pnkfelix:may-dangle-attr, r=nikomatsakisEduard-Mihai Burtescu-1/+40
`#[may_dangle]` attribute `#[may_dangle]` attribute Second step of #34761. Last big hurdle before we can work in earnest towards Allocator integration (#32838) Note: I am not clear if this is *also* a syntax-breaking change that needs to be part of a breaking-batch.
2016-10-18Fix some pretty printing testsVadim Petrochenkov-20/+0
2016-10-17Auto merge of #36915 - jfirebaugh:E0308-split, r=nikomatsakisbors-1/+1
Use a distinct error code for "if may be missing an else clause" Introduce the possibility of assigning distinct error codes to the various origin types of E0308. Start by assigning E0317 for the "IfExpressionWithNoElse" case, and write a long diagnostic specific to this case. Fixes #36596
2016-10-17Moved new dropck-eyepatch compile-fail tests to the `ui/` subtree.Felix S. Klock II-306/+0
2016-10-17Fix Subst construction: use subst from adt_def rather than Drop impl's subst.Felix S. Klock II-0/+73
This addresses issue pointed out by niko that prior code would break if the declaration order for generics does not match how they are fed into the instantiation of the type itself. (Added some tests exercising this scenario.)
2016-10-17Auto merge of #37162 - matklad:static-mut-lint, r=jseyfriedbors-2/+5
Lint against lowercase static mut Closes #37145. Lint for non mut statics was added in https://github.com/rust-lang/rust/pull/7523, and it explicitly did not cover mut statics. I am not sure why.
2016-10-17Use one message for uppercase global lintAleksey Kladov-2/+2
2016-10-15correct erroneous pluralization of '1 type argument' error messagesZack M. Davis-5/+5
This is in the matter of #37042.
2016-10-14Rollup merge of #36307 - faebser:E0408_new_error_format, r=GuillaumeGomezJonathan Turner-6/+8
Changed error message E0408 to new format Followed your text and was able to change the ouput to the new format. I did not encounter any broken test therefore this is a really small commit. Thanks for letting me hack on the compiler :) r? @jonathandturner
2016-10-14Lint against lowercase static mutAleksey Kladov-0/+3
2016-10-13Changed error message E0408 to new formatFabian Frei-6/+8
r? @jonathandturner
2016-10-12Rollup merge of #37084 - jseyfried:cleanup_expanded_macro_use_scopes, r=nrcAlex Crichton-12/+9
macros: clean up scopes of expanded `#[macro_use]` imports This PR changes the scope of macro-expanded `#[macro_use]` imports to match that of unexpanded `#[macro_use]` imports. For example, this would be allowed: ```rust example!(); macro_rules! m { () => { #[macro_use(example)] extern crate example_crate; } } m!(); ``` This PR also enforces the full shadowing restrictions from RFC 1560 on `#[macro_use]` imports (currently, we only enforce the weakened restrictions from #36767). This is a [breaking-change], but I believe it is highly unlikely to cause breakage in practice. r? @nrc
2016-10-12Rollup merge of #36995 - nrc:stable, r=@nikomatsakisAlex Crichton-36/+9
stabilise ?, attributes on stmts, deprecate Reflect r? @nikomatsakis
2016-10-12tests for `#[may_dangle]` attribute.Felix S. Klock II-0/+207
2016-10-12Fix bug in test for E0199 and add test for E0198.Felix S. Klock II-1/+20
In particular, as far as I can tell from the error diagnostics, the former test for E0199 was actually a test for E0198, and there was no test for E0198. (I am assuming that one of my previous changes to the `unsafe impl` checking fixed a latent bug in how these two cases were differentiated.)
2016-10-12Require destructors using `#[may_dangle]` to use `unsafe impl`.Felix S. Klock II-0/+46