1
Fork 0
rust/compiler/rustc_resolve/src
Dylan DPC b6780b3a20
Rollup merge of #83669 - kwj2104:issue-81508-fix, r=varkor
Issue 81508 fix

Fix #81508

**Problem**: When variable name is used incorrectly as path, error and warning point to undeclared/unused name, when in fact the name is used, just incorrectly (should be used as a variable, not part of a path).

**Summary for fix**: When path resolution errs, diagnostics checks for variables in ```ValueNS``` that have the same name (e.g., variable rather than path named Foo), and adds additional suggestion that user may actually intend to use the variable name rather than a path.

The fix does not suppress or otherwise change the *warning* that results. I did not find a straightforward way in the code to modify this, but would love to make changes here as well with any guidance.
2021-04-12 01:04:03 +02:00
..
late Auto merge of #83870 - jackh726:binder-refactor-fix, r=nikomatsakis 2021-04-09 01:50:01 +00:00
build_reduced_graph.rs ast/hir: Rename field-related structures 2021-03-16 11:41:24 +03:00
check_unused.rs Attach TokenStream to ast::Visibility 2020-09-10 17:33:06 -04:00
def_collector.rs ast/hir: Rename field-related structures 2021-03-16 11:41:24 +03:00
diagnostics.rs resolve: Partially unify early and late scope-relative ident resolution 2021-03-27 23:38:17 +03:00
imports.rs Fix ICE with use clippy:🅰️:b; 2021-03-21 14:20:28 -07:00
late.rs Added additional comments and minor edits 2021-04-07 12:35:39 -04:00
lib.rs Rollup merge of #83669 - kwj2104:issue-81508-fix, r=varkor 2021-04-12 01:04:03 +02:00
macros.rs resolve: Stable order for derive helper attributes 2021-04-04 17:51:41 +03:00