From 0d15fb95f8781a80cf254d53a49ee6130b25c10a Mon Sep 17 00:00:00 2001 From: "Joshua (D) Drake" <136637981+ChronicallyJD@users.noreply.github.com> Date: Thu, 16 Jul 2026 20:37:19 -0600 Subject: [PATCH] Fix semicolon_in_expressions_from_macros errors on nightly Newer Rust toolchains promote the `semicolon_in_expressions_from_macros` future-incompatibility lint (rust-lang/rust#79813) to a hard, deny-by-default error. This breaks `bail!(...)` invocations used in expression position (the tail of a block or match arm), causing the "verify package can build" workflow, which builds with nightly, to fail. Add trailing semicolons so the macro invocations are statements: - pgrx-sql-entity-graph/src/section.rs - cargo-pgrx/src/command/install.rs - cargo-pgrx/src/object_utils.rs Verified with a full nightly check across all packaged crates. Co-Authored-By: Claude Opus 4.8 (1M context) --- cargo-pgrx/src/command/install.rs | 2 +- cargo-pgrx/src/object_utils.rs | 4 +++- pgrx-sql-entity-graph/src/section.rs | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cargo-pgrx/src/command/install.rs b/cargo-pgrx/src/command/install.rs index c4cd6cd07..540ccd1f2 100644 --- a/cargo-pgrx/src/command/install.rs +++ b/cargo-pgrx/src/command/install.rs @@ -264,7 +264,7 @@ fn copy_file( ) -> eyre::Result<()> { let Some(dest_dir) = dest.parent() else { // what fresh hell could ever cause such an error? - eyre::bail!("no directory to copy to: {}", dest.display()) + eyre::bail!("no directory to copy to: {}", dest.display()); }; match dest_dir.try_exists() { Ok(false) => fs::create_dir_all(dest_dir).wrap_err_with(|| { diff --git a/cargo-pgrx/src/object_utils.rs b/cargo-pgrx/src/object_utils.rs index 0b7a24dfc..182418fab 100644 --- a/cargo-pgrx/src/object_utils.rs +++ b/cargo-pgrx/src/object_utils.rs @@ -172,7 +172,9 @@ fn parse_macho_header(data: &[u8]) -> eyre::Result<(MachBits, MachEndian, usize) object::macho::MH_MAGIC => Ok((MachBits::Bits32, MachEndian::Big, 28)), object::macho::MH_CIGAM_64 => Ok((MachBits::Bits64, MachEndian::Little, 32)), object::macho::MH_MAGIC_64 => Ok((MachBits::Bits64, MachEndian::Big, 32)), - _ => bail!("invalid Mach-O magic"), + _ => { + bail!("invalid Mach-O magic"); + } } } diff --git a/pgrx-sql-entity-graph/src/section.rs b/pgrx-sql-entity-graph/src/section.rs index db914c02d..36709f1e6 100644 --- a/pgrx-sql-entity-graph/src/section.rs +++ b/pgrx-sql-entity-graph/src/section.rs @@ -822,7 +822,7 @@ impl<'a> EntryReader<'a> { let sql = match self.read_argument_sql_owned()? { Ok(crate::metadata::SqlMapping::As(sql)) => sql, Ok(other) => { - bail!("invalid SQL declaration mapping in schema entry: {other:?}") + bail!("invalid SQL declaration mapping in schema entry: {other:?}"); } Err(err) => return Err(err.into()), };