public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Georgy Yakovlev" <gyakovlev@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
Date: Mon,  5 Apr 2021 04:27:09 +0000 (UTC)	[thread overview]
Message-ID: <1617596775.a0103a61da2ab319aa179ff4b6e6f638f2b7fa7c.gyakovlev@gentoo> (raw)

commit:     a0103a61da2ab319aa179ff4b6e6f638f2b7fa7c
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Mon Apr  5 04:25:44 2021 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> 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 <gyakovlev <AT> 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 <jyn514@gmail.com>
+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"


             reply	other threads:[~2021-04-05  4:27 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-05  4:27 Georgy Yakovlev [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-02-25 19:29 [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/ Sam James
2025-02-05 18:33 Arthur Zamarin
2024-12-10  7:22 Joonas Niilola
2024-12-01  8:23 Arthur Zamarin
2024-10-12  4:04 Sam James
2024-02-11  6:01 Sam James
2023-10-02  8:13 WANG Xuerui
2023-08-04 12:30 WANG Xuerui
2023-07-20 18:48 Ionen Wolkens
2023-02-09 20:36 Georgy Yakovlev
2022-11-13 19:14 Georgy Yakovlev
2022-10-20 18:19 Georgy Yakovlev
2022-10-13 17:41 Georgy Yakovlev
2022-09-23 20:06 Georgy Yakovlev
2022-09-16  1:46 Georgy Yakovlev
2022-09-15  3:15 Georgy Yakovlev
2021-12-06 22:42 Georgy Yakovlev
2021-08-09 19:03 Georgy Yakovlev
2021-06-18  9:16 Georgy Yakovlev
2021-06-18  7:46 Georgy Yakovlev
2021-05-02 16:45 Georgy Yakovlev
2021-04-18  1:24 Georgy Yakovlev
2020-11-24  0:41 Georgy Yakovlev
2020-10-28  1:42 Georgy Yakovlev
2020-06-05  8:53 Stefan Strogin
2020-04-10 11:28 Stefan Strogin
2020-03-28 19:08 Georgy Yakovlev
2019-09-26 22:06 Georgy Yakovlev
2019-06-19  0:35 Georgy Yakovlev
2019-05-26  6:27 Georgy Yakovlev
2019-04-24 16:31 Georgy Yakovlev
2019-04-14  8:03 Georgy Yakovlev
2019-03-07  4:40 Georgy Yakovlev
2019-01-26  3:50 Georgy Yakovlev
2018-10-18  9:05 Dirkjan Ochtman
2016-10-24  5:27 Doug Goldstein

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1617596775.a0103a61da2ab319aa179ff4b6e6f638f2b7fa7c.gyakovlev@gentoo \
    --to=gyakovlev@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox