Lines Matching refs:input

299         fn parse(input: ParseStream) -> Result<Self> {  in parse()
302 ambig_ty(input, allow_plus, allow_group_generic) in parse()
313 pub fn without_plus(input: ParseStream) -> Result<Self> { in without_plus()
316 ambig_ty(input, allow_plus, allow_group_generic) in without_plus()
321 input: ParseStream, in ambig_ty()
325 let begin = input.fork(); in ambig_ty()
327 if input.peek(token::Group) { in ambig_ty()
328 let mut group: TypeGroup = input.parse()?; in ambig_ty()
329 if input.peek(Token![::]) && input.peek3(Ident::peek_any) { in ambig_ty()
331 Path::parse_rest(input, &mut ty.path, false)?; in ambig_ty()
342 path: Path::parse_helper(input, false)?, in ambig_ty()
345 } else if input.peek(Token![<]) && allow_group_generic in ambig_ty()
346 || input.peek(Token![::]) && input.peek3(Token![<]) in ambig_ty()
351 *arguments = PathArguments::AngleBracketed(input.parse()?); in ambig_ty()
352 Path::parse_rest(input, &mut ty.path, false)?; in ambig_ty()
363 let mut lookahead = input.lookahead1(); in ambig_ty()
365 lifetimes = input.parse()?; in ambig_ty()
366 lookahead = input.lookahead1(); in ambig_ty()
375 || input.peek(Token![dyn]) in ambig_ty()
383 let paren_token = parenthesized!(content in input); in ambig_ty()
405 while let Some(plus) = input.parse()? { in ambig_ty()
411 input, in ambig_ty()
440 if allow_plus && input.peek(Token![+]) { in ambig_ty()
481 while let Some(plus) = input.parse()? { in ambig_ty()
487 input, in ambig_ty()
506 let mut bare_fn: TypeBareFn = input.parse()?; in ambig_ty()
510 || input.peek(Token![super]) in ambig_ty()
511 || input.peek(Token![self]) in ambig_ty()
512 || input.peek(Token![Self]) in ambig_ty()
513 || input.peek(Token![crate]) in ambig_ty()
517 let ty: TypePath = input.parse()?; in ambig_ty()
522 if input.peek(Token![!]) && !input.peek(Token![!=]) && ty.path.is_mod_style() { in ambig_ty()
523 let bang_token: Token![!] = input.parse()?; in ambig_ty()
524 let (delimiter, tokens) = mac::parse_delimiter(input)?; in ambig_ty()
535 if lifetimes.is_some() || allow_plus && input.peek(Token![+]) { in ambig_ty()
544 while input.peek(Token![+]) { in ambig_ty()
545 bounds.push_punct(input.parse()?); in ambig_ty()
546 if !(input.peek(Ident::peek_any) in ambig_ty()
547 || input.peek(Token![::]) in ambig_ty()
548 || input.peek(Token![?]) in ambig_ty()
549 || input.peek(Lifetime) in ambig_ty()
550 || input.peek(token::Paren)) in ambig_ty()
557 TypeParamBound::parse_single(input, allow_precise_capture, allow_const)? in ambig_ty()
569 let dyn_token: Token![dyn] = input.parse()?; in ambig_ty()
571 let star_token: Option<Token![*]> = input.parse()?; in ambig_ty()
572 let bounds = TypeTraitObject::parse_bounds(dyn_span, input, allow_plus)?; in ambig_ty()
574 Type::Verbatim(verbatim::between(&begin, input)) in ambig_ty()
583 let bracket_token = bracketed!(content in input); in ambig_ty()
599 input.parse().map(Type::Ptr) in ambig_ty()
601 input.parse().map(Type::Reference) in ambig_ty()
602 } else if lookahead.peek(Token![!]) && !input.peek(Token![=]) { in ambig_ty()
603 input.parse().map(Type::Never) in ambig_ty()
605 TypeImplTrait::parse(input, allow_plus).map(Type::ImplTrait) in ambig_ty()
607 input.parse().map(Type::Infer) in ambig_ty()
609 input.parse().map(Type::TraitObject) in ambig_ty()
617 fn parse(input: ParseStream) -> Result<Self> { in parse()
620 bracket_token: bracketed!(content in input), in parse()
628 fn parse(input: ParseStream) -> Result<Self> { in parse()
631 bracket_token: bracketed!(content in input), in parse()
641 fn parse(input: ParseStream) -> Result<Self> { in parse()
642 let star_token: Token![*] = input.parse()?; in parse()
644 let lookahead = input.lookahead1(); in parse()
646 (Some(input.parse()?), None) in parse()
648 (None, Some(input.parse()?)) in parse()
657 elem: Box::new(input.call(Type::without_plus)?), in parse()
664 fn parse(input: ParseStream) -> Result<Self> { in parse()
666 and_token: input.parse()?, in parse()
667 lifetime: input.parse()?, in parse()
668 mutability: input.parse()?, in parse()
670 elem: Box::new(input.call(Type::without_plus)?), in parse()
677 fn parse(input: ParseStream) -> Result<Self> { in parse()
682 lifetimes: input.parse()?, in parse()
683 unsafety: input.parse()?, in parse()
684 abi: input.parse()?, in parse()
685 fn_token: input.parse()?, in parse()
686 paren_token: parenthesized!(args in input), in parse()
717 output: input.call(ReturnType::without_plus)?, in parse()
724 fn parse(input: ParseStream) -> Result<Self> { in parse()
726 bang_token: input.parse()?, in parse()
733 fn parse(input: ParseStream) -> Result<Self> { in parse()
735 underscore_token: input.parse()?, in parse()
742 fn parse(input: ParseStream) -> Result<Self> { in parse()
744 let paren_token = parenthesized!(content in input); in parse()
775 fn parse(input: ParseStream) -> Result<Self> { in parse()
777 mac: input.parse()?, in parse()
784 fn parse(input: ParseStream) -> Result<Self> { in parse()
786 let (qself, path) = path::parsing::qpath(input, expr_style)?; in parse()
793 pub fn without_plus(input: ParseStream) -> Result<Self> { in without_plus()
795 Self::parse(input, allow_plus) in without_plus()
798 pub(crate) fn parse(input: ParseStream, allow_plus: bool) -> Result<Self> { in parse()
799 if input.peek(Token![->]) { in parse()
800 let arrow = input.parse()?; in parse()
802 let ty = ambig_ty(input, allow_plus, allow_group_generic)?; in parse()
812 fn parse(input: ParseStream) -> Result<Self> { in parse()
814 Self::parse(input, allow_plus) in parse()
820 fn parse(input: ParseStream) -> Result<Self> { in parse()
822 Self::parse(input, allow_plus) in parse()
828 pub fn without_plus(input: ParseStream) -> Result<Self> { in without_plus()
830 Self::parse(input, allow_plus) in without_plus()
834 pub(crate) fn parse(input: ParseStream, allow_plus: bool) -> Result<Self> { in parse()
835 let dyn_token: Option<Token![dyn]> = input.parse()?; in parse()
838 None => input.span(), in parse()
840 let bounds = Self::parse_bounds(dyn_span, input, allow_plus)?; in parse()
846 input: ParseStream, in parse_bounds()
852 input, in parse_bounds()
884 fn parse(input: ParseStream) -> Result<Self> { in parse()
886 Self::parse(input, allow_plus) in parse()
892 pub fn without_plus(input: ParseStream) -> Result<Self> { in without_plus()
894 Self::parse(input, allow_plus) in without_plus()
897 pub(crate) fn parse(input: ParseStream, allow_plus: bool) -> Result<Self> { in parse()
898 let impl_token: Token![impl] = input.parse()?; in parse()
902 input, in parse()
950 fn parse(input: ParseStream) -> Result<Self> { in parse()
951 let group = crate::group::parse_group(input)?; in parse()
961 fn parse(input: ParseStream) -> Result<Self> { in parse()
963 Self::parse(input, allow_plus) in parse()
968 fn parse(input: ParseStream, allow_plus: bool) -> Result<Self> { in parse()
971 paren_token: parenthesized!(content in input), in parse()
982 fn parse(input: ParseStream) -> Result<Self> { in parse()
984 parse_bare_fn_arg(input, allow_self) in parse()
988 fn parse_bare_fn_arg(input: ParseStream, allow_self: bool) -> Result<BareFnArg> { in parse_bare_fn_arg()
989 let attrs = input.call(Attribute::parse_outer)?; in parse_bare_fn_arg()
991 let begin = input.fork(); in parse_bare_fn_arg()
993 let has_mut_self = allow_self && input.peek(Token![mut]) && input.peek2(Token![self]); in parse_bare_fn_arg()
995 input.parse::<Token![mut]>()?; in parse_bare_fn_arg()
999 let mut name = if (input.peek(Ident) || input.peek(Token![_]) || { in parse_bare_fn_arg()
1000 has_self = allow_self && input.peek(Token![self]); in parse_bare_fn_arg()
1002 }) && input.peek2(Token![:]) in parse_bare_fn_arg()
1003 && !input.peek2(Token![::]) in parse_bare_fn_arg()
1005 let name = input.call(Ident::parse_any)?; in parse_bare_fn_arg()
1006 let colon: Token![:] = input.parse()?; in parse_bare_fn_arg()
1013 let ty = if allow_self && !has_self && input.peek(Token![mut]) && input.peek2(Token![self]) in parse_bare_fn_arg()
1015 input.parse::<Token![mut]>()?; in parse_bare_fn_arg()
1016 input.parse::<Token![self]>()?; in parse_bare_fn_arg()
1019 input.parse::<Token![self]>()?; in parse_bare_fn_arg()
1022 Some(input.parse()?) in parse_bare_fn_arg()
1029 Type::Verbatim(verbatim::between(&begin, input)) in parse_bare_fn_arg()
1036 fn parse_bare_variadic(input: ParseStream, attrs: Vec<Attribute>) -> Result<BareVariadic> { in parse_bare_variadic()
1039 name: if input.peek(Ident) || input.peek(Token![_]) { in parse_bare_variadic()
1040 let name = input.call(Ident::parse_any)?; in parse_bare_variadic()
1041 let colon: Token![:] = input.parse()?; in parse_bare_variadic()
1046 dots: input.parse()?, in parse_bare_variadic()
1047 comma: input.parse()?, in parse_bare_variadic()
1053 fn parse(input: ParseStream) -> Result<Self> { in parse()
1055 extern_token: input.parse()?, in parse()
1056 name: input.parse()?, in parse()
1063 fn parse(input: ParseStream) -> Result<Self> { in parse()
1064 if input.peek(Token![extern]) { in parse()
1065 input.parse().map(Some) in parse()