From e080273d6f8a47baa9a4c0f91aedccf58cbe0568 Mon Sep 17 00:00:00 2001 From: Systemcluster Date: Mon, 17 Apr 2023 01:27:35 +0200 Subject: [PATCH] Add rustflags profile option to comparable profile properties --- src/cargo/core/profiles.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/cargo/core/profiles.rs b/src/cargo/core/profiles.rs index 51d19e32e62..053df853c38 100644 --- a/src/cargo/core/profiles.rs +++ b/src/cargo/core/profiles.rs @@ -704,7 +704,7 @@ impl Profile { /// Compares all fields except `name`, which doesn't affect compilation. /// This is necessary for `Unit` deduplication for things like "test" and /// "dev" which are essentially the same. - fn comparable(&self) -> impl Hash + Eq { + fn comparable(&self) -> impl Hash + Eq + '_ { ( self.opt_level, self.lto, @@ -715,9 +715,8 @@ impl Profile { self.debug_assertions, self.overflow_checks, self.rpath, - self.incremental, - self.panic, - self.strip, + (self.incremental, self.panic, self.strip), + &self.rustflags, ) } }