From 0c25275c7962c07a435a7a5ba39abd1943e412ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bennet=20Ble=C3=9Fmann?= Date: Sat, 26 Apr 2025 00:16:01 +0200 Subject: [PATCH 01/14] unify line processing for lockfile generation and dependency fetching to prevent them from diverging in the future - adjust Command::process_lines to change the 'pl lifetime when changing the processing function --- src/cmd/mod.rs | 11 +++++--- src/prepare.rs | 57 +++++++++++++++++------------------------- tests/buildtest/mod.rs | 4 +-- 3 files changed, 33 insertions(+), 39 deletions(-) diff --git a/src/cmd/mod.rs b/src/cmd/mod.rs index 5077033..067fab6 100644 --- a/src/cmd/mod.rs +++ b/src/cmd/mod.rs @@ -331,9 +331,14 @@ impl<'w, 'pl> Command<'w, 'pl> { /// # Ok(()) /// # } /// ``` - pub fn process_lines(mut self, f: &'pl mut dyn FnMut(&str, &mut ProcessLinesActions)) -> Self { - self.process_lines = Some(f); - self + pub fn process_lines<'pl2>( + self, + f: &'pl2 mut dyn FnMut(&str, &mut ProcessLinesActions), + ) -> Command<'w, 'pl2> { + Command { + process_lines: Some(f), + ..self + } } /// Enable or disable logging all the output lines to the [`log` crate][log]. By default diff --git a/src/prepare.rs b/src/prepare.rs index 01e85d5..b0b040d 100644 --- a/src/prepare.rs +++ b/src/prepare.rs @@ -1,4 +1,4 @@ -use crate::cmd::{Command, CommandError}; +use crate::cmd::{Command, CommandError, ProcessLinesActions}; use crate::{build::CratePatch, Crate, Toolchain, Workspace}; use anyhow::Context as _; use log::info; @@ -101,8 +101,6 @@ impl<'a> Prepare<'a> { return Ok(()); } - let mut yanked_deps = false; - let mut missing_deps = false; let mut cmd = Command::new(self.workspace, self.toolchain.cargo()).args(&[ "generate-lockfile", "--manifest-path", @@ -114,28 +112,7 @@ impl<'a> Prepare<'a> { .env("__CARGO_TEST_CHANNEL_OVERRIDE_DO_NOT_USE_THIS", "nightly"); } - match cmd - .cd(self.source_dir) - .process_lines(&mut |line, _| { - if line.contains("failed to select a version for the requirement") { - yanked_deps = true; - } else if line.contains("failed to load source for dependency") - || line.contains("no matching package named") - { - missing_deps = true; - } - }) - .run_capture() - { - Ok(_) => Ok(()), - Err(CommandError::ExecutionFailed { status: _, stderr }) if yanked_deps => { - Err(PrepareError::YankedDependencies(stderr).into()) - } - Err(CommandError::ExecutionFailed { status: _, stderr }) if missing_deps => { - Err(PrepareError::MissingDependencies(stderr).into()) - } - Err(err) => Err(err.into()), - } + run_command(cmd.cd(self.source_dir)) } fn fetch_deps(&mut self) -> anyhow::Result<()> { @@ -149,7 +126,6 @@ pub(crate) fn fetch_deps( source_dir: &Path, fetch_build_std_targets: &[&str], ) -> anyhow::Result<()> { - let mut missing_deps = false; let mut cmd = Command::new(workspace, toolchain.cargo()) .args(&["fetch", "--manifest-path", "Cargo.toml"]) .cd(source_dir); @@ -163,15 +139,28 @@ pub(crate) fn fetch_deps( cmd = cmd.args(&["--target", target]); } - match cmd - .process_lines(&mut |line, _| { - if line.contains("failed to load source for dependency") { - missing_deps = true; - } - }) - .run_capture() - { + run_command(cmd) +} + +fn run_command(cmd: Command) -> anyhow::Result<()> { + let mut yanked_deps = false; + let mut missing_deps = false; + + let mut process = |line: &str, _: &mut ProcessLinesActions| { + if line.contains("failed to select a version for the requirement") { + yanked_deps = true; + } else if line.contains("failed to load source for dependency") + || line.contains("no matching package named") + { + missing_deps = true; + } + }; + + match cmd.process_lines(&mut process).run_capture() { Ok(_) => Ok(()), + Err(CommandError::ExecutionFailed { status: _, stderr }) if yanked_deps => { + Err(PrepareError::YankedDependencies(stderr).into()) + } Err(CommandError::ExecutionFailed { status: _, stderr }) if missing_deps => { Err(PrepareError::MissingDependencies(stderr).into()) } diff --git a/tests/buildtest/mod.rs b/tests/buildtest/mod.rs index be4f824..7510b50 100644 --- a/tests/buildtest/mod.rs +++ b/tests/buildtest/mod.rs @@ -316,10 +316,10 @@ test_prepare_uncategorized_err!( "no matching package for override `https://github.com/rust-lang/crates.io-index#build-rs@0.1.2` found" ); -test_prepare_uncategorized_err!( +test_prepare_error_stderr!( test_missing_deps_registry_version, "missing-deps-registry-version", - MissingDependencies, + YankedDependencies, "error: failed to select a version for the requirement `empty-library = \"=0.5.0\"`" ); From f89e89da6f926936a344c097ef788da790b3852f Mon Sep 17 00:00:00 2001 From: Skgland Date: Sat, 23 Aug 2025 23:30:27 +0200 Subject: [PATCH 02/14] detect broken manifest furing fetch --- src/prepare.rs | 9 +++++++++ tests/buildtest/mod.rs | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/prepare.rs b/src/prepare.rs index b0b040d..7360da7 100644 --- a/src/prepare.rs +++ b/src/prepare.rs @@ -145,6 +145,7 @@ pub(crate) fn fetch_deps( fn run_command(cmd: Command) -> anyhow::Result<()> { let mut yanked_deps = false; let mut missing_deps = false; + let mut broken_deps = false; let mut process = |line: &str, _: &mut ProcessLinesActions| { if line.contains("failed to select a version for the requirement") { @@ -153,6 +154,8 @@ fn run_command(cmd: Command) -> anyhow::Result<()> { || line.contains("no matching package named") { missing_deps = true; + } else if line.contains("failed to parse manifest at") { + broken_deps = true; } }; @@ -164,6 +167,9 @@ fn run_command(cmd: Command) -> anyhow::Result<()> { Err(CommandError::ExecutionFailed { status: _, stderr }) if missing_deps => { Err(PrepareError::MissingDependencies(stderr).into()) } + Err(CommandError::ExecutionFailed { status: _, stderr }) if broken_deps => { + Err(PrepareError::BrokenDependencies(stderr).into()) + } Err(err) => Err(err.into()), } } @@ -373,6 +379,9 @@ pub enum PrepareError { /// rejecting it. #[error("invalid Cargo.toml syntax")] InvalidCargoTomlSyntax, + /// Something about the crates dependencies is invalid + #[error("broken dependencies: \n\n{0}")] + BrokenDependencies(String), /// Some of this crate's dependencies were yanked, preventing Crater from fetching them. #[error("the crate depends on yanked dependencies: \n\n{0}")] YankedDependencies(String), diff --git a/tests/buildtest/mod.rs b/tests/buildtest/mod.rs index 7510b50..b82f42e 100644 --- a/tests/buildtest/mod.rs +++ b/tests/buildtest/mod.rs @@ -261,7 +261,7 @@ test_prepare_error_stderr!( "error: no matching package named `macro` found" ); -test_prepare_uncategorized_err!( +test_prepare_error_stderr!( test_invalid_cargotoml_content_deps, "invalid-cargotoml-content-deps", BrokenDependencies, From 1cbecdf21aa530b77b0dd1615ecf0c7171779820 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bennet=20Ble=C3=9Fmann?= Date: Wed, 30 Apr 2025 19:29:14 +0200 Subject: [PATCH 03/14] detect another kind of broken manifest --- src/prepare.rs | 4 +++- tests/buildtest/mod.rs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/prepare.rs b/src/prepare.rs index 7360da7..d3685e5 100644 --- a/src/prepare.rs +++ b/src/prepare.rs @@ -154,7 +154,9 @@ fn run_command(cmd: Command) -> anyhow::Result<()> { || line.contains("no matching package named") { missing_deps = true; - } else if line.contains("failed to parse manifest at") { + } else if line.contains("failed to parse manifest at") + || line.contains("error: invalid table header") + { broken_deps = true; } }; diff --git a/tests/buildtest/mod.rs b/tests/buildtest/mod.rs index b82f42e..691a1f6 100644 --- a/tests/buildtest/mod.rs +++ b/tests/buildtest/mod.rs @@ -268,7 +268,7 @@ test_prepare_error_stderr!( "failed to parse the version requirement `0.11\t` for dependency `parking_lot`" ); -test_prepare_uncategorized_err!( +test_prepare_error_stderr!( test_invalid_cargotoml_syntax_deps, "invalid-cargotoml-syntax-deps", BrokenDependencies, From 534c72296fcb1d0268e336110996cede42ea0e35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bennet=20Ble=C3=9Fmann?= Date: Sat, 26 Apr 2025 00:27:16 +0200 Subject: [PATCH 04/14] detect broken lock file --- src/prepare.rs | 9 +++++++++ tests/buildtest/mod.rs | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/prepare.rs b/src/prepare.rs index d3685e5..76730c6 100644 --- a/src/prepare.rs +++ b/src/prepare.rs @@ -146,6 +146,7 @@ fn run_command(cmd: Command) -> anyhow::Result<()> { let mut yanked_deps = false; let mut missing_deps = false; let mut broken_deps = false; + let mut broken_lockfile = false; let mut process = |line: &str, _: &mut ProcessLinesActions| { if line.contains("failed to select a version for the requirement") { @@ -158,6 +159,8 @@ fn run_command(cmd: Command) -> anyhow::Result<()> { || line.contains("error: invalid table header") { broken_deps = true; + } else if line.contains("error: failed to parse lock file at") { + broken_lockfile = true; } }; @@ -172,6 +175,9 @@ fn run_command(cmd: Command) -> anyhow::Result<()> { Err(CommandError::ExecutionFailed { status: _, stderr }) if broken_deps => { Err(PrepareError::BrokenDependencies(stderr).into()) } + Err(CommandError::ExecutionFailed { status: _, stderr }) if broken_lockfile => { + Err(PrepareError::InvalidCargoLock(stderr).into()) + } Err(err) => Err(err.into()), } } @@ -390,6 +396,9 @@ pub enum PrepareError { /// Some of the dependencies do not exist anymore. #[error("the crate depends on missing dependencies: \n\n{0}")] MissingDependencies(String), + /// cargo rejected (generating) the lockfile + #[error("the crate has a broken lockfile: \n\n{0}")] + InvalidCargoLock(String), /// Uncategorized error #[doc(hidden)] #[error("uncategorized prepare error")] diff --git a/tests/buildtest/mod.rs b/tests/buildtest/mod.rs index 691a1f6..3b69948 100644 --- a/tests/buildtest/mod.rs +++ b/tests/buildtest/mod.rs @@ -275,7 +275,7 @@ test_prepare_error_stderr!( "error: invalid table header" ); -test_prepare_uncategorized_err!( +test_prepare_error_stderr!( test_invalid_lockfile_syntax, "invalid-lockfile-syntax", InvalidCargoLock, From 02cf295390ba3f552ca9ce87c8fa26f87544e13c Mon Sep 17 00:00:00 2001 From: Skgland Date: Wed, 30 Apr 2025 21:48:41 +0200 Subject: [PATCH 05/14] detect another variant of missing package error the message is slightly different if there exists a potentially typoed crate --- src/prepare.rs | 1 + tests/buildtest/mod.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/prepare.rs b/src/prepare.rs index 76730c6..9a3ded3 100644 --- a/src/prepare.rs +++ b/src/prepare.rs @@ -153,6 +153,7 @@ fn run_command(cmd: Command) -> anyhow::Result<()> { yanked_deps = true; } else if line.contains("failed to load source for dependency") || line.contains("no matching package named") + || line.contains("no matching package found") { missing_deps = true; } else if line.contains("failed to parse manifest at") diff --git a/tests/buildtest/mod.rs b/tests/buildtest/mod.rs index 3b69948..3d7399a 100644 --- a/tests/buildtest/mod.rs +++ b/tests/buildtest/mod.rs @@ -282,7 +282,7 @@ test_prepare_error_stderr!( "error: failed to parse lock file at" ); -test_prepare_uncategorized_err!( +test_prepare_error_stderr!( test_missing_deps_typo, "missing-deps-typo", MissingDependencies, From f0c1b59ed0a432896f0f7625266cf1c7254b069c Mon Sep 17 00:00:00 2001 From: Skgland Date: Thu, 1 May 2025 03:12:41 +0200 Subject: [PATCH 06/14] recognize feature dependency cycles as a broken manifest --- src/prepare.rs | 1 + tests/buildtest/mod.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/prepare.rs b/src/prepare.rs index 9a3ded3..a4849fe 100644 --- a/src/prepare.rs +++ b/src/prepare.rs @@ -158,6 +158,7 @@ fn run_command(cmd: Command) -> anyhow::Result<()> { missing_deps = true; } else if line.contains("failed to parse manifest at") || line.contains("error: invalid table header") + || line.contains("error: cyclic feature dependency: feature ") { broken_deps = true; } else if line.contains("error: failed to parse lock file at") { diff --git a/tests/buildtest/mod.rs b/tests/buildtest/mod.rs index 3d7399a..2537307 100644 --- a/tests/buildtest/mod.rs +++ b/tests/buildtest/mod.rs @@ -289,7 +289,7 @@ test_prepare_error_stderr!( "error: no matching package found" ); -test_prepare_uncategorized_err!( +test_prepare_error_stderr!( test_invalid_cargotoml_cyclic_feature, "invalid-cargotoml-cyclic-feature", BrokenDependencies, From 9d6272740bb5b95c652620caa1c5159e891afdc4 Mon Sep 17 00:00:00 2001 From: Skgland Date: Thu, 1 May 2025 03:13:09 +0200 Subject: [PATCH 07/14] recognize package dependency cycles as a broken manifest --- src/prepare.rs | 1 + tests/buildtest/mod.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/prepare.rs b/src/prepare.rs index a4849fe..e97ee0c 100644 --- a/src/prepare.rs +++ b/src/prepare.rs @@ -159,6 +159,7 @@ fn run_command(cmd: Command) -> anyhow::Result<()> { } else if line.contains("failed to parse manifest at") || line.contains("error: invalid table header") || line.contains("error: cyclic feature dependency: feature ") + || line.contains("error: cyclic package dependency: package ") { broken_deps = true; } else if line.contains("error: failed to parse lock file at") { diff --git a/tests/buildtest/mod.rs b/tests/buildtest/mod.rs index 2537307..2e0ee2b 100644 --- a/tests/buildtest/mod.rs +++ b/tests/buildtest/mod.rs @@ -296,7 +296,7 @@ test_prepare_error_stderr!( "error: cyclic feature dependency: feature" ); -test_prepare_uncategorized_err!( +test_prepare_error_stderr!( test_invalid_cargotoml_cyclic_package, "invalid-cargotoml-cyclic-package", BrokenDependencies, From 7a079b8b9134d60b0a4db102f2bebb44dc7112f9 Mon Sep 17 00:00:00 2001 From: Skgland Date: Thu, 1 May 2025 03:14:55 +0200 Subject: [PATCH 08/14] detect another instance of broken manifest --- src/prepare.rs | 1 + tests/buildtest/mod.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/prepare.rs b/src/prepare.rs index e97ee0c..718b7b0 100644 --- a/src/prepare.rs +++ b/src/prepare.rs @@ -158,6 +158,7 @@ fn run_command(cmd: Command) -> anyhow::Result<()> { missing_deps = true; } else if line.contains("failed to parse manifest at") || line.contains("error: invalid table header") + || line.contains("error: invalid type: ") || line.contains("error: cyclic feature dependency: feature ") || line.contains("error: cyclic package dependency: package ") { diff --git a/tests/buildtest/mod.rs b/tests/buildtest/mod.rs index 2e0ee2b..24fbffb 100644 --- a/tests/buildtest/mod.rs +++ b/tests/buildtest/mod.rs @@ -323,7 +323,7 @@ test_prepare_error_stderr!( "error: failed to select a version for the requirement `empty-library = \"=0.5.0\"`" ); -test_prepare_uncategorized_err!( +test_prepare_error_stderr!( test_invalid_cargotoml_content_type_in_deps, "invalid-cargotoml-content-type-in-deps", BrokenDependencies, From f0f889e6daf304d6119383ae1d5a426a9c812011 Mon Sep 17 00:00:00 2001 From: Skgland Date: Thu, 1 May 2025 03:15:19 +0200 Subject: [PATCH 09/14] detect broken override --- src/prepare.rs | 1 + tests/buildtest/mod.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/prepare.rs b/src/prepare.rs index 718b7b0..790ffb2 100644 --- a/src/prepare.rs +++ b/src/prepare.rs @@ -154,6 +154,7 @@ fn run_command(cmd: Command) -> anyhow::Result<()> { } else if line.contains("failed to load source for dependency") || line.contains("no matching package named") || line.contains("no matching package found") + || line.contains("no matching package for override ") { missing_deps = true; } else if line.contains("failed to parse manifest at") diff --git a/tests/buildtest/mod.rs b/tests/buildtest/mod.rs index 24fbffb..11e13c1 100644 --- a/tests/buildtest/mod.rs +++ b/tests/buildtest/mod.rs @@ -309,7 +309,7 @@ test_prepare_error!( InvalidCargoTomlSyntax ); -test_prepare_uncategorized_err!( +test_prepare_error_stderr!( test_invalid_cargotoml_missing_override, "invalid-cargotoml-missing-override", MissingDependencies, From 43cd3323ef4cd7515c0c8023ee300100aeeed1e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bennet=20Ble=C3=9Fmann?= Date: Sat, 26 Apr 2025 01:33:33 +0200 Subject: [PATCH 10/14] more broken lockfile --- src/prepare.rs | 6 +++++- tests/buildtest/mod.rs | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/prepare.rs b/src/prepare.rs index 790ffb2..9081a91 100644 --- a/src/prepare.rs +++ b/src/prepare.rs @@ -164,7 +164,11 @@ fn run_command(cmd: Command) -> anyhow::Result<()> { || line.contains("error: cyclic package dependency: package ") { broken_deps = true; - } else if line.contains("error: failed to parse lock file at") { + } else if line.contains("error: failed to parse lock file at") + || line.contains( + "error: Attempting to resolve a dependency with more than one crate with links=", + ) + { broken_lockfile = true; } }; diff --git a/tests/buildtest/mod.rs b/tests/buildtest/mod.rs index 11e13c1..51db667 100644 --- a/tests/buildtest/mod.rs +++ b/tests/buildtest/mod.rs @@ -330,7 +330,7 @@ test_prepare_error_stderr!( "error: invalid type: map, expected a string" ); -test_prepare_uncategorized_err!( +test_prepare_error_stderr!( test_invalid_cargotoml_conflicting_links, "invalid-cargotoml-conflicting-links", InvalidCargoLock, From 756696f07115f3dc46b1ef06cdd2b26c6708a0ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bennet=20Ble=C3=9Fmann?= Date: Sat, 26 Apr 2025 02:36:41 +0200 Subject: [PATCH 11/14] detect missing patch target as missing dependency --- src/prepare.rs | 2 ++ tests/buildtest/mod.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/prepare.rs b/src/prepare.rs index 9081a91..367bf1f 100644 --- a/src/prepare.rs +++ b/src/prepare.rs @@ -155,6 +155,8 @@ fn run_command(cmd: Command) -> anyhow::Result<()> { || line.contains("no matching package named") || line.contains("no matching package found") || line.contains("no matching package for override ") + || (line.contains("The patch location ") + && line.contains(" does not appear to contain any packages matching the name ")) { missing_deps = true; } else if line.contains("failed to parse manifest at") diff --git a/tests/buildtest/mod.rs b/tests/buildtest/mod.rs index 51db667..ff4983b 100644 --- a/tests/buildtest/mod.rs +++ b/tests/buildtest/mod.rs @@ -344,7 +344,7 @@ test_prepare_uncategorized_err!( "error: package collision in the lockfile: packages lockfile-collision v0.1.0 " ); -test_prepare_uncategorized_err!( +test_prepare_error_stderr!( test_invalid_cargotoml_missing_patch, "invalid-cargotoml-missing-patch", MissingDependencies, From 18bfb35c497bb3b3aa407c31e79dc31d8f262ac4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bennet=20Ble=C3=9Fmann?= Date: Sat, 26 Apr 2025 23:40:37 +0200 Subject: [PATCH 12/14] classify another lockfile (generation) error --- src/prepare.rs | 4 ++++ tests/buildtest/mod.rs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/prepare.rs b/src/prepare.rs index 367bf1f..555bb06 100644 --- a/src/prepare.rs +++ b/src/prepare.rs @@ -164,6 +164,10 @@ fn run_command(cmd: Command) -> anyhow::Result<()> { || line.contains("error: invalid type: ") || line.contains("error: cyclic feature dependency: feature ") || line.contains("error: cyclic package dependency: package ") + || (line.contains("error: package collision in the lockfile: packages ") + && line.contains( + " are different, but only one can be written to lockfile unambiguously", + )) { broken_deps = true; } else if line.contains("error: failed to parse lock file at") diff --git a/tests/buildtest/mod.rs b/tests/buildtest/mod.rs index ff4983b..9b591b3 100644 --- a/tests/buildtest/mod.rs +++ b/tests/buildtest/mod.rs @@ -337,7 +337,7 @@ test_prepare_error_stderr!( "error: Attempting to resolve a dependency with more than one crate with links=ring-asm" ); -test_prepare_uncategorized_err!( +test_prepare_error_stderr!( test_lockfile_collision, "lockfile-collision", BrokenDependencies, From 085b053c66518c3a5b1a99013748dee1e8376d8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bennet=20Ble=C3=9Fmann?= Date: Sat, 3 May 2025 19:29:42 +0200 Subject: [PATCH 13/14] make clippy happy --- src/cmd/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cmd/mod.rs b/src/cmd/mod.rs index 067fab6..df93a9e 100644 --- a/src/cmd/mod.rs +++ b/src/cmd/mod.rs @@ -214,7 +214,7 @@ pub struct Command<'w, 'pl> { source_dir_mount_kind: MountKind, } -impl<'w, 'pl> Command<'w, 'pl> { +impl<'w> Command<'w, '_> { /// Create a new, unsandboxed command. pub fn new(workspace: &'w Workspace, binary: R) -> Self { binary.prepare_command(Self::new_inner(binary.name(), Some(workspace), None)) @@ -331,10 +331,10 @@ impl<'w, 'pl> Command<'w, 'pl> { /// # Ok(()) /// # } /// ``` - pub fn process_lines<'pl2>( + pub fn process_lines<'pl>( self, - f: &'pl2 mut dyn FnMut(&str, &mut ProcessLinesActions), - ) -> Command<'w, 'pl2> { + f: &'pl mut dyn FnMut(&str, &mut ProcessLinesActions), + ) -> Command<'w, 'pl> { Command { process_lines: Some(f), ..self From f873fa1d7f29dca43f592a6a208d5029b23f06e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bennet=20Ble=C3=9Fmann?= Date: Sat, 23 Aug 2025 22:07:40 +0200 Subject: [PATCH 14/14] remove special uncategorized macro now that there are no test testing for uncategorized errors --- tests/buildtest/runner.rs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/tests/buildtest/runner.rs b/tests/buildtest/runner.rs index 73b3c48..bbb10d9 100644 --- a/tests/buildtest/runner.rs +++ b/tests/buildtest/runner.rs @@ -96,8 +96,6 @@ macro_rules! test_prepare_error { }; } -pub(crate) use test_prepare_error; - macro_rules! test_prepare_error_stderr { ($name:ident, $krate:expr, $expected:ident, $expected_output:expr) => { #[test] @@ -130,9 +128,3 @@ macro_rules! test_prepare_error_stderr { } }; } - -macro_rules! test_prepare_uncategorized_err { - ($name:ident, $krate:expr, $expected:ident $(,$expected_output:expr)?) => { - $crate::buildtest::runner::test_prepare_error!($name, $krate, Uncategorized); - }; -}