7895: ⬆️ xflags r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2021-03-07 08:13:27 +00:00 committed by GitHub
commit 708ec9821f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 23 additions and 21 deletions

8
Cargo.lock generated
View file

@ -1919,18 +1919,18 @@ checksum = "06069a848f95fceae3e5e03c0ddc8cb78452b56654ee0c8e68f938cf790fb9e3"
[[package]]
name = "xflags"
version = "0.1.4"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "222e914b43cec5d7305ac5116d10a14b3a52c50e9062d642c92631f3beabc729"
checksum = "59ad6ce6a0b7224130015b4ebac796478ac04e0079f5d222a690efea06a9208a"
dependencies = [
"xflags-macros",
]
[[package]]
name = "xflags-macros"
version = "0.1.4"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52f18f5b4aa7f95e209d5b9274f6164c3938920b4d5c75f97f0dd16daee25ddd"
checksum = "c8037d3ca14996158b03c0fa905d0834906ef0fc7044df72c1f5ff690e5e62c9"
dependencies = [
"proc-macro2",
]

View file

@ -24,7 +24,7 @@ jod-thread = "0.1.0"
log = "0.4.8"
lsp-types = { version = "0.88.0", features = ["proposed"] }
parking_lot = "0.11.0"
xflags = "0.1.2"
xflags = "0.2.1"
oorandom = "11.1.2"
rustc-hash = "1.1.0"
serde = { version = "1.0.106", features = ["derive"] }

View file

@ -6,7 +6,9 @@ use ide_ssr::{SsrPattern, SsrRule};
use rust_analyzer::cli::{BenchWhat, Position, Verbosity};
use vfs::AbsPathBuf;
xflags::args_parser! {
xflags::xflags! {
src "./src/bin/flags.rs"
/// LSP server for the Rust programming language.
cmd rust-analyzer {
/// Verbosity level, can be repeated multiple times.
@ -120,7 +122,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 RustAnalyzer {
pub verbose: u32,
@ -158,7 +160,7 @@ pub struct Parse {
}
#[derive(Debug)]
pub struct Symbols {}
pub struct Symbols;
#[derive(Debug)]
pub struct Highlight {
@ -211,14 +213,13 @@ pub struct Search {
}
#[derive(Debug)]
pub struct ProcMacro {}
pub struct ProcMacro;
impl RustAnalyzer {
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

View file

@ -15,5 +15,5 @@ ungrammar = "=1.11"
walkdir = "2.3.1"
write-json = "0.1.0"
xshell = "0.1"
xflags = "0.1.2"
xflags = "0.2.1"
# Avoid adding more dependencies to this crate

View file

@ -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