From 51c4299433f4ca3e018edcf4665282cfc5537c60 Mon Sep 17 00:00:00 2001 From: Vastargazing Date: Fri, 3 Apr 2026 18:37:13 +0300 Subject: [PATCH 01/10] coretests: add argument order regression tests for min_by/max_by/minmax_by MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A recent regression swapped the argument order passed to the compare closure in min_by, max_by and minmax_by (compare(&v2, &v1) instead of compare(&v1, &v2)). This was fixed, but no regression test was added. Add tests that record the arguments the compare closure receives and assert they match (v1, v2) — the documented contract. --- library/coretests/tests/cmp.rs | 31 +++++++++++++++++++++++++++++++ library/coretests/tests/lib.rs | 1 + 2 files changed, 32 insertions(+) diff --git a/library/coretests/tests/cmp.rs b/library/coretests/tests/cmp.rs index 0a14470060c3d..888a3cfd57a85 100644 --- a/library/coretests/tests/cmp.rs +++ b/library/coretests/tests/cmp.rs @@ -48,6 +48,37 @@ fn test_ord_min_max_by() { assert_eq!(cmp::max_by(2, -1, f), 2); } +// Regression test for #136307 / #139357: ensure compare() receives (v1, v2), not (v2, v1). +#[test] +fn min_by_compare_argument_order() { + let mut order = vec![]; + let _ = cmp::min_by(1i32, 2, |a, b| { + order.push((*a, *b)); + a.cmp(b) + }); + assert_eq!(order, [(1, 2)]); +} + +#[test] +fn max_by_compare_argument_order() { + let mut order = vec![]; + let _ = cmp::max_by(1i32, 2, |a, b| { + order.push((*a, *b)); + a.cmp(b) + }); + assert_eq!(order, [(1, 2)]); +} + +#[test] +fn minmax_by_compare_argument_order() { + let mut order = vec![]; + let _ = cmp::minmax_by(1i32, 2, |a, b| { + order.push((*a, *b)); + a.cmp(b) + }); + assert_eq!(order, [(1, 2)]); +} + #[test] fn test_ord_min_max_by_key() { let f = |x: &i32| x.abs(); diff --git a/library/coretests/tests/lib.rs b/library/coretests/tests/lib.rs index 90a33aeead150..851eb12eb65c3 100644 --- a/library/coretests/tests/lib.rs +++ b/library/coretests/tests/lib.rs @@ -13,6 +13,7 @@ #![feature(char_internals)] #![feature(char_max_len)] #![feature(clone_to_uninit)] +#![feature(cmp_minmax)] #![feature(const_array)] #![feature(const_bool)] #![feature(const_cell_traits)] From e7a00dfa6700e6565de7be68120ed72f120b8eed Mon Sep 17 00:00:00 2001 From: Shagun Agrawal Date: Sat, 4 Apr 2026 19:40:57 +0530 Subject: [PATCH 02/10] Update Fira Mono License Information --- src/librustdoc/build.rs | 1 + src/librustdoc/html/static/COPYRIGHT.txt | 10 ++ .../html/static/fonts/FiraMono-LICENSE.txt | 97 +++++++++++++++++++ src/librustdoc/html/static_files.rs | 1 + 4 files changed, 109 insertions(+) create mode 100644 src/librustdoc/html/static/fonts/FiraMono-LICENSE.txt diff --git a/src/librustdoc/build.rs b/src/librustdoc/build.rs index 5b497183ae602..d1217f712689c 100644 --- a/src/librustdoc/build.rs +++ b/src/librustdoc/build.rs @@ -28,6 +28,7 @@ fn main() { "static/fonts/FiraMono-Regular.woff2", "static/fonts/FiraMono-Medium.woff2", "static/fonts/FiraSans-LICENSE.txt", + "static/fonts/FiraMono-LICENSE.txt", "static/fonts/SourceSerif4-Regular.ttf.woff2", "static/fonts/SourceSerif4-Semibold.ttf.woff2", "static/fonts/SourceSerif4-Bold.ttf.woff2", diff --git a/src/librustdoc/html/static/COPYRIGHT.txt b/src/librustdoc/html/static/COPYRIGHT.txt index 752dab0a3478d..e20c9cff0accf 100644 --- a/src/librustdoc/html/static/COPYRIGHT.txt +++ b/src/librustdoc/html/static/COPYRIGHT.txt @@ -14,6 +14,16 @@ included, and carry their own copyright notices and license terms: Licensed under the SIL Open Font License, Version 1.1. See FiraSans-LICENSE.txt. +* Fira Mono (FiraMono-Regular.woff2, FiraMono-Medium.woff2): + + Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ + with Reserved Font Name Fira Mono. + + Copyright (c) 2014, Telefonica S.A. + + Licensed under the SIL Open Font License, Version 1.1. + See FiraMono-LICENSE.txt. + * rustdoc.css, main.js, and playpen.js: Copyright 2015 The Rust Developers. diff --git a/src/librustdoc/html/static/fonts/FiraMono-LICENSE.txt b/src/librustdoc/html/static/fonts/FiraMono-LICENSE.txt new file mode 100644 index 0000000000000..4737fa435f8f1 --- /dev/null +++ b/src/librustdoc/html/static/fonts/FiraMono-LICENSE.txt @@ -0,0 +1,97 @@ +// REUSE-IgnoreStart + +Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + +// REUSE-IgnoreEnd diff --git a/src/librustdoc/html/static_files.rs b/src/librustdoc/html/static_files.rs index e670c2f39e72f..33969597bd292 100644 --- a/src/librustdoc/html/static_files.rs +++ b/src/librustdoc/html/static_files.rs @@ -98,6 +98,7 @@ static_files! { fira_mono_regular => "static/fonts/FiraMono-Regular.woff2", fira_mono_medium => "static/fonts/FiraMono-Medium.woff2", fira_sans_license => "static/fonts/FiraSans-LICENSE.txt", + fira_mono_license => "static/fonts/FiraMono-LICENSE.txt", source_serif_4_regular => "static/fonts/SourceSerif4-Regular.ttf.woff2", source_serif_4_semibold => "static/fonts/SourceSerif4-Semibold.ttf.woff2", source_serif_4_bold => "static/fonts/SourceSerif4-Bold.ttf.woff2", From 29d70d4dc25904fd45883646be83573b2693302d Mon Sep 17 00:00:00 2001 From: Shagun Agrawal Date: Sat, 4 Apr 2026 20:42:45 +0530 Subject: [PATCH 03/10] Update license-metadata with FiraMono license --- license-metadata.json | 1 + 1 file changed, 1 insertion(+) diff --git a/license-metadata.json b/license-metadata.json index 4fb59210854e9..298b453b24ae3 100644 --- a/license-metadata.json +++ b/license-metadata.json @@ -114,6 +114,7 @@ { "directories": [], "files": [ + "FiraMono-LICENSE.txt", "FiraMono-Medium.woff2", "FiraMono-Regular.woff2", "FiraSans-Italic.woff2", From 256f0365580df52c9e7b88c61802688898c864d6 Mon Sep 17 00:00:00 2001 From: Lars Schumann Date: Sat, 4 Apr 2026 18:27:08 +0000 Subject: [PATCH 04/10] constify Step for NonZero ints --- library/core/src/iter/range.rs | 6 ++++-- library/core/src/num/nonzero.rs | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/library/core/src/iter/range.rs b/library/core/src/iter/range.rs index c57f41ffbf06d..3b025fdcda904 100644 --- a/library/core/src/iter/range.rs +++ b/library/core/src/iter/range.rs @@ -513,7 +513,8 @@ macro_rules! step_nonzero_impls { $( #[allow(unreachable_patterns)] #[unstable(feature = "step_trait", reason = "recently redesigned", issue = "42168")] - impl Step for NonZero<$narrower> { + #[rustc_const_unstable(feature = "step_trait", issue = "42168")] + impl const Step for NonZero<$narrower> { step_nonzero_identical_methods!($narrower); #[inline] @@ -538,7 +539,8 @@ macro_rules! step_nonzero_impls { $( #[allow(unreachable_patterns)] #[unstable(feature = "step_trait", reason = "recently redesigned", issue = "42168")] - impl Step for NonZero<$wider> { + #[rustc_const_unstable(feature = "step_trait", issue = "42168")] + impl const Step for NonZero<$wider> { step_nonzero_identical_methods!($wider); #[inline] diff --git a/library/core/src/num/nonzero.rs b/library/core/src/num/nonzero.rs index 3415e1d435ce0..c270b947d4fd3 100644 --- a/library/core/src/num/nonzero.rs +++ b/library/core/src/num/nonzero.rs @@ -184,7 +184,8 @@ impl_nonzero_auto_trait!(Unpin); impl_nonzero_auto_trait!(UnwindSafe); #[stable(feature = "nonzero", since = "1.28.0")] -impl Clone for NonZero +#[rustc_const_unstable(feature = "const_clone", issue = "142757")] +impl const Clone for NonZero where T: ZeroablePrimitive, { @@ -202,7 +203,8 @@ impl Copy for NonZero where T: ZeroablePrimitive {} #[doc(hidden)] #[unstable(feature = "trivial_clone", issue = "none")] -unsafe impl TrivialClone for NonZero where T: ZeroablePrimitive {} +#[rustc_const_unstable(feature = "const_clone", issue = "142757")] +unsafe impl const TrivialClone for NonZero where T: ZeroablePrimitive {} #[stable(feature = "nonzero", since = "1.28.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] From 92426ef48211cd757fff5e6912532a80de14b985 Mon Sep 17 00:00:00 2001 From: "U. Lasiotus" Date: Sat, 4 Apr 2026 18:53:09 -0700 Subject: [PATCH 05/10] library: std: motor: use OS' process::exit in abort_internal abort_internal() is used in panics; if it calls core::intrinsics::abort(), the process triggers an invalid op code (on x86_64), which is a much harder "abort" than a user-controlled exit via a panic. Most other OSes don't use core::intrinsics::abort() here, but either libc::abort(), or a native OS abort/exit API. --- library/std/src/sys/pal/motor/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/std/src/sys/pal/motor/mod.rs b/library/std/src/sys/pal/motor/mod.rs index 705413cbe0a79..ac10d81ecfb89 100644 --- a/library/std/src/sys/pal/motor/mod.rs +++ b/library/std/src/sys/pal/motor/mod.rs @@ -42,5 +42,5 @@ pub fn unsupported_err() -> io::Error { } pub fn abort_internal() -> ! { - core::intrinsics::abort(); + moto_rt::process::exit(-1) } From 9d96a269bf2950668bba30bf95779ac6180a3faa Mon Sep 17 00:00:00 2001 From: Shagun Agrawal Date: Mon, 6 Apr 2026 16:52:33 +0530 Subject: [PATCH 06/10] Re-use existing Fira(Sans) license for Mono fonts --- license-metadata.json | 3 +- src/librustdoc/html/static/COPYRIGHT.txt | 17 +--- ...{FiraSans-LICENSE.txt => Fira-LICENSE.txt} | 0 .../html/static/fonts/FiraMono-LICENSE.txt | 97 ------------------- 4 files changed, 5 insertions(+), 112 deletions(-) rename src/librustdoc/html/static/fonts/{FiraSans-LICENSE.txt => Fira-LICENSE.txt} (100%) delete mode 100644 src/librustdoc/html/static/fonts/FiraMono-LICENSE.txt diff --git a/license-metadata.json b/license-metadata.json index 298b453b24ae3..e8e13fa8d859c 100644 --- a/license-metadata.json +++ b/license-metadata.json @@ -114,11 +114,10 @@ { "directories": [], "files": [ - "FiraMono-LICENSE.txt", + "Fira-LICENSE.txt", "FiraMono-Medium.woff2", "FiraMono-Regular.woff2", "FiraSans-Italic.woff2", - "FiraSans-LICENSE.txt", "FiraSans-Medium.woff2", "FiraSans-MediumItalic.woff2", "FiraSans-Regular.woff2" diff --git a/src/librustdoc/html/static/COPYRIGHT.txt b/src/librustdoc/html/static/COPYRIGHT.txt index e20c9cff0accf..0c295b4b01680 100644 --- a/src/librustdoc/html/static/COPYRIGHT.txt +++ b/src/librustdoc/html/static/COPYRIGHT.txt @@ -4,25 +4,16 @@ These documentation pages include resources by third parties. This copyright file applies only to those resources. The following third party resources are included, and carry their own copyright notices and license terms: -* Fira Sans (FiraSans-Regular.woff2, FiraSans-Medium.woff2): +* Fira (FiraSans-Regular.woff2, FiraSans-Medium.woff2, + FiraMono-Regular.woff2, FiraMono-Medium.woff2): Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ - with Reserved Font Name Fira Sans. + with Reserved Font Name < Fira >. Copyright (c) 2014, Telefonica S.A. Licensed under the SIL Open Font License, Version 1.1. - See FiraSans-LICENSE.txt. - -* Fira Mono (FiraMono-Regular.woff2, FiraMono-Medium.woff2): - - Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ - with Reserved Font Name Fira Mono. - - Copyright (c) 2014, Telefonica S.A. - - Licensed under the SIL Open Font License, Version 1.1. - See FiraMono-LICENSE.txt. + See Fira-LICENSE.txt. * rustdoc.css, main.js, and playpen.js: diff --git a/src/librustdoc/html/static/fonts/FiraSans-LICENSE.txt b/src/librustdoc/html/static/fonts/Fira-LICENSE.txt similarity index 100% rename from src/librustdoc/html/static/fonts/FiraSans-LICENSE.txt rename to src/librustdoc/html/static/fonts/Fira-LICENSE.txt diff --git a/src/librustdoc/html/static/fonts/FiraMono-LICENSE.txt b/src/librustdoc/html/static/fonts/FiraMono-LICENSE.txt deleted file mode 100644 index 4737fa435f8f1..0000000000000 --- a/src/librustdoc/html/static/fonts/FiraMono-LICENSE.txt +++ /dev/null @@ -1,97 +0,0 @@ -// REUSE-IgnoreStart - -Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - -// REUSE-IgnoreEnd From 057b24ee8174d784c93722eed07a465862d8564e Mon Sep 17 00:00:00 2001 From: Shagun Agrawal Date: Mon, 6 Apr 2026 16:54:52 +0530 Subject: [PATCH 07/10] Update static_files to only include fira_license --- src/librustdoc/html/static_files.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/librustdoc/html/static_files.rs b/src/librustdoc/html/static_files.rs index 33969597bd292..84d0162d990b5 100644 --- a/src/librustdoc/html/static_files.rs +++ b/src/librustdoc/html/static_files.rs @@ -97,8 +97,7 @@ static_files! { fira_sans_medium_italic => "static/fonts/FiraSans-MediumItalic.woff2", fira_mono_regular => "static/fonts/FiraMono-Regular.woff2", fira_mono_medium => "static/fonts/FiraMono-Medium.woff2", - fira_sans_license => "static/fonts/FiraSans-LICENSE.txt", - fira_mono_license => "static/fonts/FiraMono-LICENSE.txt", + fira_license => "static/fonts/Fira-LICENSE.txt", source_serif_4_regular => "static/fonts/SourceSerif4-Regular.ttf.woff2", source_serif_4_semibold => "static/fonts/SourceSerif4-Semibold.ttf.woff2", source_serif_4_bold => "static/fonts/SourceSerif4-Bold.ttf.woff2", From adaff7315de473b231c783b1cd256e2e3d35a3ed Mon Sep 17 00:00:00 2001 From: Shagun Agrawal Date: Mon, 6 Apr 2026 16:57:32 +0530 Subject: [PATCH 08/10] fixes rustdoc build script --- src/librustdoc/build.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/librustdoc/build.rs b/src/librustdoc/build.rs index d1217f712689c..94bb0e30fcdbc 100644 --- a/src/librustdoc/build.rs +++ b/src/librustdoc/build.rs @@ -27,8 +27,7 @@ fn main() { "static/fonts/FiraSans-MediumItalic.woff2", "static/fonts/FiraMono-Regular.woff2", "static/fonts/FiraMono-Medium.woff2", - "static/fonts/FiraSans-LICENSE.txt", - "static/fonts/FiraMono-LICENSE.txt", + "static/fonts/Fira-LICENSE.txt", "static/fonts/SourceSerif4-Regular.ttf.woff2", "static/fonts/SourceSerif4-Semibold.ttf.woff2", "static/fonts/SourceSerif4-Bold.ttf.woff2", From 262d35bda5af19fb4dda41623963639428b6ad8e Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 6 Apr 2026 07:17:00 -0700 Subject: [PATCH 09/10] Update wasm-component-ld to 0.5.22 Same as 147495, just keeping it up-to-date. --- Cargo.lock | 52 +++++++++++++------------- src/tools/wasm-component-ld/Cargo.toml | 2 +- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index dd7aa3d683243..57ed13f32c3be 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6221,9 +6221,9 @@ dependencies = [ [[package]] name = "wasi-preview1-component-adapter-provider" -version = "40.0.0" +version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb5e2b9858989c3a257de4ca169977f4f79897b64e4f482f188f4fcf8ac557d1" +checksum = "93759d6fd0db242718bdcc6e4626eff8b0f3124ee7e58e47177a59f561baf164" [[package]] name = "wasm-bindgen" @@ -6272,9 +6272,9 @@ dependencies = [ [[package]] name = "wasm-component-ld" -version = "0.5.21" +version = "0.5.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59dcd765f510df84d1677a502c49057761486597a95950b4c92153e5707af091" +checksum = "216ca7b603f362831b31db4e2cdea1fa3609edd7177792fa64f62a80e10aa917" dependencies = [ "anyhow", "clap", @@ -6283,7 +6283,7 @@ dependencies = [ "libc", "tempfile", "wasi-preview1-component-adapter-provider", - "wasmparser 0.245.1", + "wasmparser 0.246.2", "wat", "windows-sys 0.61.2", "winsplit", @@ -6310,24 +6310,24 @@ dependencies = [ [[package]] name = "wasm-encoder" -version = "0.245.1" +version = "0.246.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9dca005e69bf015e45577e415b9af8c67e8ee3c0e38b5b0add5aa92581ed5c" +checksum = "61fb705ce81adde29d2a8e99d87995e39a6e927358c91398f374474746070ef7" dependencies = [ "leb128fmt", - "wasmparser 0.245.1", + "wasmparser 0.246.2", ] [[package]] name = "wasm-metadata" -version = "0.245.1" +version = "0.246.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da55e60097e8b37b475a0fa35c3420dd71d9eb7bd66109978ab55faf56a57efb" +checksum = "e3e4c2aa916c425dcca61a6887d3e135acdee2c6d0ed51fd61c08d41ddaf62b1" dependencies = [ "anyhow", "indexmap", - "wasm-encoder 0.245.1", - "wasmparser 0.245.1", + "wasm-encoder 0.246.2", + "wasmparser 0.246.2", ] [[package]] @@ -6352,9 +6352,9 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.245.1" +version = "0.246.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f08c9adee0428b7bddf3890fc27e015ac4b761cc608c822667102b8bfd6995e" +checksum = "71cde4757396defafd25417cfb36aa3161027d06d865b0c24baaae229aac005d" dependencies = [ "bitflags", "hashbrown 0.16.1", @@ -6365,22 +6365,22 @@ dependencies = [ [[package]] name = "wast" -version = "245.0.1" +version = "246.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cf1149285569120b8ce39db8b465e8a2b55c34cbb586bd977e43e2bc7300bf" +checksum = "fe3fe8e3bf88ad96d031b4181ddbd64634b17cb0d06dfc3de589ef43591a9a62" dependencies = [ "bumpalo", "leb128fmt", "memchr", "unicode-width 0.2.2", - "wasm-encoder 0.245.1", + "wasm-encoder 0.246.2", ] [[package]] name = "wat" -version = "1.245.1" +version = "1.246.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd48d1679b6858988cb96b154dda0ec5bbb09275b71db46057be37332d5477be" +checksum = "4bd7fda1199b94fff395c2d19a153f05dbe7807630316fa9673367666fd2ad8c" dependencies = [ "wast", ] @@ -6811,9 +6811,9 @@ dependencies = [ [[package]] name = "wit-component" -version = "0.245.1" +version = "0.246.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4894f10d2d5cbc17c77e91f86a1e48e191a788da4425293b55c98b44ba3fcac9" +checksum = "1936c26cb24b93dc36bf78fb5dc35c55cd37f66ecdc2d2663a717d9fb3ee951e" dependencies = [ "anyhow", "bitflags", @@ -6822,17 +6822,17 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "wasm-encoder 0.245.1", + "wasm-encoder 0.246.2", "wasm-metadata", - "wasmparser 0.245.1", + "wasmparser 0.246.2", "wit-parser", ] [[package]] name = "wit-parser" -version = "0.245.1" +version = "0.246.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "330698718e82983499419494dd1e3d7811a457a9bf9f69734e8c5f07a2547929" +checksum = "fd979042b5ff288607ccf3b314145435453f20fc67173195f91062d2289b204d" dependencies = [ "anyhow", "hashbrown 0.16.1", @@ -6844,7 +6844,7 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser 0.245.1", + "wasmparser 0.246.2", ] [[package]] diff --git a/src/tools/wasm-component-ld/Cargo.toml b/src/tools/wasm-component-ld/Cargo.toml index 3f20b9e3fa12e..99e84b4562f61 100644 --- a/src/tools/wasm-component-ld/Cargo.toml +++ b/src/tools/wasm-component-ld/Cargo.toml @@ -10,4 +10,4 @@ name = "wasm-component-ld" path = "src/main.rs" [dependencies] -wasm-component-ld = "0.5.21" +wasm-component-ld = "0.5.22" From 43ec6207bb0ccf54d4692b98cb8110930c344b7c Mon Sep 17 00:00:00 2001 From: yukang Date: Mon, 6 Apr 2026 21:26:03 +0800 Subject: [PATCH 10/10] stabilize check-cfg suggestions --- compiler/rustc_lint/src/early/diagnostics/check_cfg.rs | 8 +++++--- tests/ui/cfg/suggest-alternative-name-on-target.rs | 2 +- tests/ui/cfg/suggest-alternative-name-on-target.stderr | 8 ++++---- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/compiler/rustc_lint/src/early/diagnostics/check_cfg.rs b/compiler/rustc_lint/src/early/diagnostics/check_cfg.rs index a211a1aaa6bdf..9fcabfa623d80 100644 --- a/compiler/rustc_lint/src/early/diagnostics/check_cfg.rs +++ b/compiler/rustc_lint/src/early/diagnostics/check_cfg.rs @@ -438,10 +438,10 @@ pub(super) fn unexpected_cfg_value( } } -/// Ordering of the output is not stable, use this only in diagnostic code. fn possible_well_known_names_for_cfg_value(sess: &Session, value: Symbol) -> Vec { #[allow(rustc::potential_query_instability)] - sess.psess + let mut names = sess + .psess .check_config .well_known_names .iter() @@ -454,5 +454,7 @@ fn possible_well_known_names_for_cfg_value(sess: &Session, value: Symbol) -> Vec .unwrap_or_default() }) .copied() - .collect() + .collect::>(); + names.sort_by(|a, b| a.as_str().cmp(b.as_str())); + names } diff --git a/tests/ui/cfg/suggest-alternative-name-on-target.rs b/tests/ui/cfg/suggest-alternative-name-on-target.rs index e3810dbbc9c36..297321a0e2fe0 100644 --- a/tests/ui/cfg/suggest-alternative-name-on-target.rs +++ b/tests/ui/cfg/suggest-alternative-name-on-target.rs @@ -32,8 +32,8 @@ struct D; #[cfg(target_abi = "windows")] //~^ ERROR unexpected `cfg` condition value: //~| NOTE see for more information about checking conditional configuration -help: `windows` is an expected value for `target_os` +help: `windows` is an expected value for `target_family` | LL - #[cfg(target_abi = "windows")] -LL + #[cfg(target_os = "windows")] +LL + #[cfg(target_family = "windows")] | -help: `windows` is an expected value for `target_family` +help: `windows` is an expected value for `target_os` | LL - #[cfg(target_abi = "windows")] -LL + #[cfg(target_family = "windows")] +LL + #[cfg(target_os = "windows")] | error: aborting due to 5 previous errors