about summary refs log tree commit diff
path: root/tests/mir-opt/lower_array_len.array_len_raw.NormalizeArrayLen.diff
diff options
context:
space:
mode:
authorFlorian Diebold <flodiebold@gmail.com>2022-02-03 12:43:15 +0100
committerFlorian Diebold <flodiebold@gmail.com>2022-02-03 13:15:02 +0100
commit4ed5fe1554ad0133b7eaec0c93c72a69b2aab271 (patch)
tree9c2b6398f5418b07c6f0a1d28d91cffa07d0ce4d /tests/mir-opt/lower_array_len.array_len_raw.NormalizeArrayLen.diff
parent9cb6e3a190f7781cb7e243837b47e6889d204d52 (diff)
downloadrust-4ed5fe1554ad0133b7eaec0c93c72a69b2aab271.tar.gz
rust-4ed5fe1554ad0133b7eaec0c93c72a69b2aab271.zip
Fix assoc type shorthand from method bounds
In code like this:
```rust
impl<T> Option<T> {
    fn as_deref(&self) -> T::Target where T: Deref {}
}
```

when trying to resolve the associated type `T::Target`, we were only
looking at the bounds on the impl (where the type parameter is defined),
but the method can add additional bounds that can also be used to refer
to associated types. Hence, when resolving such an associated type, it's
not enough to just know the type parameter T, we also need to know
exactly where we are currently.

This fixes #11364 (beta apparently switched some bounds around).
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_len_raw.NormalizeArrayLen.diff')
0 files changed, 0 insertions, 0 deletions