mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-30 07:07:32 +00:00
Use cli parser with auto-generated help
This commit is contained in:
parent
9860a39603
commit
4ce20b80c5
8 changed files with 195 additions and 134 deletions
|
@ -18,7 +18,7 @@ use std::{
|
|||
};
|
||||
use xshell::{cmd, pushenv, read_file, write_file};
|
||||
|
||||
use crate::{ensure_rustfmt, project_root, Result};
|
||||
use crate::{ensure_rustfmt, flags, project_root, Result};
|
||||
|
||||
pub(crate) use self::{
|
||||
gen_assists_docs::{generate_assists_docs, generate_assists_tests},
|
||||
|
@ -35,11 +35,7 @@ pub(crate) enum Mode {
|
|||
Verify,
|
||||
}
|
||||
|
||||
pub(crate) struct CodegenCmd {
|
||||
pub(crate) features: bool,
|
||||
}
|
||||
|
||||
impl CodegenCmd {
|
||||
impl flags::Codegen {
|
||||
pub(crate) fn run(self) -> Result<()> {
|
||||
if self.features {
|
||||
generate_lint_completions(Mode::Overwrite)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue