From owner-svn-ports-all@freebsd.org Tue Dec 17 07:04:02 2019 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E25BD1DDD3C; Tue, 17 Dec 2019 07:04:02 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47cTdZ5lbmz3QpK; Tue, 17 Dec 2019 07:04:02 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BF299A23F; Tue, 17 Dec 2019 07:04:02 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xBH742MR034011; Tue, 17 Dec 2019 07:04:02 GMT (envelope-from tobik@FreeBSD.org) Received: (from tobik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBH742n3034010; Tue, 17 Dec 2019 07:04:02 GMT (envelope-from tobik@FreeBSD.org) Message-Id: <201912170704.xBH742n3034010@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tobik set sender to tobik@FreeBSD.org using -f From: Tobias Kortkamp Date: Tue, 17 Dec 2019 07:04:02 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r520311 - head/devel/racerd/files X-SVN-Group: ports-head X-SVN-Commit-Author: tobik X-SVN-Commit-Paths: head/devel/racerd/files X-SVN-Commit-Revision: 520311 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Dec 2019 07:04:02 -0000 Author: tobik Date: Tue Dec 17 07:04:02 2019 New Revision: 520311 URL: https://svnweb.freebsd.org/changeset/ports/520311 Log: devel/racerd: Unbreak build with Rust 1.40.0 (D22843) error[E0713]: borrow may still be in use when destructor runs --> .../cargo-crates/url-1.5.1/src/form_urlencoded.rs:251:40 | 249 | impl<'a> Target for ::UrlQuery<'a> { | -- lifetime `'a` defined here 250 | fn as_mut_string(&mut self) -> &mut String { &mut self.url.serialization } 251 | fn finish(self) -> &'a mut ::Url { self.url } | ^^^^^^^^ - here, drop of `self` needs exclusive access to `*self.url`, because the type `UrlQuery<'_>` implements the `Drop` trait | | | returning this value requires that `*self.url` is borrowed for `'a` error: aborting due to previous error Added: head/devel/racerd/files/ head/devel/racerd/files/patch-rust-1.40.0 - copied unchanged from r520309, head/sysutils/flowgger/files/patch-rust-1.40.0 Copied: head/devel/racerd/files/patch-rust-1.40.0 (from r520309, head/sysutils/flowgger/files/patch-rust-1.40.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/racerd/files/patch-rust-1.40.0 Tue Dec 17 07:04:02 2019 (r520311, copy of r520309, head/sysutils/flowgger/files/patch-rust-1.40.0) @@ -0,0 +1,55 @@ +From 2efa106431e6fb15b73478f67e37cb307bac2be6 Mon Sep 17 00:00:00 2001 +From: Simon Sapin +Date: Wed, 4 Jul 2018 22:18:36 +0200 +Subject: [PATCH] Fix a lifetime bug uncovered by NLL, thanks @lqd + +--- cargo-crates/url-1.5.1/src/form_urlencoded.rs.orig 2017-06-25 04:39:47 UTC ++++ cargo-crates/url-1.5.1/src/form_urlencoded.rs +@@ -247,8 +247,16 @@ impl<'a> Target for &'a mut String { + // * `Serializer` keeps its target in a private field + // * Unlike in other `Target` impls, `UrlQuery::finished` does not return `Self`. + impl<'a> Target for ::UrlQuery<'a> { +- fn as_mut_string(&mut self) -> &mut String { &mut self.url.serialization } +- fn finish(self) -> &'a mut ::Url { self.url } ++ fn as_mut_string(&mut self) -> &mut String { ++ &mut self.url.as_mut().unwrap().serialization ++ } ++ ++ fn finish(mut self) -> &'a mut ::Url { ++ let url = self.url.take().unwrap(); ++ url.restore_already_parsed_fragment(self.fragment.take()); ++ url ++ } ++ + type Finished = &'a mut ::Url; + } + +--- cargo-crates/url-1.5.1/src/lib.rs.orig 2017-06-25 04:39:47 UTC ++++ cargo-crates/url-1.5.1/src/lib.rs +@@ -1283,7 +1283,7 @@ impl Url { + self.serialization.push('?'); + } + +- let query = UrlQuery { url: self, fragment: fragment }; ++ let query = UrlQuery { url: Some(self), fragment: fragment }; + form_urlencoded::Serializer::for_suffix(query, query_start + "?".len()) + } + +@@ -2347,13 +2347,15 @@ fn io_error(reason: &str) -> io::Result { + /// Implementation detail of `Url::query_pairs_mut`. Typically not used directly. + #[derive(Debug)] + pub struct UrlQuery<'a> { +- url: &'a mut Url, ++ url: Option<&'a mut Url>, + fragment: Option, + } + + impl<'a> Drop for UrlQuery<'a> { + fn drop(&mut self) { +- self.url.restore_already_parsed_fragment(self.fragment.take()) ++ if let Some(url) = self.url.take() { ++ url.restore_already_parsed_fragment(self.fragment.take()) ++ } + } + } +