mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-16 01:38:13 +00:00
Merge #1379
1379: fix: clean up warnings r=matklad a=csmoe r? @matklad Co-authored-by: csmoe <csmoe@msn.com>
This commit is contained in:
commit
b79e6294a6
3 changed files with 6 additions and 6 deletions
|
@ -87,7 +87,7 @@ impl Diagnostic for NoSuchField {
|
|||
fn syntax_node_ptr(&self) -> SyntaxNodePtr {
|
||||
self.field.into()
|
||||
}
|
||||
fn as_any(&self) -> &(Any + Send + 'static) {
|
||||
fn as_any(&self) -> &(dyn Any + Send + 'static) {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ impl Diagnostic for UnresolvedModule {
|
|||
fn syntax_node_ptr(&self) -> SyntaxNodePtr {
|
||||
self.decl.into()
|
||||
}
|
||||
fn as_any(&self) -> &(Any + Send + 'static) {
|
||||
fn as_any(&self) -> &(dyn Any + Send + 'static) {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ pub fn syntax_node_to_token_tree(node: &SyntaxNode) -> Option<(tt::Subtree, Toke
|
|||
|
||||
fn token_tree_to_syntax_node<F>(tt: &tt::Subtree, f: F) -> Result<TreeArc<SyntaxNode>, ExpandError>
|
||||
where
|
||||
F: Fn(&mut ra_parser::TokenSource, &mut ra_parser::TreeSink),
|
||||
F: Fn(&mut dyn ra_parser::TokenSource, &mut dyn ra_parser::TreeSink),
|
||||
{
|
||||
let tokens = [tt.clone().into()];
|
||||
let buffer = TokenBuffer::new(&tokens);
|
||||
|
|
|
@ -16,7 +16,7 @@ pub(crate) fn scan_number(c: char, ptr: &mut Ptr) -> SyntaxKind {
|
|||
ptr.bump();
|
||||
scan_digits(ptr, true);
|
||||
}
|
||||
'0'...'9' | '_' | '.' | 'e' | 'E' => {
|
||||
'0'..='9' | '_' | '.' | 'e' | 'E' => {
|
||||
scan_digits(ptr, true);
|
||||
}
|
||||
_ => return INT_NUMBER,
|
||||
|
@ -47,10 +47,10 @@ pub(crate) fn scan_number(c: char, ptr: &mut Ptr) -> SyntaxKind {
|
|||
fn scan_digits(ptr: &mut Ptr, allow_hex: bool) {
|
||||
while let Some(c) = ptr.current() {
|
||||
match c {
|
||||
'_' | '0'...'9' => {
|
||||
'_' | '0'..='9' => {
|
||||
ptr.bump();
|
||||
}
|
||||
'a'...'f' | 'A'...'F' if allow_hex => {
|
||||
'a'..='f' | 'A'..='F' if allow_hex => {
|
||||
ptr.bump();
|
||||
}
|
||||
_ => return,
|
||||
|
|
Loading…
Reference in a new issue