mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
⬆️ xflags
This commit is contained in:
parent
71b8fb7c57
commit
0296cd590e
5 changed files with 23 additions and 21 deletions
|
@ -2,7 +2,9 @@
|
|||
|
||||
use crate::install::{ClientOpt, Malloc, ServerOpt};
|
||||
|
||||
xflags::args_parser! {
|
||||
xflags::xflags! {
|
||||
src "./src/flags.rs"
|
||||
|
||||
/// Run custom build command.
|
||||
cmd xtask {
|
||||
default cmd help {
|
||||
|
@ -55,7 +57,7 @@ xflags::args_parser! {
|
|||
|
||||
// generated start
|
||||
// The following code is generated by `xflags` macro.
|
||||
// Run `env XFLAGS_DUMP= cargo build` to regenerate.
|
||||
// Run `env UPDATE_XFLAGS=1 cargo build` to regenerate.
|
||||
#[derive(Debug)]
|
||||
pub struct Xtask {
|
||||
pub subcommand: XtaskCmd,
|
||||
|
@ -96,13 +98,13 @@ pub struct Codegen {
|
|||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Lint {}
|
||||
pub struct Lint;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct FuzzTests {}
|
||||
pub struct FuzzTests;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct PreCache {}
|
||||
pub struct PreCache;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Release {
|
||||
|
@ -131,11 +133,10 @@ pub struct Bb {
|
|||
}
|
||||
|
||||
impl Xtask {
|
||||
pub const HELP: &'static str = Self::_HELP;
|
||||
pub const HELP: &'static str = Self::HELP_;
|
||||
|
||||
pub fn from_env() -> xflags::Result<Self> {
|
||||
let mut p = xflags::rt::Parser::new_from_env();
|
||||
Self::_parse(&mut p)
|
||||
Self::from_env_()
|
||||
}
|
||||
}
|
||||
// generated end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue