From 931a2dd67cc53669ee43857c7a2723b8729db365 Mon Sep 17 00:00:00 2001 From: Lukasz Anforowicz Date: Wed, 16 Jul 2025 12:16:21 -0700 Subject: [PATCH] [rust] Make `-Amismatched_lifetime_syntaxes` suppression less global. This CL moves the `-Amismatched_lifetime_syntaxes` suppression into the currently affected 3 targets. This allows removing the global suppression and "holding the line" for the other Rust targets. Fixed: 424424323 Change-Id: I1c94010a1699569b8567a293ed46b7240ec55f15 Cq-Include-Trybots: chromium/try:android-rust-arm32-rel Cq-Include-Trybots: chromium/try:android-rust-arm64-dbg Cq-Include-Trybots: chromium/try:android-rust-arm64-rel Cq-Include-Trybots: chromium/try:linux-rust-x64-dbg Cq-Include-Trybots: chromium/try:linux-rust-x64-rel Cq-Include-Trybots: chromium/try:win-rust-x64-dbg Cq-Include-Trybots: chromium/try:win-rust-x64-rel Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6700277 Auto-Submit: Ɓukasz Anforowicz Reviewed-by: Michael Spang Commit-Queue: Michael Spang Cr-Commit-Position: refs/heads/main@{#1487828} --- diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index ce390e5..b67110b 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -2197,9 +2197,6 @@ # an error by default eventually; see # https://github.com/rust-lang/rust/issues/71668 rustflags = [ "-Dunsafe_op_in_unsafe_fn" ] - - # TODO(crbug.com/424424323): Clean up and enable. - rustflags += [ "-Amismatched_lifetime_syntaxes" ] } # prevent_unsafe_narrowing ---------------------------------------------------- diff --git a/mojo/public/rust/system/data_pipe.rs b/mojo/public/rust/system/data_pipe.rs index 9b8d96e..0ed4fee 100644 --- a/mojo/public/rust/system/data_pipe.rs +++ b/mojo/public/rust/system/data_pipe.rs @@ -299,7 +299,7 @@ /// Begin two-phase read. Returns a ReadDataBuffer to perform read and /// commit. - pub fn begin(&self) -> Result, MojoResult> { + pub fn begin(&self) -> Result, MojoResult> { let mut buffer_num_bytes: u32 = 0; let mut buffer_ptr: *const ffi::c_void = ptr::null(); let r = MojoResult::from_code(unsafe { @@ -372,7 +372,7 @@ /// Begin two-phase write. Returns a WriteDataBuffer to perform write and /// commit. - pub fn begin(&self) -> Result, MojoResult> { + pub fn begin(&self) -> Result, MojoResult> { let mut buffer_num_bytes: u32 = 0; let mut buffer_ptr: *mut ffi::c_void = ptr::null_mut(); let r = MojoResult::from_code(unsafe { diff --git a/third_party/fontconfig/BUILD.gn b/third_party/fontconfig/BUILD.gn index 3dd5d34..ad1ed2d5 100644 --- a/third_party/fontconfig/BUILD.gn +++ b/third_party/fontconfig/BUILD.gn @@ -62,6 +62,9 @@ "//third_party/rust/read_fonts/v0_30:lib", "//third_party/rust/skrifa/v0_32:lib", ] + + # TODO(https://crbug.com/429255379): Stop suppressing this warning. + rustflags = [ "-Amismatched_lifetime_syntaxes" ] } config("fontconfig_config") {