summary refs log tree commit diff
path: root/src/test/ui
AgeCommit message (Collapse)AuthorLines
2016-09-26Update E0425, E0446, E0449Jonathan Turner-3/+36
2016-09-24Rollup merge of #36498 - jonathandturner:macro_std_lib, r=nikomatsakisGuillaume Gomez-6/+6
Fix wording for out-of-crate macro error This fixes the wording of the note for out-of-crate macro errors to fix https://github.com/rust-lang/rust/issues/36469 The previous wording came from older logic in the PR that was replaced without updating the note.
2016-09-16fix top level attr spansMikhail Modin-0/+32
2016-09-15Specify when type parameter shadows primitive typeEsteban Küber-0/+36
When a type parameter shadows a primitive type, the error message was non obvious. For example, given the file `file.rs`: ```rust trait Parser<T> { fn parse(text: &str) -> Option<T>; } impl<bool> Parser<bool> for bool { fn parse(text: &str) -> Option<bool> { Some(true) } } fn main() { println!("{}", bool::parse("ok").unwrap_or(false)); } ``` The output was: ```bash % rustc file.rs error[E0308]: mismatched types --> file.rs:7:14 | 7 | Some(true) | ^^^^ expected type parameter, found bool | = note: expected type `bool` = note: found type `bool` error: aborting due to previous error ``` We now show extra information about the type: ```bash % rustc file.rs error[E0308]: mismatched types --> file.rs:7:14 | 7 | Some(true) | ^^^^ expected type parameter, found bool | = note: expected type `bool` (type parameter) = note: found type `bool` (bool) error: aborting due to previous error ``` Fixes #35030
2016-09-15Fix wording for out-of-crate macro errorJonathan Turner-6/+6
2016-09-12Auto merge of #36354 - mikhail-m1:master, r=jonathandturnerbors-0/+66
fix span for errors E0537, E0535 & E0536 fix #36182 as part of #35233
2016-09-10fix span for errors E0537, E0535 & E0536Mikhail Modin-0/+66
2016-09-04Rollup merge of #36212 - razielgn:updated-e0493-to-new-format, r=jonathandturnerManish Goregaokar-0/+41
Updated e0493 to new format (+ bonus). Part of #35233. Fixes #35999. r? @jonathandturner I'm not satisfied with the bonus part, there has to be an easier way to reach into the `Drop`'s span implementation. I'm all ears. :)
2016-09-02Rollup merge of #36171 - jonathandturner:temporary_value, r=nikomatsakisJonathan Turner-2/+33
Update lifetime errors to specifically note temporaries This PR updates the error message we give in the case of a temporary value not living long enough. Before: <img width="497" alt="screen shot 2016-08-31 at 10 02 47 am" src="https://cloud.githubusercontent.com/assets/547158/18138551/27a06794-6f62-11e6-9ee2-bdf8bed75ca7.png"> Now: <img width="488" alt="screen shot 2016-08-31 at 10 03 01 am" src="https://cloud.githubusercontent.com/assets/547158/18138557/2e5cf322-6f62-11e6-9047-4a78abf3d78c.png"> Specifically, it makes the following changes: * Detects if a temporary is being used. If so, it changes the labels to mention that a temporary value specifically is in question * Simplifies wording of the existing labels to focus on lifetimes rather than values being valid * Changes the help to a note, since the help+span wasn't as helpful (and sometimes more confusing) than just a note. r? @nikomatsakis
2016-09-02Moved test on E0493 from compile-fail to ui.Federico Ravasio-0/+41
2016-08-31Update error message for lifetime of borrowed valuesJonathan Turner-2/+33
2016-08-30Guard against platforms on which the sysv64 calling convention is not valid ↵CensoredUsername-1/+1
in non-codegen tests. Remove false positive in a test that relied on the exact formatting of an error string and rewrite the sysv64 register allocation test at it was triggering undefined behaviour
2016-08-27Add UI test for E0379Keith Yeung-0/+39
2016-08-19wording fixes in error messagesJonathan Turner-3/+3
2016-08-18Auto merge of #35732 - jonathandturner:region_error_labels, r=nikomatsakisbors-0/+37
Move 'doesn't live long enough' errors to labels This patch moves the "doesn't live long enough" region-style errors to instead use labels. An example follows. Before: ``` error: `x` does not live long enough --> src/test/compile-fail/send-is-not-static-ensures-scoping.rs:26:18 | 26 | let y = &x; | ^ | note: reference must be valid for the block at 23:10... --> src/test/compile-fail/send-is-not-static-ensures-scoping.rs:23:11 | 23 | fn main() { | ^ note: ...but borrowed value is only valid for the block suffix following statement 0 at 25:18 --> src/test/compile-fail/send-is-not-static-ensures-scoping.rs:25:19 | 25 | let x = 1; | ^ ``` After: ``` error: `x` does not live long enough --> src/test/compile-fail/send-is-not-static-ensures-scoping.rs:26:18 | 26 | let y = &x; | ^ does not live long enough ... 32 | }; | - borrowed value only valid until here ... 35 | } | - borrowed value must be valid until here ``` r? @nikomatsakis
2016-08-18Auto merge of #35769 - eddyb:rollup, r=eddybbors-0/+50
Rollup of 12 pull requests - Successful merges: #35346, #35734, #35739, #35740, #35742, #35744, #35749, #35750, #35751, #35756, #35766, #35768 - Failed merges:
2016-08-17Add UI test for E0053Keith Yeung-0/+50
2016-08-17Move 'doesn't live long enough' errors to labelsJonathan Turner-0/+37
2016-08-17Rebase. Fix mutable iteration nit.Jonathan Turner-2/+2
2016-08-17Replace local backtrace with def-use, repair std macro spansJonathan Turner-0/+361
2016-08-17Fix merge conflictJonathan Turner-2/+6
2016-08-17Rollup merge of #35713 - sanxiyn:ui-test, r=nikomatsakisJonathan Turner-0/+53
Use UI test to test spans, instead of forced line break There must be lots more, but these are what I could easily find.
2016-08-16Use UI test to test spans, instead of forced line breakSeo Sanghyeon-0/+53
2016-08-16RUST_NEW_ERROR_FORMAT is no moreSeo Sanghyeon-41/+24
2016-08-12Correct span for pub_restricted fieldSeo Sanghyeon-0/+41
2016-08-05Update E0404 to new format.Ryan Scott-1/+1
2016-08-01Fix fallout in `ui/codemap_tests`.Jeffrey Seyfried-5/+2
2016-07-28Move to {integer} and {float}Jonathan Turner-1/+1
2016-07-28Rename _ to {numerics} for unknown numeric typesJonathan Turner-1/+1
2016-07-14Add unicode test to ui testsJonathan Turner-0/+22
2016-07-14Add fix for tabs. Move error unit tests->ui testsJonathan Turner-0/+391
2016-07-14Fix up some tidy-unfriendly spacingJonathan Turner-4/+4
2016-07-14Fix a couple UI test failuresJonathan Turner-15/+18
2016-05-24Satisfy tidyJonathan Turner-1/+1
2016-05-24Back to single line between errors. Add header space to secondary filesJonathan Turner-3/+0
2016-05-24Move issue-26480 cfail to ui test. Fix #33763Jonathan Turner-0/+57
2016-05-23Fix #33819 and update ui testJonathan Turner-0/+2
2016-05-16pacify the mercilous tidyNiko Matsakis-1/+20
2016-05-13add UI testing frameworkNiko Matsakis-0/+133