Lines Matching +full:all +full:- +full:impls
10 #[cfg(feature = "extra-traits")]
21 /// [syntax tree enum]: crate::Expr#syntax-tree-enums
23 /// A UTF-8 string literal: `"foo"`.
52 /// A UTF-8 string literal: `"foo"`.
121 pub fn new(value: &str, span: Span) -> Self { in new()
132 pub fn value(&self) -> String { in value()
140 /// All spans in the syntax tree will point to the span of this `LitStr`.
153 /// fn get_path(attr: &Attribute) -> Result<Option<Path>> {
171 pub fn parse<T: Parse>(&self) -> Result<T> { in parse()
177 /// All spans in the syntax tree will point to the span of this `LitStr`.
185 /// # fn main() -> Result<()> {
201 pub fn parse_with<F: Parser>(&self, parser: F) -> Result<F::Output> { in parse_with()
205 fn respan_token_stream(stream: TokenStream, span: Span) -> TokenStream { in parse_with()
213 fn respan_token_tree(mut token: TokenTree, span: Span) -> TokenTree { in parse_with()
233 pub fn span(&self) -> Span { in span()
241 pub fn suffix(&self) -> &str { in suffix()
245 pub fn token(&self) -> Literal { in token()
251 pub fn new(value: &[u8], span: Span) -> Self { in new()
262 pub fn value(&self) -> Vec<u8> { in value()
268 pub fn span(&self) -> Span { in span()
276 pub fn suffix(&self) -> &str { in suffix()
280 pub fn token(&self) -> Literal { in token()
286 pub fn new(value: u8, span: Span) -> Self { in new()
297 pub fn value(&self) -> u8 { in value()
303 pub fn span(&self) -> Span { in span()
311 pub fn suffix(&self) -> &str { in suffix()
315 pub fn token(&self) -> Literal { in token()
321 pub fn new(value: char, span: Span) -> Self { in new()
332 pub fn value(&self) -> char { in value()
338 pub fn span(&self) -> Span { in span()
346 pub fn suffix(&self) -> &str { in suffix()
350 pub fn token(&self) -> Literal { in token()
356 pub fn new(repr: &str, span: Span) -> Self { in new()
377 pub fn base10_digits(&self) -> &str { in base10_digits()
396 /// fn parse(input: ParseStream) -> Result<Self> {
403 pub fn base10_parse<N>(&self) -> Result<N> in base10_parse()
413 pub fn suffix(&self) -> &str { in suffix()
417 pub fn span(&self) -> Span { in span()
425 pub fn token(&self) -> Literal { in token()
431 fn from(token: Literal) -> Self { in from()
448 fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { in fmt()
454 pub fn new(repr: &str, span: Span) -> Self { in new()
475 pub fn base10_digits(&self) -> &str { in base10_digits()
479 pub fn base10_parse<N>(&self) -> Result<N> in base10_parse()
489 pub fn suffix(&self) -> &str { in suffix()
493 pub fn span(&self) -> Span { in span()
501 pub fn token(&self) -> Literal { in token()
507 fn from(token: Literal) -> Self { in from()
524 fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { in fmt()
530 pub fn new(value: bool, span: Span) -> Self { in new()
534 pub fn value(&self) -> bool { in value()
538 pub fn span(&self) -> Span { in span()
546 pub fn token(&self) -> Ident { in token()
552 #[cfg(feature = "extra-traits")]
557 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
559 fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { in fmt()
567 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
569 fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { in fmt()
577 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
579 fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { in fmt()
587 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
589 fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { in fmt()
597 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
599 fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { in fmt()
607 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
609 fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { in fmt()
617 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
619 fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { in fmt()
628 #[cfg(feature = "clone-impls")]
629 #[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
631 fn clone(&self) -> Self { in clone()
639 #[cfg(feature = "clone-impls")]
640 #[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
642 fn clone(&self) -> Self { in clone()
651 #[cfg(feature = "clone-impls")]
652 #[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
654 fn clone(&self) -> Self { in clone()
665 #[cfg(feature = "clone-impls")]
666 #[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
668 fn clone(&self) -> Self {
675 #[cfg(feature = "extra-traits")]
676 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
678 fn eq(&self, other: &Self) -> bool {
683 #[cfg(feature = "extra-traits")]
684 #[cfg_attr(doc_cfg, doc(cfg(feature = "extra-traits")))]
697 pub fn $ty(marker: lookahead::TokenMarker) -> $ty {
713 pub fn LitBool(marker: lookahead::TokenMarker) -> LitBool { in LitBool()
733 pub fn Lit(marker: lookahead::TokenMarker) -> Lit { in Lit()
746 fn parse(input: ParseStream) -> Result<Self> { in parse()
764 if punct.as_char() == '-' { in parse()
776 fn parse_negative_lit(neg: Punct, cursor: Cursor) -> Option<(Lit, Cursor)> { in parse_negative_lit()
783 repr.insert(0, '-'); in parse_negative_lit()
818 fn parse(input: ParseStream) -> Result<Self> { in parse()
829 fn parse(input: ParseStream) -> Result<Self> { in parse()
840 fn parse(input: ParseStream) -> Result<Self> { in parse()
851 fn parse(input: ParseStream) -> Result<Self> { in parse()
862 fn parse(input: ParseStream) -> Result<Self> { in parse()
873 fn parse(input: ParseStream) -> Result<Self> { in parse()
884 fn parse(input: ParseStream) -> Result<Self> { in parse()
957 /// Interpret a Syn literal from a proc-macro2 literal.
958 pub fn new(token: Literal) -> Self { in new()
989 b'0'..=b'9' | b'-' => { in new()
1023 pub fn suffix(&self) -> &str { in suffix()
1035 pub fn span(&self) -> Span { in span()
1064 pub fn byte<S: AsRef<[u8]> + ?Sized>(s: &S, idx: usize) -> u8 { in byte()
1073 fn next_chr(s: &str) -> char { in next_chr()
1078 pub fn parse_lit_str(s: &str) -> (Box<str>, Box<str>) { in parse_lit_str()
1087 // https://github.com/rust-lang-nursery/rust-clippy/issues/2329
1089 fn parse_lit_str_cooked(mut s: &str) -> (Box<str>, Box<str>) { in parse_lit_str_cooked()
1150 fn parse_lit_str_raw(mut s: &str) -> (Box<str>, Box<str>) { in parse_lit_str_raw()
1170 pub fn parse_lit_byte_str(s: &str) -> (Vec<u8>, Box<str>) { in parse_lit_byte_str()
1180 // https://github.com/rust-lang-nursery/rust-clippy/issues/2329
1182 fn parse_lit_byte_str_cooked(mut s: &str) -> (Vec<u8>, Box<str>) { in parse_lit_byte_str_cooked()
1236 let suffix = s[s.len() - v.len() + 1..].to_owned().into_boxed_str(); in parse_lit_byte_str_cooked()
1240 fn parse_lit_byte_str_raw(s: &str) -> (Vec<u8>, Box<str>) { in parse_lit_byte_str_raw()
1247 pub fn parse_lit_byte(s: &str) -> (u8, Box<str>) { in parse_lit_byte()
1281 let suffix = s[s.len() - v.len() + 1..].to_owned().into_boxed_str(); in parse_lit_byte()
1286 pub fn parse_lit_char(mut s: &str) -> (char, Box<str>) { in parse_lit_char()
1327 fn backslash_x<S>(s: &S) -> (u8, &S) in backslash_x()
1336 b'0'..=b'9' => b0 - b'0', in backslash_x()
1337 b'a'..=b'f' => 10 + (b0 - b'a'), in backslash_x()
1338 b'A'..=b'F' => 10 + (b0 - b'A'), in backslash_x()
1339 _ => panic!("unexpected non-hex character after \\x"), in backslash_x()
1342 b'0'..=b'9' => b1 - b'0', in backslash_x()
1343 b'a'..=b'f' => 10 + (b1 - b'a'), in backslash_x()
1344 b'A'..=b'F' => 10 + (b1 - b'A'), in backslash_x()
1345 _ => panic!("unexpected non-hex character after \\x"), in backslash_x()
1350 fn backslash_u(mut s: &str) -> (char, &str) { in backslash_u()
1361 b'0'..=b'9' => b - b'0', in backslash_u()
1362 b'a'..=b'f' => 10 + b - b'a', in backslash_u()
1363 b'A'..=b'F' => 10 + b - b'A', in backslash_u()
1370 _ => panic!("unexpected non-hex character after \\u"), in backslash_u()
1391 pub fn parse_lit_int(mut s: &str) -> Option<(Box<str>, Box<str>)> { in parse_lit_int()
1392 let negative = byte(s, 0) == b'-'; in parse_lit_int()
1418 b'0'..=b'9' => b - b'0', in parse_lit_int()
1419 b'a'..=b'f' if base > 10 => b - b'a' + 10, in parse_lit_int()
1420 b'A'..=b'F' if base > 10 => b - b'A' + 10, in parse_lit_int()
1433 b'-' | b'+' => return None, in parse_lit_int()
1467 repr.insert(0, '-'); in parse_lit_int()
1476 pub fn parse_lit_float(input: &str) -> Option<(Box<str>, Box<str>)> { in parse_lit_float()
1483 let start = (*bytes.first()? == b'-') as usize; in parse_lit_float()
1521 b'-' | b'+' | b'0'..=b'9' => {} in parse_lit_float()
1534 b'-' | b'+' => { in parse_lit_float()
1539 if bytes[read] == b'-' { in parse_lit_float()
1568 pub fn to_literal(repr: &str, digits: &str, suffix: &str) -> Option<Literal> { in to_literal()
1571 // Rustc older than https://github.com/rust-lang/rust/pull/87262. in to_literal()
1572 if repr.starts_with('-') { in to_literal()