Home
last modified time | relevance | path

Searched refs:ErrorKind (Results 1 - 25 of 102) sorted by relevance

12345

/third_party/rust/crates/nom/src/character/
H A Dcomplete.rs7 use crate::error::ErrorKind;
22 /// # use nom::{Err, error::{ErrorKind, Error}, IResult};
28 /// assert_eq!(parser(" abc"), Err(Err::Error(Error::new(" abc", ErrorKind::Char))));
29 /// assert_eq!(parser("bc"), Err(Err::Error(Error::new("bc", ErrorKind::Char))));
30 /// assert_eq!(parser(""), Err(Err::Error(Error::new("", ErrorKind::Char))));
52 /// # use nom::{Err, error::{ErrorKind, Error}, Needed, IResult};
58 /// assert_eq!(parser("cd"), Err(Err::Error(Error::new("cd", ErrorKind::Satisfy))));
59 /// assert_eq!(parser(""), Err(Err::Error(Error::new("", ErrorKind::Satisfy))));
73 _ => Err(Err::Error(Error::from_error_kind(i, ErrorKind::Satisfy))), in satisfy()
83 /// # use nom::{Err, error::ErrorKind};
[all...]
H A Dstreaming.rs7 use crate::error::ErrorKind;
22 /// # use nom::{Err, error::{ErrorKind, Error}, Needed, IResult};
28 /// assert_eq!(parser("bc"), Err(Err::Error(Error::new("bc", ErrorKind::Char))));
52 /// # use nom::{Err, error::{ErrorKind, Error}, Needed, IResult};
58 /// assert_eq!(parser("cd"), Err(Err::Error(Error::new("cd", ErrorKind::Satisfy))));
73 Some((_, false)) => Err(Err::Error(Error::from_error_kind(i, ErrorKind::Satisfy))), in satisfy()
84 /// # use nom::{Err, error::ErrorKind, Needed};
86 /// assert_eq!(one_of::<_, _, (_, ErrorKind)>("abc")("b"), Ok(("", 'b')));
87 /// assert_eq!(one_of::<_, _, (_, ErrorKind)>("a")("bc"), Err(Err::Error(("bc", ErrorKind
[all...]
H A Dtests.rs2 use crate::error::ErrorKind;
15 assert_eq!(f(b), Err(Err::Error(error_position!(b, ErrorKind::OneOf)))); in one_of_test()
32 assert_eq!(f(a), Err(Err::Error(error_position!(a, ErrorKind::NoneOf)))); in none_of_test()
45 assert_eq!(f(a), Err(Err::Error(error_position!(a, ErrorKind::Char)))); in char_byteslice()
58 assert_eq!(f(a), Err(Err::Error(error_position!(a, ErrorKind::Char)))); in char_str()
/third_party/rust/crates/autocfg/src/
H A Derror.rs10 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/nom/src/sequence/
H A Dtests.rs3 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()
38 let v: Vec<(P, ErrorKind<u32>)> = error_to_list(e); in error_to_string()
41 // [ErrorKind::Custom(42), ErrorKind::Tag] => "missing `ijkl` tag", in error_to_string()
42 // [ErrorKind::Custom(42), ErrorKind::Custom(128), ErrorKind::Tag] => "missing `mnop` tag after `ijkl`", in error_to_string()
46 let collected: Vec<ErrorKind<u3 in error_to_string()
[all...]
/third_party/rust/crates/regex/regex-capi/src/
H A Derror.rs12 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 in fmt()
[all...]
/third_party/rust/crates/regex/regex-syntax/src/ast/
H A Dparse.rs70 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 in unclosed_class_error()
[all...]
/third_party/rust/crates/clap/tests/builder/
H A Dversion.rs1 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 in no_propagation_by_default_long()
[all...]
H A Derror.rs3 use clap::{arg, error::Error, error::ErrorKind, value_parser, Arg, Command};
8 expected_kind: ErrorKind, in assert_error()
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()
H A Dcargo.rs4 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()
H A Dempty_values.rs1 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()
H A Dconflicts.rs1 use clap::{arg, error::ErrorKind, Arg, ArgAction, ArgGroup, Command};
14 assert_eq!(err.kind(), ErrorKind::ArgumentConflict); in flag_conflict()
25 assert_eq!(err.kind(), ErrorKind::ArgumentConflict); in flag_conflict_2()
36 assert_eq!(err.kind(), ErrorKind::ArgumentConflict); in flag_conflict_with_all()
50 assert_eq!(err.kind(), ErrorKind::ArgumentConflict); in exclusive_flag()
61 assert_eq!(err.kind(), ErrorKind::ArgumentConflict); in exclusive_option()
115 assert_eq!(err.kind(), ErrorKind::ArgumentConflict); in arg_conflicts_with_group()
120 assert_eq!(err.kind(), ErrorKind::ArgumentConflict); in arg_conflicts_with_group()
167 assert_eq!(err.kind(), ErrorKind::ArgumentConflict); in arg_conflicts_with_group_with_multiple_sources()
186 assert_eq!(err.kind(), ErrorKind in group_conflicts_with_arg()
[all...]
/third_party/rust/crates/aho-corasick/src/
H A Derror.rs11 kind: ErrorKind,
16 pub enum ErrorKind { enum
41 pub fn kind(&self) -> &ErrorKind { in kind()
46 Error { kind: ErrorKind::StateIDOverflow { max } }
53 Error { kind: ErrorKind::PremultiplyOverflow { max, requested_max } }
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/bytes/
H A Dcomplete.rs3 use crate::error::ErrorKind;
18 /// It will return `Err(Err::Error((_, ErrorKind::Tag)))` if the input doesn't match the pattern
21 /// # use nom::{Err, error::{Error, ErrorKind}, Needed, IResult};
29 /// assert_eq!(parser("Something"), Err(Err::Error(Error::new("Something", ErrorKind::Tag))));
30 /// assert_eq!(parser(""), Err(Err::Error(Error::new("", ErrorKind::Tag))));
45 let e: ErrorKind = ErrorKind::Tag; in tag()
58 /// It will return `Err(Err::Error((_, ErrorKind::Tag)))` if the input doesn't match the pattern.
61 /// # use nom::{Err, error::{Error, ErrorKind}, Needed, IResult};
71 /// assert_eq!(parser("Something"), Err(Err::Error(Error::new("Something", ErrorKind
[all...]
H A Dstreaming.rs3 use crate::error::ErrorKind;
19 /// # use nom::{Err, error::{Error, ErrorKind}, Needed, IResult};
27 /// assert_eq!(parser("Something"), Err(Err::Error(Error::new("Something", ErrorKind::Tag))));
28 /// assert_eq!(parser("S"), Err(Err::Error(Error::new("S", ErrorKind::Tag))));
46 let e: ErrorKind = ErrorKind::Tag; in tag()
60 /// # use nom::{Err, error::{Error, ErrorKind}, Needed, IResult};
70 /// assert_eq!(parser("Something"), Err(Err::Error(Error::new("Something", ErrorKind::Tag))));
88 let e: ErrorKind = ErrorKind in tag_no_case()
[all...]
H A Dtests.rs6 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))) in escaping_str()
125 ErrorKind::Escaped, in escaping_str()
126 error_position!("A", ErrorKind::OneOf) in escaping_str()
182 ErrorKind in escape_transform()
[all...]
/third_party/rust/crates/nom/src/combinator/
H A Dtests.rs4 use crate::error::ErrorKind;
13 let res: $crate::IResult<_, _, (_, ErrorKind)> = $left;
35 Err(Err::Error(error_position!(not_over, ErrorKind::Eof))) in t1()
50 Err(Err::Error(error_position!(not_over, ErrorKind::Eof))) in eof_on_strs()
65 assert_eq!(res_not_over, Err(Err::Error(error_position!(not_over, ErrorKind::Eof)))); in end_of_input()
100 fn from_error_kind(_: I, _: ErrorKind) -> Self { in from_error_kind()
104 fn append(_: I, _: ErrorKind, _: CustomError) -> Self { in append()
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 in test_verify_ref()
[all...]
/third_party/rust/crates/nom/benchmarks/benches/
H A Djson.rs13 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()
[all...]
/third_party/rust/crates/clap/src/error/
H A Dformat.rs12 use crate::error::ErrorKind;
21 /// Report [`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 in write_dynamic_context()
[all...]
H A Dmod.rs35 pub use kind::ErrorKind;
66 kind: ErrorKind,
86 pub fn raw(kind: ErrorKind, message: impl std::fmt::Display) -> Self { in raw()
111 /// # use clap::error::ErrorKind;
117 /// let mut err = clap::Error::new(ErrorKind::ValueValidation)
124 pub fn new(kind: ErrorKind) -> Self { in new()
173 pub fn kind(&self) -> ErrorKind { in kind()
205 ErrorKind::DisplayHelp | ErrorKind::DisplayVersion => Stream::Stdout,
247 ErrorKind in print()
[all...]
/third_party/rust/crates/nom/src/multi/
H A Dtests.rs5 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 in many_m_n_test()
[all...]
H A Dmod.rs6 use crate::error::ErrorKind;
38 /// # use nom::{Err, error::ErrorKind, Needed, IResult};
69 return Err(Err::Error(E::from_error_kind(i, ErrorKind::Many0))); in many0()
93 /// # use nom::{Err, error::{Error, ErrorKind}, Needed, IResult};
103 /// assert_eq!(parser("123123"), Err(Err::Error(Error::new("123123", ErrorKind::Tag))));
104 /// assert_eq!(parser(""), Err(Err::Error(Error::new("", ErrorKind::Tag))));
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()
149 /// # use nom::{Err, error::{Error, ErrorKind}, Needed, IResult};
158 /// assert_eq!(parser("abc123end"), Err(Err::Error(Error::new("123end", ErrorKind
[all...]
/third_party/rust/crates/nom/tests/
H A Descaped.rs4 use nom::{error::ErrorKind, Err, IResult};
6 fn esc(s: &str) -> IResult<&str, &str, (&str, ErrorKind)> { in esc()
11 fn esc_trans(s: &str) -> IResult<&str, String, (&str, ErrorKind)> { in esc_trans()
18 assert_eq!(esc("abcd"), Err(Err::Error(("abcd", ErrorKind::Escaped)))); in test_escaped()
26 Err(Err::Error(("abcd", ErrorKind::EscapedTransform))) in test_escaped_transform()
/third_party/rust/crates/nom/src/
H A Derror.rs11 /// There are already implementations of it for `(Input, ErrorKind)`
17 /// Creates an error from the input position and an [ErrorKind]
18 fn from_error_kind(input: I, kind: ErrorKind) -> Self; in from_error_kind()
21 /// position and an [ErrorKind]. This is useful when backtracking
23 fn append(input: I, kind: ErrorKind, other: Self) -> Self; in append()
27 Self::from_error_kind(input, ErrorKind::Char) in from_char()
51 /// Creates a new error from an input position, an [ErrorKind] indicating the in add_context()
53 fn from_external_error(input: I, kind: ErrorKind, e: E) -> Self; in add_context()
62 pub code: ErrorKind,
67 pub fn new(input: I, code: ErrorKind)
366 pub enum ErrorKind { global() enum
483 impl ErrorKind { global() impls
[all...]
/third_party/rust/crates/clap/tests/derive/
H A Dutf8.rs3 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()

Completed in 14 milliseconds

12345