]> git.lizzy.rs Git - rust.git/commitdiff
Merge #2552
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>
Sat, 14 Dec 2019 17:20:18 +0000 (17:20 +0000)
committerGitHub <noreply@github.com>
Sat, 14 Dec 2019 17:20:18 +0000 (17:20 +0000)
2552: fix goto definition when inbetween tokens r=matklad a=succcubbus

fixes both goto_definition and goto_type_definition.
before, when running goto between some non-trivia token and an
identifier, goto would be attempted for the non-trivia token.
but this does not make sense for e.g. L_PAREN or COLONCOLON only for
IDENTs.

this resulted in goto actions not working when running them on the first
character of some identifier e.g. for `module::<|>method()` or
`method(<|>parameter)`.

now only IDENTs will be searched for in goto actions, though i'm not sure
if this is correct or if goto should also work for some other token types.

Co-authored-by: succcubbus <16743652+succcubbus@users.noreply.github.com>

Trivial merge