about summary refs log tree commit diff
path: root/tests/ui/unresolved
AgeCommit message (Collapse)AuthorLines
2025-06-05Use non-2015 edition paths in tests that do not test for their resolutionLukas Wirth-4/+4
2025-03-22Note potential but private items in show_candidatesxizheyin-2/+10
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-02-14Trim suggestion parts to the subset that is purely additiveMichael Goulet-1/+1
2025-02-14Consider add-prefix replacements tooMichael Goulet-3/+2
2025-02-10Show diff suggestion format on verbose replacementEsteban Küber-8/+12
``` error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/attempted-access-non-fatal.rs:7:15 | LL | let _ = 2.l; | ^ | help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix | LL - let _ = 2.l; LL + let _ = 2.0f64; | ```
2025-01-24Reword "crate not found" resolve messageEsteban Küber-6/+6
``` error[E0432]: unresolved import `some_novel_crate` --> file.rs:1:5 | 1 | use some_novel_crate::Type; | ^^^^^^^^^^^^^^^^ use of unresolved module or unlinked crate `some_novel_crate` ``` On resolve errors where there might be a missing crate, mention `cargo add foo`: ``` error[E0433]: failed to resolve: use of unresolved module or unlinked crate `nope` --> $DIR/conflicting-impl-with-err.rs:4:11 | LL | impl From<nope::Thing> for Error { | ^^^^ use of unresolved module or unlinked crate `nope` | = help: if you wanted to use a crate named `nope`, use `cargo add nope` to add it to your `Cargo.toml` ```
2024-07-29Structured suggestion for `extern crate foo` when `foo` isn't resolved in importEsteban Küber-8/+15
When encountering a name in an import that could have come from a crate that wasn't imported, use a structured suggestion to suggest `extern crate foo;` pointing at the right place in the crate. When encountering `_` in an import, do not suggest `extern crate _;`. ``` error[E0432]: unresolved import `spam` --> $DIR/import-from-missing-star-3.rs:2:9 | LL | use spam::*; | ^^^^ maybe a missing crate `spam`? | help: consider importing the `spam` crate | LL + extern crate spam; | ```
2024-07-24Do not use question as labelEsteban Küber-31/+37
We don't want to have questions in the diagnostic output. Instead, we use wording that communicates uncertainty, like "might": ``` error[E0432]: unresolved import `spam` --> $DIR/import-from-missing-star-3.rs:2:9 | LL | use spam::*; | ^^^^ you might be missing crate `spam` | = help: consider adding `extern crate spam` to use the `spam` crate ```
2024-02-16[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives许杰友 Jieyou Xu (Joe)-10/+10
2023-11-24Show number in error message even for one errorNilstrieb-4/+4
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-10-21on unresolved import disambiguate suggested path if it would collideLeón Orell Valerian Liehr-0/+109
2023-04-12Special-case item attributes in the suggestion outputEsteban Küber-1/+0
2023-04-12Tweak output for 'add line' suggestionEsteban Küber-1/+2
2023-01-17Fix use suggestion spanMichael Goulet-1/+1
2023-01-11Move /src/test to /testsAlbert Larsan-0/+204