summary refs log tree commit diff
path: root/src/test/ui
AgeCommit message (Collapse)AuthorLines
2017-07-17Auto merge of #43266 - feadoor:issue-43253-exclusive-range-warning, ↵bors-0/+71
r=nikomatsakis Fix `range_covered_by_constructor` for exclusive ranges. This resolves #43253
2017-07-17Move resolve diagnostic instability to compile-failOliver Schneider-37/+3
The produced paths aren't stable between builds, since reporting paths inside resolve, before resolve is finished might produce paths resolved to type aliases instead of the concrete type. Compile-fail tests can match just parts of messages, so they don't "suffer" from this issue. This is just a workaround, the instability should be fixed in the future.
2017-07-17Change some helps to suggestionsOliver Schneider-101/+78
2017-07-17Move some tests from compile-fail to uiOliver Schneider-0/+313
2017-07-16Fix `range_covered_by_constructor` for exclusive ranges.Sam Cappleman-Lynes-0/+71
This resolves #43253
2017-07-12Rollup merge of #43000 - estebank:on-unimplemented-path, r=arielb1Mark Simulacrum-0/+346
`rustc_on_unimplemented` supports referring to trait Add support to `rustc_on_unimplemented` to reference the full path of the annotated trait. For the following code: ```rust pub mod Bar { #[rustc_on_unimplemented = "test error `{Self}` with `{Bar}` `{Baz}` `{Quux}` in `{Foo}`"] pub trait Foo<Bar, Baz, Quux> {} } ``` the error message will be: ``` test error `std::string::String` with `u8` `_` `u32` in `Bar::Foo` ```
2017-07-11Merge ui/README.md into COMPILER_TESTS.md and describe how custom UI ↵kennytm-31/+0
normalization works.
2017-07-11compiletest: Support custom normalization rules.kennytm-74/+47
2017-07-08Auto merge of #42996 - Boreeas:merge-e0609-e0612, r=GuillaumeGomezbors-2/+2
Fold E0612, E0613 into E0609 As discussed in #42945, with PR 1506 tuple indices are no longer considered a separate case from normal field. This PR folds E06012 ("tuple index out of bounds") and E0613 ("type is not a tuple") into E0609 ("type does not have field with that name") Resolves #42945
2017-07-08Make sufficiently old or low-impact compatibility lints deny-by-defaultVadim Petrochenkov-18/+9
2017-07-08Remove more anonymous trait method parametersVadim Petrochenkov-10/+10
2017-07-07Fold E0613 into E0609boreeas-2/+2
Resolves #42945
2017-07-07Auto merge of #42809 - seanmonstar:stable-associated-consts, r=nikomatsakisbors-47/+43
remove associated_consts feature gate Currently struggling to run tests locally (something about jemalloc target missing). cc #29646
2017-07-07syntax: Apply recovery for casts to type ascriptionVadim Petrochenkov-33/+102
Fix spans, add some comments
2017-07-07Fix spans for binary operator expression with interpolated identifiersVadim Petrochenkov-0/+33
2017-07-06Only underline suggestion if it is not the only code being shownEsteban Küber-24/+69
2017-07-06Add extra whitespace for suggestionsEsteban Küber-7/+44
2017-07-06Make suggestion include the line numberEsteban Küber-26/+26
When there're more than one suggestions in the same diagnostic, they are displayed in their own block, instead of inline. In order to reduce confusion, those blocks now display the line number.
2017-07-06remove associated_consts feature gateSean McArthur-47/+43
2017-07-05Add `rustc_on_unimplemented` message to `std::ops::Try`Esteban Küber-0/+27
2017-07-05`rustc_on_unimplemented` supports referring to traitEsteban Küber-0/+346
Add support to `rustc_on_unimplemented` to reference the full path of the annotated trait. For the following code: ```rust pub mod Bar { #[rustc_on_unimplemented = "test error `{Self}` with `{Bar}` `{Baz}` `{Quux}` in `{Foo}`"] pub trait Foo<Bar, Baz, Quux> {} } ``` the error message will be: ``` test error `std::string::String` with `u8` `_` `u32` in `Bar::Foo` ```
2017-07-05Merge remote-tracking branch 'origin/master' into proc_macro_apiAlex Crichton-370/+1298
2017-07-02report the total number of errors on compilation failureAriel Ben-Yehuda-50/+85
Prior to this PR, when we aborted because a "critical pass" failed, we displayed the number of errors from that critical pass. While that's the number of errors that caused compilation to abort in *that place*, that's not what people really want to know. Instead, always report the total number of errors, and don't bother to track the number of errors from the last pass that failed. This changes the compiler driver API to handle errors more smoothly, and therefore is a compiler-api-[breaking-change]. Fixes #42793.
2017-07-02Revert "Change error count messages"Ariel Ben-Yehuda-246/+246
This reverts commit 5558c64f33446225739c1153b43d2e309bb4f50e.
2017-06-30Rollup merge of #42669 - gaurikholkar:master, r=nikomatsakisGuillaume Gomez-36/+305
Adding diagnostic code 0611 for lifetime errors with one named, one anonymous lifetime parameter This is a fix for #42517 Note that this only handles the above case for **function declarations** and **traits**. `impl items` and `closures` will be handled in a later PR. Example ``` fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 { if x > y { x } else { y } } ``` now displays the following error message. ui tests have been added for the same. ``` error[E0611]: explicit lifetime required in the type of `x` 11 | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 { | ^ consider changing the type of `x` to `&'a i32` 12 | if x > y { x } else { y } | - lifetime `'a` required ``` #42516 r? @nikomatsakis
2017-06-30Auto merge of #42807 - arielb1:consistent-coercion, r=eddybbors-22/+12
Coerce fields to the expected field type Fully fixes #31260. This needs a crater run. I was supposed to do this last month but it slipped. Let's get this done.
2017-06-29adding compile-fail testgaurikholkar-53/+0
2017-06-29Changing the error code to E0621gaurikholkar-7/+7
2017-06-29Adding changes to track anonymous region in selfgaurikholkar-3/+53
2017-06-29track anonymous regions in return types, fix tidy errorsgaurikholkar-1/+52
2017-06-29Enabling E0611 for inherent functionsgaurikholkar-0/+63
2017-06-29Interchange ^ and -gaurikholkar-15/+15
2017-06-29update reference for testNiko Matsakis-5/+5
2017-06-29Adding new ui test for trait implgaurikholkar-0/+54
2017-06-29Adding diagnostic code 0611 for lifetime errors with one named, one ↵gaurikholkar-38/+142
anonymous lifetime parameter
2017-06-29Rollup merge of #42953 - estebank:fix-20729, r=petrochenkovAriel Ben-Yehuda-0/+68
Move type parameter shadowing test to `ui` Fix #20729.
2017-06-29Rollup merge of #42919 - zackmdavis:once_again_we_heard_you_the_first_time, ↵Ariel Ben-Yehuda-11/+7
r=eddyb make lint on-by-default/implied-by messages appear only once From review discussion on #38103 (https://github.com/rust-lang/rust/pull/38103#discussion_r94845060). ![we_heard](https://user-images.githubusercontent.com/1076988/27564103-6284b78e-5a8a-11e7-9d35-f7f297ca9573.png) r? @nikomatsakis
2017-06-28Move type parameter shadowing test to `ui`Esteban Küber-0/+68
2017-06-28Auto merge of #42850 - estebank:unwanted-return-rotj, r=nikomatsakisbors-11/+518
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-27Review commentsEsteban Küber-4/+0
- Fix typo - Add docstring - Remove spurious test output file
2017-06-26Rollup merge of #42874 - zackmdavis:overzealous_by_outer_forbid, r=nikomatsakisCorey Farwell-0/+51
only set "overruled by outer forbid" once for lint groups, by group name Previously, conflicting forbid/allow attributes for a lint group would result in a separate "allow(L) overruled by outer forbid(L)" error for every lint L in the group. This was needlessly and annoyingly verbose; we prefer to just have one error pointing out the conflicting attributes. (Also, while we're touching context.rs, clean up some unused arguments.) Resolves #42873.
2017-06-26make lint on-by-default/implied-by messages appear only onceZack M. Davis-11/+7
From review discussion on #38103 (https://github.com/rust-lang/rust/pull/38103#discussion_r94845060).
2017-06-26Update UI test with proc_macro changesAlex Crichton-0/+3
2017-06-26Simplify `hygiene::Mark` application, andJeffrey Seyfried-1/+1
remove variant `Token::SubstNt` in favor of `quoted::TokenTree::MetaVar`.
2017-06-24Don't naively point to return type on type errorEsteban Küber-39/+3
2017-06-24wording improvementGuillaume Gomez-6/+6
2017-06-24Add E0607Guillaume Gomez-1/+1
2017-06-24Add E0606Guillaume Gomez-22/+22
2017-06-24Add E0605Guillaume Gomez-6/+18
2017-06-24Add E0604Guillaume Gomez-1/+1