mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Don't remap float tokens to INT_NUMBER
This commit is contained in:
parent
f8c0062d4e
commit
cb5e8da88a
4 changed files with 45 additions and 4 deletions
|
@ -243,6 +243,8 @@ fn convert_tokens<C: TokenConvertor>(conv: &mut C) -> tt::Subtree {
|
|||
let char = match token.to_char(conv) {
|
||||
Some(c) => c,
|
||||
None => {
|
||||
// FIXME: this isn't really correct, `to_char` yields the *first* char of the token,
|
||||
// and this is relevant when eg. creating 2 `tt::Punct` from a single `::` token
|
||||
panic!("Token from lexer must be single char: token = {:#?}", token);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue