From: bors Date: Wed, 30 Aug 2017 05:30:28 +0000 (+0000) Subject: Auto merge of #43880 - arielb1:noninvasive-probe, r=nikomatsakis X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=b58e31ac03d3f338385593496426534ad5a150a7;p=rust.git Auto merge of #43880 - arielb1:noninvasive-probe, r=nikomatsakis Remove the trait selection impl in method::probe This removes the hacky trait selection reimplementation in `method::probe`, which occasionally comes and causes problems. There are 2 issues I've found with this approach: 1. The older implementation sometimes had a "guess" type from an impl, which allowed subtyping to work. This is why I needed to make a change in `libtest`: there's an `impl Clone for fn(A)` and we're calling ` fn(&'a T) as Clone>::clone`. The older implementation would do a subtyping between the impl type and the trait type, so it would do the check for `::clone`, and confirmation would continue with the subtyping. The newer implementation directly passes ` fn(&'a T) as Clone>::clone` to selection, which fails. I'm not sure how big of a problem that would be in reality, especially after #43690 would remove the `Clone` problem, but I still want a crater run to avoid breaking the world. 2. The older implementation "looked into" impls to display error messages. I'm not sure that's an advantage - it looked exactly 1 level deep. r? @eddyb --- b58e31ac03d3f338385593496426534ad5a150a7