struct Rustflags(String, TargetSelection);
Expand description
Represents flag values in String
form with whitespace delimiter to pass it to the compiler later.
-Z crate-attr
flags will be applied recursively on the target code using the rustc_parse::parser::Parser
.
See rustc_builtin_macros::cmdline_attrs::inject
for more information.
Tuple Fields§
§0: String
§1: TargetSelection
Implementations§
source§impl Rustflags
impl Rustflags
fn new(target: TargetSelection) -> Rustflags
sourcefn propagate_cargo_env(&mut self, prefix: &str)
fn propagate_cargo_env(&mut self, prefix: &str)
By default, cargo will pick up on various variables in the environment. However, bootstrap reuses those variables to pass additional flags to rustdoc, so by default they get overridden. Explicitly add back any previous value in the environment.
prefix
is usually RUSTFLAGS
or RUSTDOCFLAGS
.
fn env(&mut self, env: &str)
fn arg(&mut self, arg: &str) -> &mut Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Rustflags
impl RefUnwindSafe for Rustflags
impl Send for Rustflags
impl Sync for Rustflags
impl Unpin for Rustflags
impl UnwindSafe for Rustflags
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Pointable for T
impl<T> Pointable for T
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 56 bytes