Suppress suggest try wrap when found is unresolved infer by xizheyin · Pull Request #145707 · rust-lang/rust (original) (raw)
Fixes #145634
In this example, &Some((1, 2)) is an &_, and we cannot know the exact type, so I think suppressing this suggestion is the most appropriate choice here. This is similar to / inspired by #145361.
I expanded TypeFlags to indicate whether a type contains a type with is_ty_var true.
The test with regression(#3680, #5358, #12552) are all ICE, and some are even from many years ago. Therefore, this change in PR should not have a significant impact on them?
Two commits shows the diff of the newly added test.
r? compiler