mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Add proper test for literals and fixed typo bug
This commit is contained in:
parent
1ea0238e53
commit
7abc06bd57
3 changed files with 51 additions and 5 deletions
|
@ -217,7 +217,7 @@ fn scan_literal_suffix(ptr: &mut Ptr) {
|
|||
|
||||
pub fn classify_literal(text: &str) -> Option<Token> {
|
||||
let tkn = next_token(text);
|
||||
if tkn.kind.is_literal() || tkn.len.to_usize() != text.len() {
|
||||
if !tkn.kind.is_literal() || tkn.len.to_usize() != text.len() {
|
||||
return None;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue