From dafa17708838d0dc17ab175451b3c455921b4836 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Thu, 13 Jun 2019 21:59:50 +0200 Subject: [PATCH 1/2] Add alloc -> core dependency --- crates/ra_project_model/src/sysroot.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/ra_project_model/src/sysroot.rs b/crates/ra_project_model/src/sysroot.rs index 8b87aa7bdaf..72ccb61a778 100644 --- a/crates/ra_project_model/src/sysroot.rs +++ b/crates/ra_project_model/src/sysroot.rs @@ -70,6 +70,11 @@ impl Sysroot { } } } + if let Some(alloc) = sysroot.by_name("alloc") { + if let Some(core) = sysroot.by_name("core") { + sysroot.crates[alloc].deps.push(core); + } + } Ok(sysroot) } From 882daf424576d59b0dd089aa5facc9d98ac0b9fd Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Wed, 12 Jun 2019 20:38:28 +0200 Subject: [PATCH 2/2] ra-emacs-lsp: Fix company-lsp snippet handler override --- editors/emacs/ra-emacs-lsp.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editors/emacs/ra-emacs-lsp.el b/editors/emacs/ra-emacs-lsp.el index 71bc20f17f6..2ea10653341 100644 --- a/editors/emacs/ra-emacs-lsp.el +++ b/editors/emacs/ra-emacs-lsp.el @@ -81,7 +81,7 @@ (with-eval-after-load 'company-lsp ;; company-lsp provides a snippet handler for rust by default that adds () after function calls, which RA does better - (setq company-lsp--snippet-functions (assq-delete-all "rust" company-lsp--snippet-functions))) + (setq company-lsp--snippet-functions (cl-delete "rust" company-lsp--snippet-functions :key #'car :test #'equal))) ;; join lines