Skip to content

unexpected behavior inside struct, for feature-gated argumentsΒ #55

@thor314

Description

@thor314

Attempting the following:

pub(crate) struct Args {
	cfg_if! {
		if #[cfg(feature = "my_feat")] {
			some_feature_gated_arg: u8,
			some_other_feature_gated_arg: u8,
		} else {}
	}
	// ...
}

causes compile time errors. This would have been helpful to note in the Readme/docs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions