diff options
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/main_loop/handlers.rs | 4 | ||||
-rw-r--r-- | crates/ra_syntax/src/lexer/ptr.rs | 2 | ||||
-rw-r--r-- | crates/tools/src/lib.rs | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/.travis.yml b/.travis.yml index 36fd746dd..1af8bc1b7 100644 --- a/.travis.yml +++ b/.travis.yml | |||
@@ -9,7 +9,7 @@ env: | |||
9 | 9 | ||
10 | build: &rust_build | 10 | build: &rust_build |
11 | language: rust | 11 | language: rust |
12 | rust: beta | 12 | rust: stable |
13 | script: | 13 | script: |
14 | - cargo gen-tests --verify | 14 | - cargo gen-tests --verify |
15 | - cargo gen-syntax --verify | 15 | - cargo gen-syntax --verify |
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs index 6d5622b15..af21254e4 100644 --- a/crates/ra_lsp_server/src/main_loop/handlers.rs +++ b/crates/ra_lsp_server/src/main_loop/handlers.rs | |||
@@ -9,7 +9,7 @@ use languageserver_types::{ | |||
9 | WorkspaceEdit, ParameterInformation, SignatureInformation, Hover, HoverContents, | 9 | WorkspaceEdit, ParameterInformation, SignatureInformation, Hover, HoverContents, |
10 | }; | 10 | }; |
11 | use ra_analysis::{FileId, FoldKind, Query, RunnableKind, FilePosition}; | 11 | use ra_analysis::{FileId, FoldKind, Query, RunnableKind, FilePosition}; |
12 | use ra_syntax::{TextUnit, text_utils::contains_offset_nonstrict}; | 12 | use ra_syntax::{TextUnit, text_utils::{contains_offset_nonstrict, intersect}}; |
13 | use rustc_hash::FxHashMap; | 13 | use rustc_hash::FxHashMap; |
14 | use serde_json::to_value; | 14 | use serde_json::to_value; |
15 | 15 | ||
@@ -618,7 +618,7 @@ pub fn handle_code_action( | |||
618 | .diagnostics(file_id)? | 618 | .diagnostics(file_id)? |
619 | .into_iter() | 619 | .into_iter() |
620 | .filter_map(|d| Some((d.range, d.fix?))) | 620 | .filter_map(|d| Some((d.range, d.fix?))) |
621 | .filter(|(range, _fix)| contains_offset_nonstrict(*range, range.start())) | 621 | .filter(|(diag_range, _fix)| intersect(*diag_range, range).is_some()) |
622 | .map(|(_range, fix)| fix); | 622 | .map(|(_range, fix)| fix); |
623 | 623 | ||
624 | let mut res = Vec::new(); | 624 | let mut res = Vec::new(); |
diff --git a/crates/ra_syntax/src/lexer/ptr.rs b/crates/ra_syntax/src/lexer/ptr.rs index 7e4df51aa..0a473c991 100644 --- a/crates/ra_syntax/src/lexer/ptr.rs +++ b/crates/ra_syntax/src/lexer/ptr.rs | |||
@@ -28,7 +28,7 @@ impl<'s> Ptr<'s> { | |||
28 | } | 28 | } |
29 | 29 | ||
30 | /// Gets the nth character from the current. | 30 | /// Gets the nth character from the current. |
31 | /// For example, 0 will return the current token, 1 will return the next, etc. | 31 | /// For example, 0 will return the current character, 1 will return the next, etc. |
32 | pub fn nth(&self, n: u32) -> Option<char> { | 32 | pub fn nth(&self, n: u32) -> Option<char> { |
33 | self.chars().nth(n as usize) | 33 | self.chars().nth(n as usize) |
34 | } | 34 | } |
diff --git a/crates/tools/src/lib.rs b/crates/tools/src/lib.rs index 3013f4e36..4ff783c50 100644 --- a/crates/tools/src/lib.rs +++ b/crates/tools/src/lib.rs | |||
@@ -17,7 +17,7 @@ pub type Result<T> = ::std::result::Result<T, failure::Error>; | |||
17 | pub const GRAMMAR: &str = "crates/ra_syntax/src/grammar.ron"; | 17 | pub const GRAMMAR: &str = "crates/ra_syntax/src/grammar.ron"; |
18 | pub const SYNTAX_KINDS: &str = "crates/ra_syntax/src/syntax_kinds/generated.rs.tera"; | 18 | pub const SYNTAX_KINDS: &str = "crates/ra_syntax/src/syntax_kinds/generated.rs.tera"; |
19 | pub const AST: &str = "crates/ra_syntax/src/ast/generated.rs.tera"; | 19 | pub const AST: &str = "crates/ra_syntax/src/ast/generated.rs.tera"; |
20 | const TOOLCHAIN: &str = "beta-2018-11-24"; | 20 | const TOOLCHAIN: &str = "1.31.0"; |
21 | 21 | ||
22 | #[derive(Debug)] | 22 | #[derive(Debug)] |
23 | pub struct Test { | 23 | pub struct Test { |