aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lang/rust-nightly/files/patch-rls-nightly28
1 files changed, 28 insertions, 0 deletions
diff --git a/lang/rust-nightly/files/patch-rls-nightly b/lang/rust-nightly/files/patch-rls-nightly
new file mode 100644
index 000000000000..c51ab3b7d6b7
--- /dev/null
+++ b/lang/rust-nightly/files/patch-rls-nightly
@@ -0,0 +1,28 @@
+https://github.com/rust-lang/rls/commit/085e9266e333
+
+--- src/tools/rls/src/server/mod.rs.orig 2019-01-02 15:11:46 UTC
++++ src/tools/rls/src/server/mod.rs
+@@ -170,7 +170,7 @@ impl<O: Output> LsService<O> {
+ }
+ }
+
+- fn dispatch_message(&mut self, msg: &RawMessage) -> Result<(), jsonrpc::Error> {
++ fn dispatch_message(&mut self, msg: RawMessage) -> Result<(), jsonrpc::Error> {
+ macro_rules! match_action {
+ (
+ $method: expr;
+@@ -334,9 +334,12 @@ impl<O: Output> LsService<O> {
+ }
+ }
+
+- if let Err(e) = self.dispatch_message(&raw_message) {
++ // Workaround https://github.com/rust-lang/rust/pull/55937 by moving
++ // raw_message instead of borrowing.
++ let id = raw_message.id.clone();
++ if let Err(e) = self.dispatch_message(raw_message) {
+ error!("dispatch error: {:?}, message: `{}`", e, msg_string);
+- self.output.failure(raw_message.id, e);
++ self.output.failure(id, e);
+ return ServerStateChange::Break { exit_code: 101 };
+ }
+