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:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-02-03 12:21:18 +0000
committerGitHub <noreply@github.com>2022-02-03 12:21:18 +0000
commit46b5089bfaa9a6b1e72a96c922fa3dec736aeaf5 (patch)
tree9c2b6398f5418b07c6f0a1d28d91cffa07d0ce4d /tests/mir-opt/lower_array_len.array_len_raw.NormalizeArrayLen.diff
parent9cb6e3a190f7781cb7e243837b47e6889d204d52 (diff)
parent4ed5fe1554ad0133b7eaec0c93c72a69b2aab271 (diff)
downloadrust-46b5089bfaa9a6b1e72a96c922fa3dec736aeaf5.tar.gz
rust-46b5089bfaa9a6b1e72a96c922fa3dec736aeaf5.zip
Merge #11399
11399: Fix assoc type shorthand from method bounds r=flodiebold a=flodiebold

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).

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_len_raw.NormalizeArrayLen.diff')
0 files changed, 0 insertions, 0 deletions