/third_party/rust/crates/nom/src/ |
D | error.rs | 18 fn from_error_kind(input: I, kind: ErrorKind) -> Self; in from_error_kind() 23 fn append(input: I, kind: ErrorKind, other: Self) -> Self; in append() argument 27 Self::from_error_kind(input, ErrorKind::Char) in from_char() 53 fn from_external_error(input: I, kind: ErrorKind, e: E) -> Self; in from_external_error() argument 62 pub code: ErrorKind, 67 pub fn new(input: I, code: ErrorKind) -> Error<I> { in new() 73 fn from_error_kind(input: I, kind: ErrorKind) -> Self { in from_error_kind() 77 fn append(_: I, _: ErrorKind, other: Self) -> Self { in append() argument 86 fn from_external_error(input: I, kind: ErrorKind, _e: E) -> Self { in from_external_error() argument 103 impl<I> ParseError<I> for (I, ErrorKind) { implementation [all …]
|
/third_party/rust/crates/nom/src/character/ |
D | complete.rs | 7 use crate::error::ErrorKind; 73 _ => Err(Err::Error(Error::from_error_kind(i, ErrorKind::Satisfy))), in satisfy() 97 _ => Err(Err::Error(Error::from_error_kind(i, ErrorKind::OneOf))), in one_of() 121 _ => Err(Err::Error(Error::from_error_kind(i, ErrorKind::NoneOf))), in none_of() 151 let e: ErrorKind = ErrorKind::CrLf; in crlf() 200 let e: ErrorKind = ErrorKind::Tag; in not_line_ending() 235 CompareResult::Incomplete => Err(Err::Error(E::from_error_kind(input, ErrorKind::CrLf))), in line_ending() 240 _ => Err(Err::Error(E::from_error_kind(input, ErrorKind::CrLf))), in line_ending() 316 None => Err(Err::Error(E::from_error_kind(input, ErrorKind::Eof))), in anychar() 371 input.split_at_position1_complete(|item| !item.is_alpha(), ErrorKind::Alpha) in alpha1() [all …]
|
D | streaming.rs | 7 use crate::error::ErrorKind; 73 Some((_, false)) => Err(Err::Error(Error::from_error_kind(i, ErrorKind::Satisfy))), in satisfy() 98 Some((_, false)) => Err(Err::Error(Error::from_error_kind(i, ErrorKind::OneOf))), in one_of() 123 Some((_, false)) => Err(Err::Error(Error::from_error_kind(i, ErrorKind::NoneOf))), in none_of() 151 let e: ErrorKind = ErrorKind::CrLf; in crlf() 194 let e: ErrorKind = ErrorKind::Tag; in not_line_ending() 232 CompareResult::Error => Err(Err::Error(E::from_error_kind(input, ErrorKind::CrLf))), in line_ending() 343 input.split_at_position1(|item| !item.is_alpha(), ErrorKind::Alpha) in alpha1() 385 input.split_at_position1(|item| !item.is_dec_digit(), ErrorKind::Digit) in digit1() 427 input.split_at_position1(|item| !item.is_hex_digit(), ErrorKind::HexDigit) in hex_digit1() [all …]
|
/third_party/rust/crates/autocfg/src/ |
D | error.rs | 10 kind: ErrorKind, 20 ErrorKind::Io(ref e) => Some(e), in cause() 21 ErrorKind::Num(ref e) => Some(e), in cause() 22 ErrorKind::Utf8(ref e) => Some(e), in cause() 23 ErrorKind::Other(_) => None, in cause() 31 ErrorKind::Io(ref e) => e.fmt(f), in fmt() 32 ErrorKind::Num(ref e) => e.fmt(f), in fmt() 33 ErrorKind::Utf8(ref e) => e.fmt(f), in fmt() 34 ErrorKind::Other(s) => s.fmt(f), in fmt() 40 enum ErrorKind { enum [all …]
|
/third_party/rust/crates/rust-cexpr/src/ |
D | lib.rs | 22 pub use nom::{error::ErrorKind, error::Error, Err, IResult, Needed}; 30 pub enum ErrorKind { enum 47 Parser(nom::ErrorKind), 50 impl From<nom::ErrorKind> for ErrorKind { implementation 51 fn from(k: nom::ErrorKind) -> Self { in from() 52 ErrorKind::Parser(k) in from() 56 impl From<u32> for ErrorKind { implementation 58 ErrorKind::InvalidLiteral in from() 71 pub error: ErrorKind, 74 impl<I> From<(I, nom::ErrorKind)> for Error<I> { [all …]
|
/third_party/rust/crates/nom/src/sequence/ |
D | tests.rs | 3 use crate::error::{Error, ErrorKind}; 10 use crate::{error::ErrorKind, Err}; in single_element_tuples() 16 Err(Err::Error(("123def", ErrorKind::Alpha))) in single_element_tuples() 83 Err(Err::Error(error_position!(&b"mn"[..], ErrorKind::Tag))) in complete() 107 Err(Err::Error(error_position!(&b"xxx"[..], ErrorKind::Tag))) in pair_test() 111 Err(Err::Error(error_position!(&b"xxxdef"[..], ErrorKind::Tag))) in pair_test() 115 Err(Err::Error(error_position!(&b"xxx"[..], ErrorKind::Tag))) in pair_test() 139 Err(Err::Error(error_position!(&b"xxx"[..], ErrorKind::Tag))) in separated_pair_test() 143 Err(Err::Error(error_position!(&b"xxx,def"[..], ErrorKind::Tag))) in separated_pair_test() 147 Err(Err::Error(error_position!(&b"xxx"[..], ErrorKind::Tag))) in separated_pair_test() [all …]
|
/third_party/rust/crates/regex/regex-capi/src/ |
D | error.rs | 12 kind: ErrorKind, 16 pub enum ErrorKind { enum 24 pub fn new(kind: ErrorKind) -> Error { in new() 30 ErrorKind::None => false, in is_err() 31 ErrorKind::Str(_) | ErrorKind::Regex(_) | ErrorKind::Nul(_) => { in is_err() 41 ErrorKind::None => write!(f, "no error"), in fmt() 42 ErrorKind::Str(ref e) => e.fmt(f), in fmt() 43 ErrorKind::Regex(ref e) => e.fmt(f), in fmt() 44 ErrorKind::Nul(ref e) => e.fmt(f), in fmt() 51 Box::into_raw(Box::new(Error::new(ErrorKind::None)))
|
/third_party/rust/crates/aho-corasick/src/ |
D | error.rs | 11 kind: ErrorKind, 16 pub enum ErrorKind { enum 41 pub fn kind(&self) -> &ErrorKind { in kind() argument 46 Error { kind: ErrorKind::StateIDOverflow { max } } in state_id_overflow() 53 Error { kind: ErrorKind::PremultiplyOverflow { max, requested_max } } in premultiply_overflow() 60 ErrorKind::StateIDOverflow { .. } => { in description() 63 ErrorKind::PremultiplyOverflow { .. } => { in description() 73 ErrorKind::StateIDOverflow { max } => write!( in fmt() 80 ErrorKind::PremultiplyOverflow { max, requested_max } => { in fmt()
|
/third_party/rust/crates/nom/src/multi/ |
D | tests.rs | 5 error::{ErrorKind, ParseError}, 58 ErrorKind::SeparatedList in separated_list0_test() 94 Err(Err::Error(error_position!(c, ErrorKind::Tag))) in separated_list1_test() 127 ErrorKind::Many0 in many0_test() 150 Err(Err::Error(error_position!(c, ErrorKind::Tag))) in many1_test() 174 ErrorKind::ManyTill, in many_till_test() 175 error_position!(&c[..], ErrorKind::Tag) in many_till_test() 185 Err(Err::Error(error_position!(input, ErrorKind::Tag))) in infinite_many() 201 Err(Err::Error(error_position!(a, ErrorKind::Tag))) in infinite_many() 220 Err(Err::Error(error_position!(&b"ef"[..], ErrorKind::Tag))) in many_m_n_test() [all …]
|
D | mod.rs | 6 use crate::error::ErrorKind; 69 return Err(Err::Error(E::from_error_kind(i, ErrorKind::Many0))); in many0() 115 Err(Err::Error(err)) => Err(Err::Error(E::append(i, ErrorKind::Many1, err))), in many1() 130 return Err(Err::Error(E::from_error_kind(i, ErrorKind::Many1))); in many1() 183 Err(Err::Error(err)) => return Err(Err::Error(E::append(i, ErrorKind::ManyTill, err))), in many_till() 188 return Err(Err::Error(E::from_error_kind(i1, ErrorKind::ManyTill))); in many_till() 258 return Err(Err::Error(E::from_error_kind(i1, ErrorKind::SeparatedList))); in separated_list0() 332 return Err(Err::Error(E::from_error_kind(i1, ErrorKind::SeparatedList))); in separated_list1() 392 return Err(Err::Failure(E::from_error_kind(input, ErrorKind::ManyMN))); in many_m_n() 404 return Err(Err::Error(E::from_error_kind(input, ErrorKind::ManyMN))); in many_m_n() [all …]
|
/third_party/rust/crates/nom/src/combinator/ |
D | tests.rs | 4 use crate::error::ErrorKind; 13 let res: $crate::IResult<_, _, (_, ErrorKind)> = $left; 35 Err(Err::Error(error_position!(not_over, ErrorKind::Eof))) in eof_on_slices() 50 Err(Err::Error(error_position!(not_over, ErrorKind::Eof))) in eof_on_strs() 100 fn from_error_kind(_: I, _: ErrorKind) -> Self { in from_error_kind() 104 fn append(_: I, _: ErrorKind, _: CustomError) -> Self { in append() argument 130 Err(Err::Error((&[50][..], ErrorKind::MapOpt))) in test_map_opt() 152 Err(Err::Error((&[102][..], ErrorKind::Eof))) in test_all_consuming() 170 Err(Err::Error((&b"defg"[..], ErrorKind::Verify))) in test_verify_ref() 189 Err(Err::Error((&b"defg"[..], ErrorKind::Verify))) in test_verify_alloc() [all …]
|
/third_party/rust/crates/regex/regex-syntax/src/ast/ |
D | parse.rs | 70 x => Err(p.error(*x.span(), ast::ErrorKind::ClassEscapeInvalid)), in into_class_set_item() 88 x => Err(p.error(*x.span(), ast::ErrorKind::ClassRangeLiteral)), in into_class_literal() 383 fn error(&self, span: Span, kind: ast::ErrorKind) -> ast::Error { in error() 419 self.error(span, ast::ErrorKind::CaptureLimitExceeded) in next_capture_index() 438 ast::ErrorKind::GroupNameDuplicate { original: names[i].span }, in add_capture_name() 737 ast::ErrorKind::GroupUnopened, in pop_group() 743 .error(self.span_char(), ast::ErrorKind::GroupUnopened)); in pop_group() 783 self.error(group.span, ast::ErrorKind::GroupUnclosed) in pop_group_end() 800 Err(self.error(group.span, ast::ErrorKind::GroupUnclosed)) in pop_group_end() 895 return self.error(set.span, ast::ErrorKind::ClassUnclosed); in unclosed_class_error() [all …]
|
/third_party/rust/crates/nom/src/bytes/ |
D | complete.rs | 3 use crate::error::ErrorKind; 45 let e: ErrorKind = ErrorKind::Tag; in tag() 88 let e: ErrorKind = ErrorKind::Tag; in tag_no_case() 125 let e: ErrorKind = ErrorKind::IsNot; in is_not() 159 let e: ErrorKind = ErrorKind::IsA; in is_a() 221 let e: ErrorKind = ErrorKind::TakeWhile1; in take_while1() 270 ErrorKind::TakeWhileMN, in take_while_m_n() 280 ErrorKind::TakeWhileMN, in take_while_m_n() 286 let e = ErrorKind::TakeWhileMN; in take_while_m_n() 297 ErrorKind::TakeWhileMN, in take_while_m_n() [all …]
|
D | streaming.rs | 3 use crate::error::ErrorKind; 46 let e: ErrorKind = ErrorKind::Tag; in tag() 88 let e: ErrorKind = ErrorKind::Tag; in tag_no_case() 125 let e: ErrorKind = ErrorKind::IsNot; in is_not() 161 let e: ErrorKind = ErrorKind::IsA; in is_a() 230 let e: ErrorKind = ErrorKind::TakeWhile1; in take_while1() 281 ErrorKind::TakeWhileMN, in take_while_m_n() 291 ErrorKind::TakeWhileMN, in take_while_m_n() 297 let e = ErrorKind::TakeWhileMN; in take_while_m_n() 308 ErrorKind::TakeWhileMN, in take_while_m_n() [all …]
|
D | tests.rs | 6 use crate::error::ErrorKind; 34 Err(Err::Error(error_position!(c, ErrorKind::IsA))) in is_a() 58 Err(Err::Error(error_position!(c, ErrorKind::IsNot))) in is_not() 86 ErrorKind::Escaped in escaping() 93 ErrorKind::Escaped, in escaping() 94 error_position!(&b"A"[..], ErrorKind::OneOf) in escaping() 119 Err(Err::Error(error_position!("AB\\", ErrorKind::Escaped))) 125 ErrorKind::Escaped, 126 error_position!("A", ErrorKind::OneOf) 182 ErrorKind::EscapedTransform in escape_transform() [all …]
|
/third_party/rust/crates/clap/tests/builder/ |
D | version.rs | 1 use clap::{error::ErrorKind, ArgAction, Command}; 31 assert_eq!(err.kind(), clap::error::ErrorKind::UnknownArgument); in version_short_flag_no_version() 40 assert_eq!(err.kind(), clap::error::ErrorKind::UnknownArgument); in version_long_flag_no_version() 49 assert_eq!(err.kind(), ErrorKind::DisplayVersion); in version_short_flag_with_version() 59 assert_eq!(err.kind(), ErrorKind::DisplayVersion); in version_long_flag_with_version() 69 assert_eq!(err.kind(), ErrorKind::DisplayVersion); in version_short_flag_with_long_version() 79 assert_eq!(err.kind(), ErrorKind::DisplayVersion); in version_long_flag_with_long_version() 89 assert_eq!(err.kind(), ErrorKind::DisplayVersion); in version_short_flag_with_both() 99 assert_eq!(err.kind(), ErrorKind::DisplayVersion); in version_long_flag_with_both() 250 assert_eq!(err.kind(), ErrorKind::UnknownArgument); in no_propagation_by_default_long() [all …]
|
D | error.rs | 3 use clap::{arg, error::Error, error::ErrorKind, value_parser, Arg, Command}; 8 expected_kind: ErrorKind, in assert_error() argument 57 let expected_kind = ErrorKind::InvalidValue; in app_error() 89 let expected_kind = ErrorKind::DisplayHelp; in kind_prints_help() 107 let expected_kind = ErrorKind::UnknownArgument; in kind_formats_validation_error() 121 let expected_kind = ErrorKind::UnknownArgument; in rich_formats_validation_error() 140 let expected_kind = ErrorKind::UnknownArgument; in suggest_trailing() 161 let expected_kind = ErrorKind::UnknownArgument; in trailing_already_in_use() 180 let expected_kind = ErrorKind::UnknownArgument; in cant_use_trailing()
|
D | empty_values.rs | 1 use clap::{error::ErrorKind, Arg, ArgAction, Command}; 41 assert_eq!(m.unwrap_err().kind(), ErrorKind::InvalidValue); in no_empty_values() 52 assert_eq!(m.unwrap_err().kind(), ErrorKind::InvalidValue) in no_empty_values() 66 assert_eq!(m.unwrap_err().kind(), ErrorKind::InvalidValue); in no_empty_values_with_equals() 77 assert_eq!(m.unwrap_err().kind(), ErrorKind::InvalidValue); in no_empty_values_with_equals() 91 assert_eq!(m.unwrap_err().kind(), ErrorKind::InvalidValue); in no_empty_values_without_equals() 102 assert_eq!(m.unwrap_err().kind(), ErrorKind::InvalidValue) in no_empty_values_without_equals() 118 assert_eq!(m.unwrap_err().kind(), ErrorKind::NoEquals); in no_empty_values_without_equals_but_requires_equals()
|
D | cargo.rs | 4 crate_authors, crate_description, crate_name, crate_version, error::ErrorKind, Command, 38 assert_eq!(err.kind(), ErrorKind::DisplayVersion); in crate_version() 55 assert_eq!(err.kind(), ErrorKind::DisplayHelp); in crate_description() 69 assert_eq!(err.kind(), ErrorKind::DisplayHelp); in crate_authors() 83 assert_eq!(err.kind(), ErrorKind::DisplayHelp); in crate_authors_with_sep() 96 assert_eq!(err.kind(), ErrorKind::DisplayVersion); in crate_name()
|
/third_party/rust/crates/clap/src/error/ |
D | mod.rs | 35 pub use kind::ErrorKind; 66 kind: ErrorKind, 86 pub fn raw(kind: ErrorKind, message: impl std::fmt::Display) -> Self { in raw() argument 124 pub fn new(kind: ErrorKind) -> Self { in new() 173 pub fn kind(&self) -> ErrorKind { in kind() argument 205 ErrorKind::DisplayHelp | ErrorKind::DisplayVersion => Stream::Stdout, in stream() 247 ErrorKind::DisplayHelp | ErrorKind::DisplayHelpOnMissingArgumentOrSubcommand, in print() 279 fn for_app(kind: ErrorKind, cmd: &Command, styled: StyledStr) -> Self { in for_app() argument 332 Self::for_app(ErrorKind::DisplayHelp, cmd, styled) in display_help() 337 ErrorKind::DisplayHelpOnMissingArgumentOrSubcommand, in display_help_error() [all …]
|
D | format.rs | 12 use crate::error::ErrorKind; 127 ErrorKind::ArgumentConflict => { in write_dynamic_context() 166 ErrorKind::NoEquals => { in write_dynamic_context() 177 ErrorKind::InvalidValue => { in write_dynamic_context() 218 ErrorKind::InvalidSubcommand => { in write_dynamic_context() 229 ErrorKind::MissingRequiredArgument => { in write_dynamic_context() 243 ErrorKind::MissingSubcommand => { in write_dynamic_context() 272 ErrorKind::InvalidUtf8 => false, in write_dynamic_context() 273 ErrorKind::TooManyValues => { in write_dynamic_context() 291 ErrorKind::TooFewValues => { in write_dynamic_context() [all …]
|
/third_party/rust/crates/nom/benchmarks/benches/ |
D | json.rs | 13 error::{ErrorKind, ParseError}, 157 recognize_float::<_, (_, ErrorKind)>(&b"-1.234E-12"[..]) in recognize_float_bytes() 160 b.iter(|| recognize_float::<_, (_, ErrorKind)>(&b"-1.234E-12"[..])); in recognize_float_bytes() 167 recognize_float::<_, (_, ErrorKind)>("-1.234E-12") in recognize_float_str() 170 b.iter(|| recognize_float::<_, (_, ErrorKind)>("-1.234E-12")); in recognize_float_str() 177 double::<_, (_, ErrorKind)>(&b"-1.234E-12"[..]) in float_bytes() 180 b.iter(|| double::<_, (_, ErrorKind)>(&b"-1.234E-12"[..])); in float_bytes() 187 double::<_, (_, ErrorKind)>("-1.234E-12") in float_str() 190 b.iter(|| double::<_, (_, ErrorKind)>("-1.234E-12")); in float_str() 196 fn std_float(input: &[u8]) -> IResult<&[u8], f64, (&[u8], ErrorKind)> { in std_float() argument [all …]
|
/third_party/rust/crates/clap/tests/derive/ |
D | utf8.rs | 3 use clap::error::ErrorKind; 23 assert_eq!(m.unwrap_err().kind(), ErrorKind::InvalidUtf8); in invalid_utf8_strict_positional() 34 assert_eq!(m.unwrap_err().kind(), ErrorKind::InvalidUtf8); in invalid_utf8_strict_option_short_space() 44 assert_eq!(m.unwrap_err().kind(), ErrorKind::InvalidUtf8); in invalid_utf8_strict_option_short_equals() 54 assert_eq!(m.unwrap_err().kind(), ErrorKind::InvalidUtf8); in invalid_utf8_strict_option_short_no_space() 65 assert_eq!(m.unwrap_err().kind(), ErrorKind::InvalidUtf8); in invalid_utf8_strict_option_long_space() 75 assert_eq!(m.unwrap_err().kind(), ErrorKind::InvalidUtf8); in invalid_utf8_strict_option_long_equals() 186 assert_eq!(m.unwrap_err().kind(), ErrorKind::InvalidUtf8); in refuse_invalid_utf8_subcommand_with_allow_external_subcommands() 199 assert_eq!(m.unwrap_err().kind(), ErrorKind::InvalidUtf8); in refuse_invalid_utf8_subcommand_args_with_allow_external_subcommands()
|
/third_party/rust/crates/nom/tests/ |
D | escaped.rs | 4 use nom::{error::ErrorKind, Err, IResult}; 6 fn esc(s: &str) -> IResult<&str, &str, (&str, ErrorKind)> { in esc() argument 11 fn esc_trans(s: &str) -> IResult<&str, String, (&str, ErrorKind)> { 18 assert_eq!(esc("abcd"), Err(Err::Error(("abcd", ErrorKind::Escaped)))); 26 Err(Err::Error(("abcd", ErrorKind::EscapedTransform)))
|
D | custom_errors.rs | 6 use nom::error::{ErrorKind, ParseError}; 15 impl<'a> From<(&'a str, ErrorKind)> for CustomError { 16 fn from(error: (&'a str, ErrorKind)) -> Self { in from() 22 fn from_error_kind(_: &'a str, kind: ErrorKind) -> Self { in from_error_kind() 26 fn append(_: &'a str, kind: ErrorKind, other: CustomError) -> Self { in append() argument
|