diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ide/src/references/rename.rs | 6 | ||||
-rw-r--r-- | crates/parser/src/grammar/params.rs | 11 | ||||
-rw-r--r-- | crates/proc_macro_srv/Cargo.toml | 2 | ||||
-rw-r--r-- | crates/proc_macro_srv/src/dylib.rs | 4 | ||||
-rw-r--r-- | crates/rust-analyzer/src/lsp_ext.rs | 2 | ||||
-rw-r--r-- | crates/rust-analyzer/src/main_loop.rs | 2 | ||||
-rw-r--r-- | crates/rust-analyzer/src/to_proto.rs | 3 |
7 files changed, 16 insertions, 14 deletions
diff --git a/crates/ide/src/references/rename.rs b/crates/ide/src/references/rename.rs index 99a558532..ebb1ce7dd 100644 --- a/crates/ide/src/references/rename.rs +++ b/crates/ide/src/references/rename.rs | |||
@@ -415,9 +415,9 @@ fn rename_reference( | |||
415 | ) -> RenameResult<SourceChange> { | 415 | ) -> RenameResult<SourceChange> { |
416 | let ident_kind = check_identifier(new_name)?; | 416 | let ident_kind = check_identifier(new_name)?; |
417 | 417 | ||
418 | let def_is_lbl_or_lt = matches!(def, | 418 | let def_is_lbl_or_lt = matches!( |
419 | Definition::GenericParam(hir::GenericParam::LifetimeParam(_)) | 419 | def, |
420 | | Definition::Label(_) | 420 | Definition::GenericParam(hir::GenericParam::LifetimeParam(_)) | Definition::Label(_) |
421 | ); | 421 | ); |
422 | match (ident_kind, def) { | 422 | match (ident_kind, def) { |
423 | (IdentifierKind::ToSelf, _) | 423 | (IdentifierKind::ToSelf, _) |
diff --git a/crates/parser/src/grammar/params.rs b/crates/parser/src/grammar/params.rs index 6a98d7368..e313f6fb7 100644 --- a/crates/parser/src/grammar/params.rs +++ b/crates/parser/src/grammar/params.rs | |||
@@ -169,11 +169,12 @@ fn opt_self_param(p: &mut Parser, m: Marker) { | |||
169 | let la1 = p.nth(1); | 169 | let la1 = p.nth(1); |
170 | let la2 = p.nth(2); | 170 | let la2 = p.nth(2); |
171 | let la3 = p.nth(3); | 171 | let la3 = p.nth(3); |
172 | if !matches!((p.current(), la1, la2, la3), | 172 | if !matches!( |
173 | (T![&], T![self], _, _) | 173 | (p.current(), la1, la2, la3), |
174 | | (T![&], T![mut], T![self], _) | 174 | (T![&], T![self], _, _) |
175 | | (T![&], LIFETIME_IDENT, T![self], _) | 175 | | (T![&], T![mut], T![self], _) |
176 | | (T![&], LIFETIME_IDENT, T![mut], T![self]) | 176 | | (T![&], LIFETIME_IDENT, T![self], _) |
177 | | (T![&], LIFETIME_IDENT, T![mut], T![self]) | ||
177 | ) { | 178 | ) { |
178 | return m.abandon(p); | 179 | return m.abandon(p); |
179 | } | 180 | } |
diff --git a/crates/proc_macro_srv/Cargo.toml b/crates/proc_macro_srv/Cargo.toml index 208489e0d..6c8c28980 100644 --- a/crates/proc_macro_srv/Cargo.toml +++ b/crates/proc_macro_srv/Cargo.toml | |||
@@ -11,7 +11,7 @@ doctest = false | |||
11 | 11 | ||
12 | [dependencies] | 12 | [dependencies] |
13 | object = { version = "0.23", default-features = false, features = ["std", "read_core", "elf", "macho", "pe"] } | 13 | object = { version = "0.23", default-features = false, features = ["std", "read_core", "elf", "macho", "pe"] } |
14 | libloading = "0.6.0" | 14 | libloading = "0.7.0" |
15 | memmap2 = "0.2.0" | 15 | memmap2 = "0.2.0" |
16 | 16 | ||
17 | tt = { path = "../tt", version = "0.0.0" } | 17 | tt = { path = "../tt", version = "0.0.0" } |
diff --git a/crates/proc_macro_srv/src/dylib.rs b/crates/proc_macro_srv/src/dylib.rs index 00fcc7bdf..28a6ee547 100644 --- a/crates/proc_macro_srv/src/dylib.rs +++ b/crates/proc_macro_srv/src/dylib.rs | |||
@@ -60,7 +60,7 @@ fn find_registrar_symbol(file: &Path) -> io::Result<Option<String>> { | |||
60 | /// It seems that on Windows that behaviour is default, so we do nothing in that case. | 60 | /// It seems that on Windows that behaviour is default, so we do nothing in that case. |
61 | #[cfg(windows)] | 61 | #[cfg(windows)] |
62 | fn load_library(file: &Path) -> Result<Library, libloading::Error> { | 62 | fn load_library(file: &Path) -> Result<Library, libloading::Error> { |
63 | Library::new(file) | 63 | unsafe { Library::new(file) } |
64 | } | 64 | } |
65 | 65 | ||
66 | #[cfg(unix)] | 66 | #[cfg(unix)] |
@@ -71,7 +71,7 @@ fn load_library(file: &Path) -> Result<Library, libloading::Error> { | |||
71 | const RTLD_NOW: c_int = 0x00002; | 71 | const RTLD_NOW: c_int = 0x00002; |
72 | const RTLD_DEEPBIND: c_int = 0x00008; | 72 | const RTLD_DEEPBIND: c_int = 0x00008; |
73 | 73 | ||
74 | UnixLibrary::open(Some(file), RTLD_NOW | RTLD_DEEPBIND).map(|lib| lib.into()) | 74 | unsafe { UnixLibrary::open(Some(file), RTLD_NOW | RTLD_DEEPBIND).map(|lib| lib.into()) } |
75 | } | 75 | } |
76 | 76 | ||
77 | struct ProcMacroLibraryLibloading { | 77 | struct ProcMacroLibraryLibloading { |
diff --git a/crates/rust-analyzer/src/lsp_ext.rs b/crates/rust-analyzer/src/lsp_ext.rs index 670ca9a45..ce5a0e822 100644 --- a/crates/rust-analyzer/src/lsp_ext.rs +++ b/crates/rust-analyzer/src/lsp_ext.rs | |||
@@ -230,8 +230,8 @@ pub struct SsrParams { | |||
230 | 230 | ||
231 | pub enum StatusNotification {} | 231 | pub enum StatusNotification {} |
232 | 232 | ||
233 | #[serde(rename_all = "camelCase")] | ||
234 | #[derive(Serialize, Deserialize)] | 233 | #[derive(Serialize, Deserialize)] |
234 | #[serde(rename_all = "camelCase")] | ||
235 | pub enum Status { | 235 | pub enum Status { |
236 | Loading, | 236 | Loading, |
237 | ReadyPartial, | 237 | ReadyPartial, |
diff --git a/crates/rust-analyzer/src/main_loop.rs b/crates/rust-analyzer/src/main_loop.rs index f4fd1ac13..bdffff5ae 100644 --- a/crates/rust-analyzer/src/main_loop.rs +++ b/crates/rust-analyzer/src/main_loop.rs | |||
@@ -398,7 +398,7 @@ impl GlobalState { | |||
398 | } | 398 | } |
399 | 399 | ||
400 | let state_changed = self.process_changes(); | 400 | let state_changed = self.process_changes(); |
401 | let is_ready = matches!(self.status, Status::Ready { .. } ); | 401 | let is_ready = matches!(self.status, Status::Ready { .. }); |
402 | if prev_status == Status::Loading && is_ready { | 402 | if prev_status == Status::Loading && is_ready { |
403 | for flycheck in &self.flycheck { | 403 | for flycheck in &self.flycheck { |
404 | flycheck.update(); | 404 | flycheck.update(); |
diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs index 5236932e8..be10ac1ae 100644 --- a/crates/rust-analyzer/src/to_proto.rs +++ b/crates/rust-analyzer/src/to_proto.rs | |||
@@ -528,7 +528,8 @@ pub(crate) fn url_from_abs_path(path: &Path) -> lsp_types::Url { | |||
528 | assert!(path.is_absolute()); | 528 | assert!(path.is_absolute()); |
529 | let url = lsp_types::Url::from_file_path(path).unwrap(); | 529 | let url = lsp_types::Url::from_file_path(path).unwrap(); |
530 | match path.components().next() { | 530 | match path.components().next() { |
531 | Some(path::Component::Prefix(prefix)) if matches!(prefix.kind(), path::Prefix::Disk(_) | path::Prefix::VerbatimDisk(_)) => | 531 | Some(path::Component::Prefix(prefix)) |
532 | if matches!(prefix.kind(), path::Prefix::Disk(_) | path::Prefix::VerbatimDisk(_)) => | ||
532 | { | 533 | { |
533 | // Need to lowercase driver letter | 534 | // Need to lowercase driver letter |
534 | } | 535 | } |