summary refs log tree commit diff
path: root/src/test/ui/resolve
AgeCommit message (Collapse)AuthorLines
2017-04-12Add a way to get shorter spans until `char` for pointing at defsEsteban Küber-1/+1
```rust error[E0072]: recursive type `X` has infinite size --> file.rs:10:1 | 10 | struct X { | ^^^^^^^^ recursive type has infinite size | = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `X` representable ``` vs ```rust error[E0072]: recursive type `X` has infinite size --> file.rs:10:1 | 10 | struct X { | _^ starting here... 11 | | x: X, 12 | | } | |_^ ...ending here: recursive type has infinite size | = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `X` representable ```
2017-04-04Merge branch 'master' into issue-32540Esteban Küber-4/+0
2017-03-30update UI testNiko Matsakis-4/+0
We no longer give suggestions; this is presumably related to the changes I made in coercion. However, those suggestions appear to be wrong anyhow!
2017-03-25Improve wording and spans for unexpected tokenEsteban Küber-7/+3
* Point at where the token was expected instead of the last token successfuly parsed. * Only show `unexpected token` if the next char and the unexpected token don't have the same span. * Change some cfail and pfail tests to ui test. * Don't show all possible tokens in span label if they are more than 6.
2017-03-24Point at last valid token on failed `expect_one_of`Esteban Küber-3/+10
```rust error: expected one of `.`, `;`, `?`, `}`, or an operator, found `)` --> $DIR/token-error-correct-3.rs:29:9 | 25 | foo() | - expected one of `.`, `;`, `?`, `}`, or an operator after this ... 29 | } else { | ^ unexpected token ```
2017-03-15Stabilize pub(restricted)Taylor Cramer-20/+16
2017-03-12Rollup merge of #40369 - petrochenkov:segspan, r=eddybCorey Farwell-21/+39
Give spans to individual path segments in AST And use these spans in path resolution diagnostics. The spans are spans of identifiers in segments, not whole segments. I'm not sure what spans are more useful in general, but identifier spans are a better fit for resolve errors. HIR still doesn't have spans. Fixes https://github.com/rust-lang/rust/pull/38927#discussion_r95336667 https://github.com/rust-lang/rust/pull/38890#issuecomment-271731008 r? @nrc @eddyb
2017-03-10resolve: Use path segment spans in smart_resolve_pathVadim Petrochenkov-21/+39
2017-03-10Update syntax for `pub(restricted)`Vadim Petrochenkov-2/+2
2017-02-25rustc_const_eval: always demand typeck_tables for evaluating constants.Eduard-Mihai Burtescu-7/+1
2017-02-25rustc_typeck: simplify AstConv requests as implemented by collect.Eduard-Mihai Burtescu-2/+9
2017-01-29Improve diagnostics for inaccessible constructorsVadim Petrochenkov-0/+137
2017-01-21Resolve `Self` in impl headersVadim Petrochenkov-10/+2
2017-01-20Rollup merge of #39168 - estebank:multiline-candidate, r=petrochenkovAlex Crichton-20/+20
Use multiline Diagnostic for candidate in other module ``` error[E0574]: expected struct, variant or union type, found enum `Result` --> $DIR/issue-16058.rs:19:9 | 19 | Result { | ^^^^^^ not a struct, variant or union type | = help: possible better candidates are found in other modules, you can import them into scope: `use std::fmt::Result;` `use std::io::Result;` `use std::thread::Result;` error: aborting due to previous error ```
2017-01-18Use multiline Diagnostic for candidate in other moduleEsteban Küber-20/+20
2017-01-17Teach Diagnostics to highlight textEsteban Küber-1/+1
2017-01-13resolve: Levenshtein-based suggestions for non-import pathsVadim Petrochenkov-3/+92
2017-01-12resolve: Do not use "resolve"/"resolution" in error messagesVadim Petrochenkov-109/+109
2017-01-07Teach diagnostics to have correctly padded listsEsteban Küber-3/+3
Make the suggestion list have a correct padding: ``` error[E0308]: mismatched types --> file.rs:3:20 | 3 | let x: usize = ""; | ^^ expected usize, found reference | = note: expected type `usize` = note: found type `&'static str` = help: here are some functions which might fulfill your needs: - .len() - .foo() - .bar() ```
2016-12-26More systematic error reporting in path resolutionVadim Petrochenkov-240/+277
2016-12-26Move some compile-fail tests into UI directoryVadim Petrochenkov-0/+1953