rust/src/test/ui/pattern
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
..
bindings-after-at
move-ref-patterns
usefulness
const-pat-ice.rs
const-pat-ice.stderr
deny-irrefutable-let-patterns.rs
deny-irrefutable-let-patterns.stderr
irrefutable-let-patterns.rs
issue-66270-pat-struct-parser-recovery.rs
issue-66270-pat-struct-parser-recovery.stderr
issue-67776-match-same-name-enum-variant-refs.rs
issue-67776-match-same-name-enum-variant-refs.stderr
issue-68393-let-pat-assoc-constant.rs
issue-68393-let-pat-assoc-constant.stderr
issue-68394-let-pat-runtime-value.rs
issue-68394-let-pat-runtime-value.stderr
issue-68396-let-float-bug.rs
issue-68396-let-float-bug.stderr
issue-71042-opaquely-typed-constant-used-in-pattern.rs
issue-71042-opaquely-typed-constant-used-in-pattern.stderr
issue-74539.rs
issue-74539.stderr
issue-74702.rs
issue-74702.stderr
issue-74954.rs
pat-shadow-in-nested-binding.rs
pat-shadow-in-nested-binding.stderr
pat-struct-field-expr-has-type.rs
pat-struct-field-expr-has-type.stderr
pat-tuple-bad-type.rs
pat-tuple-bad-type.stderr
pat-tuple-overfield.rs
pat-tuple-overfield.stderr
pat-type-err-formal-param.rs
pat-type-err-formal-param.stderr
pat-type-err-let-stmt.rs
pat-type-err-let-stmt.stderr
patkind-litrange-no-expr.rs
patkind-litrange-no-expr.stderr
pattern-binding-disambiguation.rs
pattern-binding-disambiguation.stderr
pattern-error-continue.rs
pattern-error-continue.stderr
pattern-ident-path-generics.rs
pattern-ident-path-generics.stderr
pattern-tyvar-2.rs
pattern-tyvar-2.stderr
pattern-tyvar.rs
pattern-tyvar.stderr
rest-pat-semantic-disallowed.rs
rest-pat-semantic-disallowed.stderr
rest-pat-syntactic.rs