rust/src
Yuki Okushi 8ee962f88e
Rollup merge of #87775 - Kobzol:single-associated-item-hint, r=oli-obk
Add hint for unresolved associated trait items if the trait has a single item

This PR introduces a special-cased hint for unresolved trait items paths. It is shown if:
- the path was not resolved to any existing trait item
- and no existing trait item's name was reasonably close with regard to edit distance
- and the trait only has a single item in the corresponding namespace

I didn't know where I should put tests, therefore so far I just managed to bless two existing tests. I would be glad for hints where should tests for a hint like this be created, how should they be named (with reference to the original issue?) and what tests should I create (is it enough to test it just for types? or create separate tests also for functions and constants?).

It could also be turned into a machine applicable suggestion I suppose.

This is my first `rustc` PR, so please go easy on me :)

Fixes: https://github.com/rust-lang/rust/issues/87638
2021-08-07 01:46:33 +09:00
..
bootstrap Rollup merge of #85807 - glaubitz:powerpc-disable-initial-exec-tls, r=Mark-Simulacrum 2021-08-07 01:46:31 +09:00
build_helper
ci
doc
etc
librustdoc Remove LightSpan and use Span directly 2021-08-05 23:08:29 +02:00
llvm-project@260e0f8682
rustdoc-json-types
test Rollup merge of #87775 - Kobzol:single-associated-item-hint, r=oli-obk 2021-08-07 01:46:33 +09:00
tools Auto merge of #87462 - ibraheemdev:tidy-file-length-ignore-comment, r=Mark-Simulacrum 2021-08-06 02:07:01 +00:00
README.md
stage0.txt
version

This directory contains the source code of the rust project, including:

  • The test suite
  • The bootstrapping build system
  • Various submodules for tools, like rustdoc, rls, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.