struct FixArgs {
file: PathBuf,
prepare_for_edition: Option<Edition>,
idioms: bool,
enabled_edition: Option<Edition>,
other: Vec<OsString>,
rustc: PathBuf,
sysroot: Option<PathBuf>,
}
Expand description
Various command-line options and settings used when cargo
is running as
a proxy for rustc
during the fix operation.
Fields§
§file: PathBuf
This is the .rs
file that is being fixed.
prepare_for_edition: Option<Edition>
If --edition
is used to migrate to the next edition, this is the
edition we are migrating towards.
idioms: bool
true
if --edition-idioms
is enabled.
enabled_edition: Option<Edition>
The current edition.
None
if on 2015.
other: Vec<OsString>
Other command-line arguments not reflected by other fields in
FixArgs
.
rustc: PathBuf
Path to the rustc
executable.
sysroot: Option<PathBuf>
Path to host sysroot.
Implementations§
source§impl FixArgs
impl FixArgs
fn get() -> CargoResult<FixArgs>
fn from_args(argv: impl IntoIterator<Item = OsString>) -> CargoResult<Self>
fn apply(&self, cmd: &mut ProcessBuilder)
sourcefn can_run_rustfix(&self, gctx: &GlobalContext) -> CargoResult<bool>
fn can_run_rustfix(&self, gctx: &GlobalContext) -> CargoResult<bool>
Validates the edition, and sends a message indicating what is being done. Returns a flag indicating whether this fix should be run.
Auto Trait Implementations§
impl Freeze for FixArgs
impl RefUnwindSafe for FixArgs
impl Send for FixArgs
impl Sync for FixArgs
impl Unpin for FixArgs
impl UnwindSafe for FixArgs
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
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: 104 bytes