rust/compiler
Yuki Okushi 7d3207be97
Rollup merge of #109896 - Nilstrieb:integers-are-not-fn-ptrs-remember-this-dear-transmuter, r=compiler-errors
Never consider int and float vars for `FnPtr` candidates

This solves a regression where `0.0.cmp()` was ambiguous when a custom trait with a `cmp` method was in scope.

For integers it shouldn't be a problem in practice so I wasn't able to add a test.

I'm not sure whether there could be more issues hidden in the shadows as mentioned in the issue, but this should at least fix the problematic regression immediately.

fixes #109892

r? oli-obk
2023-04-04 05:52:35 +09:00
..
2023-03-28 01:14:28 +00:00
2023-03-28 01:14:28 +00:00
2023-03-27 18:58:07 +00:00
2023-03-28 01:14:28 +00:00
2023-03-31 15:57:25 +11:00
2023-03-28 01:14:28 +00:00
2023-04-01 23:44:16 +02:00