Skip to content

Commit

Permalink
Add auto_concretize deprecation message
Browse files Browse the repository at this point in the history
  • Loading branch information
smoelius committed Nov 15, 2023
1 parent 53b81d2 commit 2f262c9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
7 changes: 6 additions & 1 deletion cargo-test-fuzz/tests/auto_concretize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use internal::{
auto_concretize_enabled,
dirs::{concretizations_directory_from_target, impl_concretizations_directory_from_target},
};
use predicates::prelude::*;
use std::fs::remove_dir_all;
use testing::{examples, CommandExt};

Expand Down Expand Up @@ -53,6 +54,10 @@ fn test_fuzz() {
.unwrap()
.args(["--no-run"])
.logged_assert()
.success();
.success()
.stderr(predicate::str::contains(
"`auto_concretize` is deprecated and will be removed in the next major version of \
test-fuzz.",
));
}
}
14 changes: 10 additions & 4 deletions macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,16 @@ fn map_method_or_fn(
.map(|s| parse_generic_arguments(s, false))
.or_else(|| {
#[cfg(feature = "__auto_concretize")]
return auto_concretize::unique_concretization(sig)
.map(|s| parse_generic_arguments(&s, true))
.map_err(|error| concretization_error = Some(error))
.ok();
{
eprintln!(
"`auto_concretize` is deprecated and will be removed in the next major \
version of test-fuzz."
);
auto_concretize::unique_concretization(sig)
.map(|s| parse_generic_arguments(&s, true))
.map_err(|error| concretization_error = Some(error))
.ok()
}
#[cfg(not(feature = "__auto_concretize"))]
return None;
});
Expand Down

0 comments on commit 2f262c9

Please sign in to comment.