svn commit: r489131 - head/lang/rust-nightly/files

Jan Beich jbeich at FreeBSD.org
Thu Jan 3 03:49:58 UTC 2019


Author: jbeich
Date: Thu Jan  3 03:49:57 2019
New Revision: 489131
URL: https://svnweb.freebsd.org/changeset/ports/489131

Log:
  lang/rust-nightly: unbreak after r489123
  
  error[E0621]: explicit lifetime required in the type of `msg`
     --> src/tools/rls/src/server/mod.rs:185:21
      |
  173 |       fn dispatch_message(&mut self, msg: &RawMessage) -> Result<(), jsonrpc::Error> {
      |                                           ----------- help: add explicit lifetime `'static` to the type of `msg`: `&'static server::message::RawMessage`
  ...
  185 |                       <$n_action as LSPNotification>::METHOD => {
      |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime `'static` required
  ...
  259 | /         match_action!(
  260 | |             msg.method;
  261 | |             notifications:
  262 | |                 notifications::Initialized,
  ...   |
  287 | |                 requests::CodeLensRequest;
  288 | |         );
      | |__________- in this macro invocation

Added:
  head/lang/rust-nightly/files/patch-rls-nightly   (contents, props changed)

Added: head/lang/rust-nightly/files/patch-rls-nightly
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/rust-nightly/files/patch-rls-nightly	Thu Jan  3 03:49:57 2019	(r489131)
@@ -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 };
+         }
+ 


More information about the svn-ports-head mailing list