From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id AA9E31382C5 for ; Mon, 5 Apr 2021 04:27:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1661DE0878; Mon, 5 Apr 2021 04:27:17 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 12A09E0878 for ; Mon, 5 Apr 2021 04:27:13 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8A20933BF05 for ; Mon, 5 Apr 2021 04:27:11 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C9E2C4C6 for ; Mon, 5 Apr 2021 04:27:09 +0000 (UTC) From: "Georgy Yakovlev" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Georgy Yakovlev" Message-ID: <1617596775.a0103a61da2ab319aa179ff4b6e6f638f2b7fa7c.gyakovlev@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/rust/files/1.51.0-bootstrap-panic.patch dev-lang/rust/rust-1.51.0.ebuild X-VCS-Directories: dev-lang/rust/files/ dev-lang/rust/ X-VCS-Committer: gyakovlev X-VCS-Committer-Name: Georgy Yakovlev X-VCS-Revision: a0103a61da2ab319aa179ff4b6e6f638f2b7fa7c X-VCS-Branch: master Date: Mon, 5 Apr 2021 04:27:09 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: f39611fd-f71d-47a5-9ca2-77b4396652fc X-Archives-Hash: 119e10ff00195194827f1b6cc58004c4 commit: a0103a61da2ab319aa179ff4b6e6f638f2b7fa7c Author: Georgy Yakovlev gentoo org> AuthorDate: Mon Apr 5 04:25:44 2021 +0000 Commit: Georgy Yakovlev gentoo org> CommitDate: Mon Apr 5 04:26:15 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0103a61 dev-lang/rust: fix 1.51.0 bootstrap with same version Closes: https://bugs.gentoo.org/779970 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Georgy Yakovlev gentoo.org> dev-lang/rust/files/1.51.0-bootstrap-panic.patch | 43 ++++++++++++++++++++++++ dev-lang/rust/rust-1.51.0.ebuild | 1 + 2 files changed, 44 insertions(+) diff --git a/dev-lang/rust/files/1.51.0-bootstrap-panic.patch b/dev-lang/rust/files/1.51.0-bootstrap-panic.patch new file mode 100644 index 00000000000..529d5a1f402 --- /dev/null +++ b/dev-lang/rust/files/1.51.0-bootstrap-panic.patch @@ -0,0 +1,43 @@ +From 31c93397bde772764cda3058e16f9cef61895090 Mon Sep 17 00:00:00 2001 +From: Joshua Nelson +Date: Mon, 8 Feb 2021 22:51:21 -0500 +Subject: [PATCH] Use format string in bootstrap panic instead of a string + directly + +This fixes the following warning when compiling with nightly: + +``` +warning: panic message is not a string literal + --> src/bootstrap/builder.rs:1515:24 + | +1515 | panic!(out); + | ^^^ + | + = note: `#[warn(non_fmt_panic)]` on by default + = note: this is no longer accepted in Rust 2021 +help: add a "{}" format string to Display the message + | +1515 | panic!("{}", out); + | ^^^^^ +help: or use std::panic::panic_any instead + | +1515 | std::panic::panic_any(out); + | ^^^^^^^^^^^^^^^^^^^^^^ +``` +--- + src/bootstrap/builder.rs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs +index f1a160250dbe1..0f5fcb4af400d 100644 +--- a/src/bootstrap/builder.rs ++++ b/src/bootstrap/builder.rs +@@ -1490,7 +1490,7 @@ impl<'a> Builder<'a> { + for el in stack.iter().rev() { + out += &format!("\t{:?}\n", el); + } +- panic!(out); ++ panic!("{}", out); + } + if let Some(out) = self.cache.get(&step) { + self.verbose(&format!("{}c {:?}", " ".repeat(stack.len()), step)); diff --git a/dev-lang/rust/rust-1.51.0.ebuild b/dev-lang/rust/rust-1.51.0.ebuild index 630a170abe5..45c23455773 100644 --- a/dev-lang/rust/rust-1.51.0.ebuild +++ b/dev-lang/rust/rust-1.51.0.ebuild @@ -135,6 +135,7 @@ PATCHES=( "${FILESDIR}"/1.47.0-libressl.patch "${FILESDIR}"/1.47.0-ignore-broken-and-non-applicable-tests.patch "${FILESDIR}"/1.49.0-gentoo-musl-target-specs.patch + "${FILESDIR}"/1.51.0-bootstrap-panic.patch ) S="${WORKDIR}/${MY_P}-src"