rust/src/test/ui/use
Tyler Mandry 5ea55518bc
Rollup merge of #75984 - kornelski:typeormodule, r=matthewjasper
Improve unresolved use error message

"use of undeclared type or module `foo`" doesn't mention that it could be a crate.

This error can happen when users forget to add a dependency to `Cargo.toml`, so I think it's important to mention that it could be a missing crate.

I've used a heuristic based on Rust's naming conventions. It complains about an unknown type if the ident starts with an upper-case letter, and crate or module otherwise. It seems to work very well. The expanded error help covers both an unknown type and a missing crate case.
2020-09-09 15:05:45 -07:00
..
auxiliary add a test for #60976 2020-01-23 15:37:39 +02:00
use-mod Alter wording for use foo::self help 2020-05-19 22:12:41 +02:00
issue-18986.rs
issue-18986.stderr
issue-60976-extern-use-primitive-type.rs add a test for #60976 2020-01-23 15:37:39 +02:00
use-after-move-based-on-type.rs
use-after-move-based-on-type.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
use-after-move-implicity-coerced-object.rs
use-after-move-implicity-coerced-object.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
use-after-move-self-based-on-type.rs
use-after-move-self-based-on-type.stderr Explain move errors that occur due to method calls involving self 2020-06-26 16:28:09 -04:00
use-after-move-self.rs
use-after-move-self.stderr Explain move errors that occur due to method calls involving self 2020-06-26 16:28:09 -04:00
use-associated-const.rs
use-associated-const.stderr
use-from-trait-xc.rs
use-from-trait-xc.stderr Normalize wording of privacy access labels 2020-03-22 15:36:54 -07:00
use-from-trait.rs
use-from-trait.stderr
use-keyword.rs
use-keyword.stderr Suggest fixes for use foo::self 2020-05-19 20:40:46 +02:00
use-meta-mismatch.rs
use-meta-mismatch.stderr
use-mod.rs
use-mod.stderr
use-nested-groups-error.rs
use-nested-groups-error.stderr
use-nested-groups-unused-imports.rs
use-nested-groups-unused-imports.stderr Normalise notes with the/is 2020-01-24 16:24:50 +00:00
use-paths-as-items.rs
use-paths-as-items.stderr
use-self-type.rs Clarify message about unresolved use 2020-09-01 18:38:14 +01:00
use-self-type.stderr Clarify message about unresolved use 2020-09-01 18:38:14 +01:00
use-super-global-path.rs
use-super-global-path.stderr reword "possible candidate" import suggestion 2020-05-07 00:33:25 -04:00