Index: modcargo-crates/smartstring-1.0.1/build.rs
--- modcargo-crates/smartstring-1.0.1/build.rs.orig
+++ modcargo-crates/smartstring-1.0.1/build.rs
@@ -6,10 +6,13 @@
 use version_check as rustc;
 
 fn main() {
-    let ac = autocfg::new();
     let has_feature = Some(true) == rustc::supports_feature("allocator_api");
-    let has_api = ac.probe_trait("alloc::alloc::Allocator");
-    if has_feature || has_api {
+    // rustc 1.72+ can probe `alloc::alloc::Allocator` on stable while
+    // Global/Allocator::grow stay behind nightly `allocator_api`.
+    // Emitting has_allocator without needs_allocator_feature then fails
+    // E0658 (rustc 1.97.1 / grok-build 1.0.3 product). Only take that
+    // path when the feature is actually usable (nightly / bootstrap).
+    if has_feature {
         autocfg::emit("has_allocator");
     }
     if has_feature {
