about summary refs log tree commit diff
path: root/tests/ui/underscore-imports
AgeCommit message (Collapse)AuthorLines
2025-06-24Emit a single error when importing a path with `_`Esteban Küber-68/+122
When encountering `use _;`, `use _::*'` or similar, do not emit two errors for that single mistake. This also side-steps the issue of resolve errors suggesting adding a crate named `_` to `Cargo.toml`.
2025-06-20Make some `use _` tests multi-editionEsteban Küber-10/+84
2025-06-05Use non-2015 edition paths in tests that do not test for their resolutionLukas Wirth-18/+18
2024-11-27Update tests to use new proc-macro headerEric Huss-6/+1
2024-07-29Structured suggestion for `extern crate foo` when `foo` isn't resolved in importEsteban Küber-12/+4
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-4/+4
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-22Tweak wording of "implemented trait isn't imported" suggestionEsteban Küber-1/+1
2024-02-16[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives许杰友 Jieyou Xu (Joe)-13/+13
2023-11-24Show number in error message even for one errorNilstrieb-1/+1
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-07-23make `noop_method_call` warn by defaultDeadbeef-0/+3
2023-05-18fix(resolve): only disambiguate binding key during definebohan-0/+90
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-11Move /src/test to /testsAlbert Larsan-0/+354