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) } 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