diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:39 +0000 |
commit | 1376c5a617be5c25655d0d7cb63e3beaa5a6e026 (patch) | |
tree | 3bb8d61aee02bc7a15eab3f36e3b921afc2075d0 /vendor/clap/src/lib.rs | |
parent | Releasing progress-linux version 1.69.0+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.tar.xz rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.zip |
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/clap/src/lib.rs')
-rw-r--r-- | vendor/clap/src/lib.rs | 47 |
1 files changed, 6 insertions, 41 deletions
diff --git a/vendor/clap/src/lib.rs b/vendor/clap/src/lib.rs index ab2d9d475..8e6d1fd6e 100644 --- a/vendor/clap/src/lib.rs +++ b/vendor/clap/src/lib.rs @@ -41,9 +41,10 @@ //! *(See also [feature flag reference][_features])* //! //! Then define your CLI in `main.rs`: -#![cfg_attr(not(feature = "derive"), doc = " ```ignore")] -#![cfg_attr(feature = "derive", doc = " ```no_run")] +//! ```rust +//! # #[cfg(feature = "derive")] { #![doc = include_str!("../examples/demo.rs")] +//! # } //! ``` //! //! And try it out: @@ -94,26 +95,7 @@ // Breaks up parallelism that clarifies intent #![allow(clippy::collapsible_else_if)] -#[cfg(not(feature = "std"))] -compile_error!("`std` feature is currently required to build `clap`"); - -pub use crate::builder::ArgAction; -pub use crate::builder::Command; -pub use crate::builder::ValueHint; -pub use crate::builder::{Arg, ArgGroup}; -pub use crate::parser::ArgMatches; -pub use crate::util::color::ColorChoice; -pub use crate::util::Id; - -/// Command Line Argument Parser Error -/// -/// See [`Command::error`] to create an error. -/// -/// [`Command::error`]: crate::Command::error -pub type Error = crate::error::Error<crate::error::DefaultFormatter>; - -pub use crate::derive::{Args, CommandFactory, FromArgMatches, Parser, Subcommand, ValueEnum}; - +pub use clap_builder::*; #[cfg(feature = "derive")] #[doc(hidden)] pub use clap_derive::{self, *}; @@ -130,25 +112,8 @@ pub mod _features; pub mod _tutorial; #[doc(hidden)] -pub mod __macro_refs { - #[cfg(any(feature = "derive", feature = "cargo"))] +#[cfg(feature = "derive")] +pub mod __derive_refs { #[doc(hidden)] pub use once_cell; } - -#[macro_use] -#[allow(missing_docs)] -mod macros; - -mod derive; - -pub mod builder; -pub mod error; -pub mod parser; - -mod mkeymap; -mod output; -mod util; - -const INTERNAL_ERROR_MSG: &str = "Fatal internal error. Please consider filing a bug \ - report at https://github.com/clap-rs/clap/issues"; |