rust/compiler/rustc_middle
Matthias Krüger f21728fee4
Rollup merge of #105345 - yanchen4791:issue-103582-fix, r=jackh726
Add hint for missing lifetime bound on trait object when type alias is used

Fix issue #103582.

The problem: When a type alias is used to specify the return type of the method in a trait impl, the suggestion for fixing the problem of "missing lifetime bound on trait object" of the trait impl will not be created. The issue caused by the code which searches for the return trait objects when constructing the hint suggestion is not able to find the trait objects since they are specified in the type alias path instead of the return path of the trait impl.

The solution: Trace the trait objects in the type alias path and provide them along with the alias span to generate the suggestion in case the type alias is used in return type of the method in the trait impl.
2023-01-25 22:19:51 +01:00
..
src Rollup merge of #105345 - yanchen4791:issue-103582-fix, r=jackh726 2023-01-25 22:19:51 +01:00
Cargo.toml Give a more helpful error for "trimmed_def_paths construted" 2022-12-22 13:12:15 -06:00
README.md mv compiler to compiler/ 2020-08-30 18:45:07 +03:00

For more information about how rustc works, see the rustc dev guide.