diff options
author | bors <bors@rust-lang.org> | 2023-01-10 06:22:01 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2023-01-10 06:22:01 +0000 |
commit | 0442fbabe24ec43636a80ad1f40a0ad92a2e38df (patch) | |
tree | a494ceba9b45768bd74fce08dfaceccf3bd0c902 /tests/rustdoc-js-std/parser-errors.js | |
parent | deba5ddd0776108c51a69844d0ffe3f96886dd52 (diff) | |
parent | 4f15034b55f6c9e134f7644c4571faa5ddb5facb (diff) | |
download | rust-0442fbabe24ec43636a80ad1f40a0ad92a2e38df.tar.gz |
Auto merge of #106607 - compiler-errors:be-more-accurate-abt-method-suggestions, r=oli-obk
Consider return type when giving various method suggestions
1. Fix a bug in method probe where we weren't normalizing `xform_ret_ty` for non-`impl` method candidates. This shouldn't affect happy-path code, since we only use `xform_ret_ty` when probing methods for diagnostics (I think).
2. Pass the return type expectation down to `lookup_probe`/`probe_for_name` usages in diagnostics. Added a few UI tests to gate against bad suggestions.
3. Make a `FnCtxt::lookup_probe_for_diagnostic` which properly passes down `IsSuggestion(true)`. Should help suppress other weird notes in some corner cases.
Diffstat (limited to 'tests/rustdoc-js-std/parser-errors.js')
0 files changed, 0 insertions, 0 deletions