From c8e6889e08fd3a707134a3089840a01e615c1551 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Wed, 19 Jan 2022 09:41:04 -0800 Subject: [PATCH] Add assert that fallback targets must be available. --- src/tools/build-manifest/src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tools/build-manifest/src/main.rs b/src/tools/build-manifest/src/main.rs index d3bce6b3e8df5..6b56d6bc4adf0 100644 --- a/src/tools/build-manifest/src/main.rs +++ b/src/tools/build-manifest/src/main.rs @@ -536,7 +536,10 @@ impl Builder { } for (substr, fallback_target) in fallback { if target_name.contains(substr) { - return Target::from_compressed_tar(self, &tarball_name!(fallback_target)); + let t = Target::from_compressed_tar(self, &tarball_name!(fallback_target)); + // Fallbacks must always be available. + assert!(t.available); + return t; } } Target::unavailable()