From owner-svn-ports-all@freebsd.org Tue Dec 17 06:40:52 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 0E5541DD4C9; Tue, 17 Dec 2019 06:40:52 +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 47cT6q6d0lz3Pb4; Tue, 17 Dec 2019 06:40:51 +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 DE9AF9E2C; Tue, 17 Dec 2019 06:40:51 +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 xBH6ep5J016544; Tue, 17 Dec 2019 06:40:51 GMT (envelope-from tobik@FreeBSD.org) Received: (from tobik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBH6epLk016543; Tue, 17 Dec 2019 06:40:51 GMT (envelope-from tobik@FreeBSD.org) Message-Id: <201912170640.xBH6epLk016543@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 06:40:51 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r520307 - head/multimedia/termplay/files X-SVN-Group: ports-head X-SVN-Commit-Author: tobik X-SVN-Commit-Paths: head/multimedia/termplay/files X-SVN-Commit-Revision: 520307 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 06:40:52 -0000 Author: tobik Date: Tue Dec 17 06:40:51 2019 New Revision: 520307 URL: https://svnweb.freebsd.org/changeset/ports/520307 Log: multimedia/termplay: Unbreak build with Rust 1.40.0 (D22843) error[E0596]: cannot borrow `**func` as mutable, as it is behind a `*const` pointer --> .../cargo-crates/gstreamer-0.11.2/src/iterator.rs:439:8 | 435 | let func = func as *const &mut (FnMut(T) -> bool); | ---- help: consider changing this to be a mutable pointer: `*mut &mut dyn std::ops::FnMut(T) -> bool` ... 439 | if (*func)(value) { | ^^^^^^^ `func` is a `*const` pointer, so the data it refers to cannot be borrowed as mutable error[E0596]: cannot borrow `**func` as mutable, as it is behind a `*const` pointer --> .../cargo-crates/gstreamer-0.11.2/src/iterator.rs:455:5 | 451 | let func = func as *const &mut (FnMut(T)); | ---- help: consider changing this to be a mutable pointer: `*mut &mut dyn std::ops::FnMut(T)` ... 455 | (*func)(value); | ^^^^^^^ `func` is a `*const` pointer, so the data it refers to cannot be borrowed as mutable error[E0596]: cannot borrow `**func` as mutable, as it is behind a `*const` pointer --> .../cargo-crates/gstreamer-0.11.2/src/iterator.rs:473:11 | 467 | let func = func as *const &mut (FnMut(U, T) -> Result); | ---- help: consider changing this to be a mutable pointer: `*mut &mut dyn std::ops::FnMut(U, T) -> std::result::Result` ... 473 | match (*func)(accum.take().unwrap(), value) { | ^^^^^^^ `func` is a `*const` pointer, so the data it refers to cannot be borrowed as mutable error: aborting due to 3 previous errors Added: head/multimedia/termplay/files/ head/multimedia/termplay/files/patch-cargo-crates_gstreamer-0.11.2_src_iterator.rs (contents, props changed) Added: head/multimedia/termplay/files/patch-cargo-crates_gstreamer-0.11.2_src_iterator.rs ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/termplay/files/patch-cargo-crates_gstreamer-0.11.2_src_iterator.rs Tue Dec 17 06:40:51 2019 (r520307) @@ -0,0 +1,38 @@ +From dba110e8ad255f7327d9f70cd7565917a303df12 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= +Date: Wed, 8 Aug 2018 09:16:18 +0200 +Subject: [PATCH] Fix build with two-phase-borrows/NLL + +--- + gstreamer/src/iterator.rs | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- cargo-crates/gstreamer-0.11.2/src/iterator.rs.orig 2019-12-17 06:25:59 UTC ++++ cargo-crates/gstreamer-0.11.2/src/iterator.rs +@@ -432,7 +432,7 @@ where + callback_guard!(); + let value = value as *const gobject_ffi::GValue; + +- let func = func as *const &mut (FnMut(T) -> bool); ++ let func = func as *mut &mut (FnMut(T) -> bool); + let value = &*(value as *const glib::Value); + let value = value.get::().unwrap(); + +@@ -448,7 +448,7 @@ where + for<'a> T: FromValueOptional<'a> + 'static, + { + callback_guard!(); +- let func = func as *const &mut (FnMut(T)); ++ let func = func as *mut &mut (FnMut(T)); + let value = &*(value as *const glib::Value); + let value = value.get::().unwrap(); + +@@ -464,7 +464,7 @@ where + for<'a> T: FromValueOptional<'a> + 'static, + { + callback_guard!(); +- let func = func as *const &mut (FnMut(U, T) -> Result); ++ let func = func as *mut &mut (FnMut(U, T) -> Result); + let value = &*(value as *const glib::Value); + let value = value.get::().unwrap(); +