pub fn flag_to_backend_features<'a, const N: usize>(
sess: &'a Session,
diagnostics: bool,
to_backend_features: impl Fn(&'a str) -> SmallVec<[&'a str; N]>,
extend_backend_features: impl FnMut(&'a str, bool),
)
Expand description
Translates the -Ctarget-feature
flag into a backend target feature list.
to_backend_features
converts a Rust feature name into a list of backend feature names; this is
used for diagnostic purposes only.
extend_backend_features
extends the set of backend features (assumed to be in mutable state
accessible by that closure) to enable/disable the given Rust feature name.