diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-09-22 23:01:38 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2019-09-22 23:01:38 +0100 |
commit | c2d9cca4e42ad052cf8a37ba3f6d9eacae07cbea (patch) | |
tree | 9f800613bde5ef6b80ab6a637990a6be69995dd4 /crates/ra_syntax/test_data/lexer/0002_whitespace.rs | |
parent | efcbca95595d31bb4c2c6782530d5a7a64a4191f (diff) | |
parent | bc905d202c613a831f7c1abb846b612900a9b43a (diff) |
Merge #1895
1895: Handle associated type shorthand (`T::Item`) (Second attempt) r=flodiebold a=flodiebold
This is only allowed for generic parameters (including `Self` in traits), and
special care needs to be taken to not run into cycles while resolving it,
because we use the where clauses of the generic parameter to find candidates for
the trait containing the associated type, but the where clauses may themselves
contain instances of short-hand associated types.
In some cases this is even fine, e.g. we might have `T: Trait<U::Item>, U:
Iterator`. If there is a cycle, we'll currently panic, which isn't great, but
better than overflowing the stack...
Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/ra_syntax/test_data/lexer/0002_whitespace.rs')
0 files changed, 0 insertions, 0 deletions