about summary refs log tree commit diff
path: root/src/test/ui/thinlto
diff options
context:
space:
mode:
authorDavid Wood <david@davidtw.co>2019-01-22 00:35:31 +0100
committerDavid Wood <david@davidtw.co>2019-01-22 00:35:31 +0100
commit914d142c02b558a597055c66a0e7e09115416211 (patch)
tree3c63c4c6a3106f6dd4e0a86ced5e8e2b46127290 /src/test/ui/thinlto
parent3f0fc9b03569e03dbdf5fdc3a67f246aad3b40b8 (diff)
downloadrust-914d142c02b558a597055c66a0e7e09115416211.tar.gz
rust-914d142c02b558a597055c66a0e7e09115416211.zip
Extend trailing `>` detection for paths.
This commit extends the trailing `>` detection to also work for paths
such as `Foo::<Bar>>:Baz`.

This involves making the existing check take the token that is expected
to follow the path being checked as a parameter.

Care is taken to ensure that this only happens on the construction of a
whole path segment and not a partial path segment (during recursion).

Through this enhancement, it was also observed that the ordering of
right shift token and greater than tokens was overfitted to the examples
being tested.

In practice, given a sequence of `>` characters: `>>>>>>>>>`
..then they will be split into `>>` eagerly: `>> >> >> >> >`.
..but when a `<` is prepended, then the first `>>` is split:
`<T> > >> >> >> >`
..and then when another `<` is prepended, a right shift is first again:
`Vec<<T>> >> >> >> >`

In the previous commits, a example that had two `<<` characters was
always used and therefore it was incorrectly assumed that `>>` would
always be first - but when there is a single `<`, this is not the case.
Diffstat (limited to 'src/test/ui/thinlto')
0 files changed, 0 insertions, 0 deletions