Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor generate_targets into separate module #11445

Merged
merged 3 commits into from
Dec 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/cargo/ops/cargo_compile/compile_filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ pub enum FilterRule {
/// Filter to apply to the root package to select which Cargo targets will be built.
/// (examples, bins, benches, tests, ...)
///
/// The actual filter process happens inside [`generate_targets`].
/// The actual filter process happens inside [`generate_units`].
///
/// Not to be confused with [`Packages`], which opts in packages to be built.
///
/// [`generate_targets`]: super::generate_targets
/// [`generate_units`]: super::UnitGenerator::generate_units
/// [`Packages`]: crate::ops::Packages
#[derive(Debug)]
pub enum CompileFilter {
Expand Down Expand Up @@ -176,7 +176,7 @@ impl CompileFilter {
/// may include additional example targets to ensure they can be compiled.
///
/// Note that the actual behavior is subject to `filter_default_targets`
/// and `generate_targets` though.
/// and `generate_units` though.
pub fn all_test_targets() -> Self {
Self::Only {
all_targets: false,
Expand Down Expand Up @@ -234,7 +234,7 @@ impl CompileFilter {
}

/// Selects targets for "cargo run". for logic to select targets for other
/// subcommands, see `generate_targets` and `filter_default_targets`.
/// subcommands, see `generate_units` and `filter_default_targets`.
pub fn target_run(&self, target: &Target) -> bool {
match *self {
CompileFilter::Default { .. } => true,
Expand Down
Loading