summary refs log tree commit diff
path: root/src/test/ui/resolve
AgeCommit message (Collapse)AuthorLines
2018-07-17Fix doc linkFelix Rabe-1/+1
The link for comparison: - https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types--sized (broken) - https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-sized (fixed) This commit is the result of (first) searching via: find src -type f -print0 | xargs -0 fgrep -l dynamically-sized-types--sized and then replacing all relevant occurrences via: find src/{libcore,test/ui} -type f -print0 | xargs -0 sed -i.bak \ s/dynamically-sized-types--sized/dynamically-sized-types-and-sized/g find src/{libcore,test/ui} -type f -name '*.bak' -print0 | xargs -0 rm (Note: Commands run on macOS 10.13 (BSD). `sed -i.bak` should work on GNU/Linux as well, but not tested.)
2018-07-10Fix typo in error message E0277Rémy Rakic-2/+2
2018-06-23add `dyn` to display of dynamic (trait) type namesZack M. Davis-2/+2
The `dyn Trait` syntax was stabilized in 199ee327. Resolves #49277.
2018-06-19Update message for `!Sized` typesEsteban Küber-3/+3
2018-06-19Add link to book for `Sized` errorsEsteban Küber-0/+1
2018-06-19Add message to `rustc_on_unimplemented` attributes in coreEsteban Küber-3/+4
2018-06-01Add closing bracket expectation to sequences, modified appropriate test cases.Crazycolorz5-2/+2
2018-04-16Update testsJohn Kåre Alsaker-9/+4
2018-03-16Update testsJohn Kåre Alsaker-7/+17
2018-03-14Add empty main() to tests where it is missing.Eric Huss-12/+10
2018-03-14Add crate name to "main function not found" error message.Eric Huss-3/+3
Fixes #44798 and rust-lang/cargo#4948.
2018-03-14update testsGuillaume Gomez-49/+38
2018-02-27Add label to primary span in some parse errorsEsteban Küber-1/+1
2018-02-26Update UI testsVadim Petrochenkov-37/+37
2018-02-26Update UI testsVadim Petrochenkov-172/+172
2018-02-25Update ui testsGuillaume Gomez-0/+49
2018-02-10Change error message for E0391 to "cyclic dependency detected"John Kåre Alsaker-2/+2
2018-01-15Further tweaks to the outputEsteban Küber-27/+350
- Properly address Variant Ctors - Show signature if span of trait method without `self` is not available
2018-01-15Add note when trying to use `Self` as a ctorEsteban Küber-0/+4
2018-01-15Readd suggestion in enum variants with incorrect argsEsteban Küber-3/+3
2018-01-15Suggest the correct syntax for different struct typesEsteban Küber-33/+40
2018-01-15Hide suggestion to use struct ctor when it is not visibleEsteban Küber-9/+2
2018-01-02Correct for changes in line numbers in expected stderr output.Ed Schouten-23/+23
Due to the disable-cloudabi tags being added to the source files, the expected output of the compiler is altered slightly.
2018-01-02Add 'ignore-cloudabi' to tests that don't and won't build on CloudABI.Ed Schouten-0/+4
It looks like many of these tests are already disabled on emscripten, which also doesn't seem to support environment variables and subprocess spawning. Just add a similar tag for CloudABI. While there, sort some of the lists of operating systems alphabetically.
2017-12-21Do not emit type errors on recovered blocksEsteban Küber-8/+1
When a parse error occurs on a block, the parser will recover and create a block with the statements collected until that point. Now a flag stating that a recovery has been performed in this block is propagated so that the type checker knows that the type of the block (which will be identified as `()`) shouldn't be checked against the expectation to reduce the amount of irrelevant diagnostic errors shown to the user.
2017-12-14Remove NOTE/HELP annotations from UI testsVadim Petrochenkov-239/+171
2017-11-27Fix testEsteban Küber-1/+1
2017-11-24Merge cfail and ui tests into ui testsOliver Schneider-350/+311
2017-11-16Remove left over dead code from suggestion diagnostic refactoringOliver Schneider-18/+0
2017-11-15Add new error comparision to hide desugaringChristopher Vittal-13/+1
First some background: To the compiler, the following two signatures in the trait vs the impl are the same. ```rust trait Foo { fn foo(&self, &impl Debug); } impl Foo for () { fn foo<U: Debug>(&self, x: &U) { ... } } ``` We do not want to allow this, and so we add a new error and check. The check just tests that all paramters 'syntheticness' match up. As during collection, the impl Trait parameters are transformed into anonymous synthetic generics. Furthermore, causes a check for unused type parameters to be skipped in check_bounds_are_used if there is already a TyError. Thus, an unused input will not trigger `type parameter unused` errors. Update the one test that checked for this error in the case of a TyError.
2017-11-10Auto merge of #45050 - petrochenkov:ambind, r=nikomatsakisbors-0/+24
resolve: Use same rules for disambiguating fresh bindings in `match` and `let` Resolve `Unit` as a unit struct pattern in ```rust struct Unit; let Unit = x; ``` consistently with ```rust match x { Unit => {} } ``` It was previously an error. (The change also applies to unit variants and constants.) Fixes https://users.rust-lang.org/t/e0530-cannot-shadow-unit-structs-what-in-the-earthly-what/13054 (This particular change doesn't depend on a fix for the issue mentioned in https://users.rust-lang.org/t/e0530-cannot-shadow-unit-structs-what-in-the-earthly-what/13054/4) cc @rust-lang/lang r? @nikomatsakis
2017-11-03Detect `=` -> `:` typo in let bindingsEsteban Küber-19/+1
When encountering a let binding type error, attempt to parse as initializer instead. If successful, it is likely just a typo: ```rust fn main() { let x: Vec::with_capacity(10); } ``` ``` error: expected type, found `10` --> file.rs:3:31 | 3 | let x: Vec::with_capacity(10, 20); | -- ^^ | || | |help: did you mean assign here?: `=` | while parsing the type for `x` ```
2017-11-04Move some tests to UIVadim Petrochenkov-0/+24
2017-08-31WIP: don't suggest placing `use` statements into expanded codeOliver Schneider-4/+4
2017-08-31Add test for broken suggestionOliver Schneider-9/+29
2017-08-21Merge remote-tracking branch 'origin/master' into genAlex Crichton-9/+74
2017-08-17Improve placement of `use` suggestionsOliver Schneider-9/+74
2017-07-28Fix testsAlex Crichton-2/+2
2017-07-21Adjust new suggestions to the suggestion guidelinesOliver Schneider-1/+1
2017-07-18reorder span labelsgaurikholkar-7/+7
2017-07-17Change some helps to suggestionsOliver Schneider-32/+32
2017-07-06Only underline suggestion if it is not the only code being shownEsteban Küber-12/+20
2017-07-06Add extra whitespace for suggestionsEsteban Küber-7/+36
2017-07-06Make suggestion include the line numberEsteban Küber-22/+22
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-02report the total number of errors on compilation failureAriel Ben-Yehuda-1/+1
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-25/+25
This reverts commit 5558c64f33446225739c1153b43d2e309bb4f50e.
2017-06-24Don't naively point to return type on type errorEsteban Küber-3/+0
2017-06-24Detect missing `;` on methods with return type `()`Esteban Küber-1/+6
- 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
2017-06-02Add E0603 error codeGuillaume Gomez-5/+5
2017-05-30Add new error codeGuillaume Gomez-3/+3