diff mbox series

[meta-lts-mixins,scarthgap/rust,23/29] rust: Oe-selftest changes for rust v1.84.1

Message ID 956848f91ac9327087953b5fac0975297f0351ca.1744061149.git.scott.murray@konsulko.com
State New
Headers show
Series Update to Rust 1.85.1 | expand

Commit Message

Scott Murray April 7, 2025, 9:30 p.m. UTC
From: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>

Ignore the failing unit test.

The tidy check failed due to a typo, which was already reported and
fixed in the Rust upstream.

Upstream-Status: Backport [https://github.com/rust-lang/rust/commit/8e7734978245522cbbd14e53e08e888faf031ded]

Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(adapted from oe-core commit 94a244a14075ead1b3b5e966c0fe713cd448cad8)
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
---
 .../rust/files/fix-tidy-check-failure.patch   | 19 +++++++++++++++++++
 .../rust/files/rust-oe-selftest.patch         | 12 ++++++++++++
 recipes-devtools/rust/rust-source.inc         |  1 +
 3 files changed, 32 insertions(+)
 create mode 100644 recipes-devtools/rust/files/fix-tidy-check-failure.patch
diff mbox series

Patch

diff --git a/recipes-devtools/rust/files/fix-tidy-check-failure.patch b/recipes-devtools/rust/files/fix-tidy-check-failure.patch
new file mode 100644
index 0000000..54b4ee6
--- /dev/null
+++ b/recipes-devtools/rust/files/fix-tidy-check-failure.patch
@@ -0,0 +1,19 @@ 
+fix a comment with uneven number of backticks in rustc_mir_build
+
+Upstream-Status: Backport [https://github.com/rust-lang/rust/commit/8e7734978245522cbbd14e53e08e888faf031ded]
+
+Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
+---
+diff --git a/compiler/rustc_mir_build/src/build/expr/as_rvalue.rs b/compiler/rustc_mir_build/src/build/expr/as_rvalue.rs
+index 3f89e33778..c66af11845 100644
+--- a/compiler/rustc_mir_build/src/build/expr/as_rvalue.rs
++++ b/compiler/rustc_mir_build/src/build/expr/as_rvalue.rs
+@@ -231,7 +231,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
+                             if range.start <= range.end { BinOp::BitAnd } else { BinOp::BitOr };
+
+                         let mut comparer = |range: u128, bin_op: BinOp| -> Place<'tcx> {
+-                            // We can use `ty::TypingEnv::fully_monomorphized()`` here
++                            // We can use `ty::TypingEnv::fully_monomorphized()` here
+                             // as we only need it to compute the layout of a primitive.
+                             let range_val = Const::from_bits(
+                                 this.tcx,
diff --git a/recipes-devtools/rust/files/rust-oe-selftest.patch b/recipes-devtools/rust/files/rust-oe-selftest.patch
index dd22ced..7e5854a 100644
--- a/recipes-devtools/rust/files/rust-oe-selftest.patch
+++ b/recipes-devtools/rust/files/rust-oe-selftest.patch
@@ -469,3 +469,15 @@  index 14e6013f96..b670f27ab4 100644
          #[cfg_attr(miri, ignore)]
          fn $test_fn_name() {
              $crate::sort::tests::$test_fn_name::<$sort_impl>();
+diff --git a/compiler/rustc_data_structures/src/vec_cache/tests.rs b/compiler/rustc_data_structures/src/vec_cache/tests.rs
+index a05f274136..0e69b4cb98 100644
+--- a/compiler/rustc_data_structures/src/vec_cache/tests.rs
++++ b/compiler/rustc_data_structures/src/vec_cache/tests.rs
+@@ -17,6 +17,7 @@ fn vec_cache_insert_and_check() {
+ }
+
+ #[test]
++#[ignore]
+ fn sparse_inserts() {
+     let cache: VecCache<u32, u8, u32> = VecCache::default();
+     let end = if cfg!(target_pointer_width = "64") && cfg!(target_os = "linux") {
diff --git a/recipes-devtools/rust/rust-source.inc b/recipes-devtools/rust/rust-source.inc
index ee23e5a..92bb5e4 100644
--- a/recipes-devtools/rust/rust-source.inc
+++ b/recipes-devtools/rust/rust-source.inc
@@ -8,6 +8,7 @@  SRC_URI += "https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz;n
             file://0001-src-core-build_steps-tool.rs-switch-off-lto-for-rust.patch;patchdir=${RUSTSRC} \
 	    file://revert-link-std-statically-in-rustc_driver-feature.patch;patchdir=${RUSTSRC} \
 	    file://Zdual-proc-macros-additional-check.patch;patchdir=${RUSTSRC} \
+	    file://fix-tidy-check-failure.patch;patchdir=${RUSTSRC} \
 "
 SRC_URI[rust.sha256sum] = "e23ec747a06ffd3e94155046f40b6664ac152c9ee3c2adfd90353a7ccff24226"