diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-06-06 08:27:06 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-06-06 08:27:06 +0100 |
commit | b79e6294a68fd41f0a3dbd9eb907dfe99646d77e (patch) | |
tree | 1703602891988f9d54aec6e8ef2584f8a1b982b0 | |
parent | 354be0ae8a42b0dde549660c777661ab3c21b883 (diff) | |
parent | 44363cd5d264f9bd214a3d87ad847dedf15e38e8 (diff) |
Merge #1379
1379: fix: clean up warnings r=matklad a=csmoe
r? @matklad
Co-authored-by: csmoe <[email protected]>
-rw-r--r-- | crates/ra_hir/src/diagnostics.rs | 4 | ||||
-rw-r--r-- | crates/ra_mbe/src/syntax_bridge.rs | 2 | ||||
-rw-r--r-- | crates/ra_syntax/src/parsing/lexer/numbers.rs | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_hir/src/diagnostics.rs b/crates/ra_hir/src/diagnostics.rs index 4b7b2dbee..2557ef18e 100644 --- a/crates/ra_hir/src/diagnostics.rs +++ b/crates/ra_hir/src/diagnostics.rs | |||
@@ -87,7 +87,7 @@ impl Diagnostic for NoSuchField { | |||
87 | fn syntax_node_ptr(&self) -> SyntaxNodePtr { | 87 | fn syntax_node_ptr(&self) -> SyntaxNodePtr { |
88 | self.field.into() | 88 | self.field.into() |
89 | } | 89 | } |
90 | fn as_any(&self) -> &(Any + Send + 'static) { | 90 | fn as_any(&self) -> &(dyn Any + Send + 'static) { |
91 | self | 91 | self |
92 | } | 92 | } |
93 | } | 93 | } |
@@ -109,7 +109,7 @@ impl Diagnostic for UnresolvedModule { | |||
109 | fn syntax_node_ptr(&self) -> SyntaxNodePtr { | 109 | fn syntax_node_ptr(&self) -> SyntaxNodePtr { |
110 | self.decl.into() | 110 | self.decl.into() |
111 | } | 111 | } |
112 | fn as_any(&self) -> &(Any + Send + 'static) { | 112 | fn as_any(&self) -> &(dyn Any + Send + 'static) { |
113 | self | 113 | self |
114 | } | 114 | } |
115 | } | 115 | } |
diff --git a/crates/ra_mbe/src/syntax_bridge.rs b/crates/ra_mbe/src/syntax_bridge.rs index 9d3d2ad5b..cb039ca37 100644 --- a/crates/ra_mbe/src/syntax_bridge.rs +++ b/crates/ra_mbe/src/syntax_bridge.rs | |||
@@ -47,7 +47,7 @@ pub fn syntax_node_to_token_tree(node: &SyntaxNode) -> Option<(tt::Subtree, Toke | |||
47 | 47 | ||
48 | fn token_tree_to_syntax_node<F>(tt: &tt::Subtree, f: F) -> Result<TreeArc<SyntaxNode>, ExpandError> | 48 | fn token_tree_to_syntax_node<F>(tt: &tt::Subtree, f: F) -> Result<TreeArc<SyntaxNode>, ExpandError> |
49 | where | 49 | where |
50 | F: Fn(&mut ra_parser::TokenSource, &mut ra_parser::TreeSink), | 50 | F: Fn(&mut dyn ra_parser::TokenSource, &mut dyn ra_parser::TreeSink), |
51 | { | 51 | { |
52 | let tokens = [tt.clone().into()]; | 52 | let tokens = [tt.clone().into()]; |
53 | let buffer = TokenBuffer::new(&tokens); | 53 | let buffer = TokenBuffer::new(&tokens); |
diff --git a/crates/ra_syntax/src/parsing/lexer/numbers.rs b/crates/ra_syntax/src/parsing/lexer/numbers.rs index 7f6abe1d5..874fb8b32 100644 --- a/crates/ra_syntax/src/parsing/lexer/numbers.rs +++ b/crates/ra_syntax/src/parsing/lexer/numbers.rs | |||
@@ -16,7 +16,7 @@ pub(crate) fn scan_number(c: char, ptr: &mut Ptr) -> SyntaxKind { | |||
16 | ptr.bump(); | 16 | ptr.bump(); |
17 | scan_digits(ptr, true); | 17 | scan_digits(ptr, true); |
18 | } | 18 | } |
19 | '0'...'9' | '_' | '.' | 'e' | 'E' => { | 19 | '0'..='9' | '_' | '.' | 'e' | 'E' => { |
20 | scan_digits(ptr, true); | 20 | scan_digits(ptr, true); |
21 | } | 21 | } |
22 | _ => return INT_NUMBER, | 22 | _ => return INT_NUMBER, |
@@ -47,10 +47,10 @@ pub(crate) fn scan_number(c: char, ptr: &mut Ptr) -> SyntaxKind { | |||
47 | fn scan_digits(ptr: &mut Ptr, allow_hex: bool) { | 47 | fn scan_digits(ptr: &mut Ptr, allow_hex: bool) { |
48 | while let Some(c) = ptr.current() { | 48 | while let Some(c) = ptr.current() { |
49 | match c { | 49 | match c { |
50 | '_' | '0'...'9' => { | 50 | '_' | '0'..='9' => { |
51 | ptr.bump(); | 51 | ptr.bump(); |
52 | } | 52 | } |
53 | 'a'...'f' | 'A'...'F' if allow_hex => { | 53 | 'a'..='f' | 'A'..='F' if allow_hex => { |
54 | ptr.bump(); | 54 | ptr.bump(); |
55 | } | 55 | } |
56 | _ => return, | 56 | _ => return, |