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/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/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")] 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 7fc779d3d082f..129d2c013cd27 100644 --- a/library/coretests/tests/lib.rs +++ b/library/coretests/tests/lib.rs @@ -14,6 +14,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)] 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) } diff --git a/license-metadata.json b/license-metadata.json index 4fb59210854e9..e8e13fa8d859c 100644 --- a/license-metadata.json +++ b/license-metadata.json @@ -114,10 +114,10 @@ { "directories": [], "files": [ + "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/build.rs b/src/librustdoc/build.rs index 5b497183ae602..94bb0e30fcdbc 100644 --- a/src/librustdoc/build.rs +++ b/src/librustdoc/build.rs @@ -27,7 +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/Fira-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..0c295b4b01680 100644 --- a/src/librustdoc/html/static/COPYRIGHT.txt +++ b/src/librustdoc/html/static/COPYRIGHT.txt @@ -4,15 +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. + 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_files.rs b/src/librustdoc/html/static_files.rs index e670c2f39e72f..84d0162d990b5 100644 --- a/src/librustdoc/html/static_files.rs +++ b/src/librustdoc/html/static_files.rs @@ -97,7 +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_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", 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" 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