diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-06-14 08:35:46 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-14 08:35:46 +0200 |
| commit | 0468462538fcde9b54b3336ebe9380da6541ddc1 (patch) | |
| tree | eef2e487254daa54f1d222d6026969508c562ef7 /compiler/rustc_codegen_llvm/src | |
| parent | bfa098eae0b5667a8cb5bbbe990a2d7e8445571f (diff) | |
| parent | 9cf60ee9d33fadff387d83d09aef1ce43589e233 (diff) | |
| download | rust-0468462538fcde9b54b3336ebe9380da6541ddc1.tar.gz rust-0468462538fcde9b54b3336ebe9380da6541ddc1.zip | |
Rollup merge of #123962 - oli-obk:define_opaque_types5, r=lcnr
change method resolution to constrain hidden types instead of rejecting method candidates
Some of these are in probes and may affect inference. This is therefore a breaking change.
This allows new code to compile on stable:
```rust
trait Trait {}
impl Trait for u32 {}
struct Bar<T>(T);
impl Bar<u32> {
fn foo(self) {}
}
fn foo(x: bool) -> Bar<impl Sized> {
if x {
let x = foo(false);
x.foo();
//^ this used to not find the `foo` method, because while we did equate `x`'s type with possible candidates, we didn't allow opaque type inference while doing so
}
todo!()
}
```
r? ```````@compiler-errors```````
fixes #121404
cc https://github.com/rust-lang/rust/issues/116652
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
