rust/src/test/ui/bad
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
..
bad-const-type.rs pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
bad-const-type.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
bad-crate-name.rs Remove licenses 2018-12-25 21:08:33 -07:00
bad-crate-name.stderr Increase spacing for suggestions in diagnostics 2019-10-24 12:26:01 -07:00
bad-env-capture.rs Remove licenses 2018-12-25 21:08:33 -07:00
bad-env-capture.stderr hide --explain hint if error has no extended info 2019-04-18 13:29:28 -04:00
bad-env-capture2.rs Remove licenses 2018-12-25 21:08:33 -07:00
bad-env-capture2.stderr hide --explain hint if error has no extended info 2019-04-18 13:29:28 -04:00
bad-env-capture3.rs Remove licenses 2018-12-25 21:08:33 -07:00
bad-env-capture3.stderr hide --explain hint if error has no extended info 2019-04-18 13:29:28 -04:00
bad-expr-lhs.rs Improve invalid assignment error 2019-12-23 11:16:51 +00:00
bad-expr-lhs.stderr Add new folder for destructuring assignment tests 2019-12-23 11:20:13 +00:00
bad-expr-path.rs Add backticks to various diagnostics 2020-01-05 00:17:46 +00:00
bad-expr-path.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
bad-expr-path2.rs Add backticks to various diagnostics 2020-01-05 00:17:46 +00:00
bad-expr-path2.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
bad-extern-link-attrs.rs Remove licenses 2018-12-25 21:08:33 -07:00
bad-extern-link-attrs.stderr normalize use of backticks in compiler messages for librustc_metadata 2019-07-19 22:24:56 +02:00
bad-intrinsic-monomorphization.rs rework run-fail and support check,build-fail 2019-12-21 22:16:00 +01:00
bad-intrinsic-monomorphization.stderr rework run-fail and support check,build-fail 2019-12-21 22:16:00 +01:00
bad-lint-cap.rs Remove licenses 2018-12-25 21:08:33 -07:00
bad-lint-cap.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
bad-lint-cap2.rs Remove licenses 2018-12-25 21:08:33 -07:00
bad-lint-cap2.stderr Normalise notes with the/is 2020-01-24 16:24:50 +00:00
bad-lint-cap3.rs compiletest: Remove skip-codegen 2019-06-16 12:23:22 +03:00
bad-lint-cap3.stderr rustc: Add a warning count upon completion 2020-04-11 16:15:24 +02:00
bad-main.rs Add backticks to various diagnostics 2020-01-05 00:17:46 +00:00
bad-main.stderr Add backticks to various diagnostics 2020-01-05 00:17:46 +00:00
bad-method-typaram-kind.rs Remove licenses 2018-12-25 21:08:33 -07:00
bad-method-typaram-kind.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
bad-mid-path-type-params.rs Remove licenses 2018-12-25 21:08:33 -07:00
bad-mid-path-type-params.stderr Remove licenses 2018-12-25 21:08:33 -07:00
bad-module.rs Clarify message about unresolved use 2020-09-01 18:38:14 +01:00
bad-module.stderr Clarify message about unresolved use 2020-09-01 18:38:14 +01:00
bad-sized.rs Update ui test suite to use dyn 2019-05-29 00:57:31 -04:00
bad-sized.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
bad-type-env-capture.rs Make name resolution handle consts in GenericParamsFromOuterFunction properly 2019-02-07 15:03:20 +01:00
bad-type-env-capture.stderr Resolve inconsistency in error messages between "parameter" and "variable". 2019-04-17 13:25:07 +03:00