• Home
  • Raw
  • Download

Lines Matching refs:input

388     fn from(input: DeriveInput) -> Item {  in from()
389 match input.data { in from()
391 attrs: input.attrs, in from()
392 vis: input.vis, in from()
394 ident: input.ident, in from()
395 generics: input.generics, in from()
400 attrs: input.attrs, in from()
401 vis: input.vis, in from()
403 ident: input.ident, in from()
404 generics: input.generics, in from()
409 attrs: input.attrs, in from()
410 vis: input.vis, in from()
412 ident: input.ident, in from()
413 generics: input.generics, in from()
421 fn from(input: ItemStruct) -> DeriveInput { in from()
423 attrs: input.attrs, in from()
424 vis: input.vis, in from()
425 ident: input.ident, in from()
426 generics: input.generics, in from()
428 struct_token: input.struct_token, in from()
429 fields: input.fields, in from()
430 semi_token: input.semi_token, in from()
437 fn from(input: ItemEnum) -> DeriveInput { in from()
439 attrs: input.attrs, in from()
440 vis: input.vis, in from()
441 ident: input.ident, in from()
442 generics: input.generics, in from()
444 enum_token: input.enum_token, in from()
445 brace_token: input.brace_token, in from()
446 variants: input.variants, in from()
453 fn from(input: ItemUnion) -> DeriveInput { in from()
455 attrs: input.attrs, in from()
456 vis: input.vis, in from()
457 ident: input.ident, in from()
458 generics: input.generics, in from()
460 union_token: input.union_token, in from()
461 fields: input.fields, in from()
978 fn parse(input: ParseStream) -> Result<Self> { in parse()
979 let begin = input.fork(); in parse()
980 let mut attrs = input.call(Attribute::parse_outer)?; in parse()
981 let ahead = input.fork(); in parse()
986 let vis: Visibility = input.parse()?; in parse()
987 let sig: Signature = input.parse()?; in parse()
988 if input.peek(Token![;]) { in parse()
989 input.parse::<Token![;]>()?; in parse()
990 Ok(Item::Verbatim(verbatim::between(begin, input))) in parse()
992 parse_rest_of_fn(input, Vec::new(), vis, sig).map(Item::Fn) in parse()
998 input.parse().map(Item::ExternCrate) in parse()
1000 input.parse().map(Item::ForeignMod) in parse()
1005 input.parse().map(Item::ForeignMod) in parse()
1013 input.parse().map(Item::Use) in parse()
1015 let vis = input.parse()?; in parse()
1016 let static_token = input.parse()?; in parse()
1017 let mutability = input.parse()?; in parse()
1018 let ident = input.parse()?; in parse()
1019 if input.peek(Token![=]) { in parse()
1020 input.parse::<Token![=]>()?; in parse()
1021 input.parse::<Expr>()?; in parse()
1022 input.parse::<Token![;]>()?; in parse()
1023 Ok(Item::Verbatim(verbatim::between(begin, input))) in parse()
1025 let colon_token = input.parse()?; in parse()
1026 let ty = input.parse()?; in parse()
1027 if input.peek(Token![;]) { in parse()
1028 input.parse::<Token![;]>()?; in parse()
1029 Ok(Item::Verbatim(verbatim::between(begin, input))) in parse()
1039 eq_token: input.parse()?, in parse()
1040 expr: input.parse()?, in parse()
1041 semi_token: input.parse()?, in parse()
1049 let vis = input.parse()?; in parse()
1050 let const_token = input.parse()?; in parse()
1052 let lookahead = input.lookahead1(); in parse()
1054 input.call(Ident::parse_any)? in parse()
1059 let colon_token = input.parse()?; in parse()
1060 let ty = input.parse()?; in parse()
1061 if input.peek(Token![;]) { in parse()
1062 input.parse::<Token![;]>()?; in parse()
1063 Ok(Item::Verbatim(verbatim::between(begin, input))) in parse()
1072 eq_token: input.parse()?, in parse()
1073 expr: input.parse()?, in parse()
1074 semi_token: input.parse()?, in parse()
1086 input.parse().map(Item::Trait) in parse()
1089 if let Some(item) = parse_impl(input, allow_verbatim_impl)? { in parse()
1092 Ok(Item::Verbatim(verbatim::between(begin, input))) in parse()
1095 input.parse::<Visibility>()?; in parse()
1096 input.parse::<Token![unsafe]>()?; in parse()
1097 input.parse::<ItemForeignMod>()?; in parse()
1098 Ok(Item::Verbatim(verbatim::between(begin, input))) in parse()
1100 input.parse::<Visibility>()?; in parse()
1101 input.parse::<Token![unsafe]>()?; in parse()
1102 input.parse::<ItemMod>()?; in parse()
1103 Ok(Item::Verbatim(verbatim::between(begin, input))) in parse()
1108 input.parse().map(Item::Mod) in parse()
1110 parse_item_type(begin, input) in parse()
1112 input.parse().map(Item::Struct) in parse()
1114 input.parse().map(Item::Enum) in parse()
1116 input.parse().map(Item::Union) in parse()
1118 input.call(parse_trait_or_trait_alias) in parse()
1120 input.parse().map(Item::Trait) in parse()
1125 if let Some(item) = parse_impl(input, allow_verbatim_impl)? { in parse()
1128 Ok(Item::Verbatim(verbatim::between(begin, input))) in parse()
1131 input.parse().map(Item::Macro2) in parse()
1139 input.parse().map(Item::Macro) in parse()
1141 input.advance_to(&ahead); in parse()
1142 input.parse::<ItemMacro>()?; in parse()
1143 Ok(Item::Verbatim(verbatim::between(begin, input))) in parse()
1177 fn parse(input: ParseStream, where_clause_location: WhereClauseLocation) -> Result<Self> { in parse()
1178 let vis: Visibility = input.parse()?; in parse()
1179 let defaultness: Option<Token![default]> = input.parse()?; in parse()
1180 let type_token: Token![type] = input.parse()?; in parse()
1181 let ident: Ident = input.parse()?; in parse()
1182 let mut generics: Generics = input.parse()?; in parse()
1183 let colon_token: Option<Token![:]> = input.parse()?; in parse()
1188 if input.peek(Token![where]) || input.peek(Token![=]) || input.peek(Token![;]) { in parse()
1191 bounds.push_value(input.parse::<TypeParamBound>()?); in parse()
1192 if input.peek(Token![where]) || input.peek(Token![=]) || input.peek(Token![;]) { in parse()
1195 bounds.push_punct(input.parse::<Token![+]>()?); in parse()
1201 generics.where_clause = input.parse()?; in parse()
1206 let ty = if let Some(eq_token) = input.parse()? { in parse()
1207 Some((eq_token, input.parse::<Type>()?)) in parse()
1216 generics.where_clause = input.parse()?; in parse()
1221 let semi_token: Token![;] = input.parse()?; in parse()
1239 fn parse(input: ParseStream) -> Result<Self> { in parse()
1240 let attrs = input.call(Attribute::parse_outer)?; in parse()
1241 let path = input.call(Path::parse_mod_style)?; in parse()
1242 let bang_token: Token![!] = input.parse()?; in parse()
1243 let ident: Option<Ident> = input.parse()?; in parse()
1244 let (delimiter, tokens) = input.call(mac::parse_delimiter)?; in parse()
1246 Some(input.parse()?) in parse()
1266 fn parse(input: ParseStream) -> Result<Self> { in parse()
1267 let attrs = input.call(Attribute::parse_outer)?; in parse()
1268 let vis: Visibility = input.parse()?; in parse()
1269 let macro_token: Token![macro] = input.parse()?; in parse()
1270 let ident: Ident = input.parse()?; in parse()
1273 let mut lookahead = input.lookahead1(); in parse()
1276 let paren_token = parenthesized!(paren_content in input); in parse()
1281 lookahead = input.lookahead1(); in parse()
1286 let brace_token = braced!(brace_content in input); in parse()
1307 fn parse(input: ParseStream) -> Result<Self> { in parse()
1309 attrs: input.call(Attribute::parse_outer)?, in parse()
1310 vis: input.parse()?, in parse()
1311 extern_token: input.parse()?, in parse()
1312 crate_token: input.parse()?, in parse()
1314 if input.peek(Token![self]) { in parse()
1315 input.call(Ident::parse_any)? in parse()
1317 input.parse()? in parse()
1321 if input.peek(Token![as]) { in parse()
1322 let as_token: Token![as] = input.parse()?; in parse()
1323 let rename: Ident = if input.peek(Token![_]) { in parse()
1324 Ident::from(input.parse::<Token![_]>()?) in parse()
1326 input.parse()? in parse()
1333 semi_token: input.parse()?, in parse()
1340 fn parse(input: ParseStream) -> Result<Self> { in parse()
1342 attrs: input.call(Attribute::parse_outer)?, in parse()
1343 vis: input.parse()?, in parse()
1344 use_token: input.parse()?, in parse()
1345 leading_colon: input.parse()?, in parse()
1346 tree: input.parse()?, in parse()
1347 semi_token: input.parse()?, in parse()
1354 fn parse(input: ParseStream) -> Result<UseTree> { in parse()
1355 let lookahead = input.lookahead1(); in parse()
1361 let ident = input.call(Ident::parse_any)?; in parse()
1362 if input.peek(Token![::]) { in parse()
1365 colon2_token: input.parse()?, in parse()
1366 tree: Box::new(input.parse()?), in parse()
1368 } else if input.peek(Token![as]) { in parse()
1371 as_token: input.parse()?, in parse()
1373 if input.peek(Ident) { in parse()
1374 input.parse()? in parse()
1375 } else if input.peek(Token![_]) { in parse()
1376 Ident::from(input.parse::<Token![_]>()?) in parse()
1378 return Err(input.error("expected identifier or underscore")); in parse()
1387 star_token: input.parse()?, in parse()
1392 brace_token: braced!(content in input), in parse()
1403 fn parse(input: ParseStream) -> Result<Self> { in parse()
1405 attrs: input.call(Attribute::parse_outer)?, in parse()
1406 vis: input.parse()?, in parse()
1407 static_token: input.parse()?, in parse()
1408 mutability: input.parse()?, in parse()
1409 ident: input.parse()?, in parse()
1410 colon_token: input.parse()?, in parse()
1411 ty: input.parse()?, in parse()
1412 eq_token: input.parse()?, in parse()
1413 expr: input.parse()?, in parse()
1414 semi_token: input.parse()?, in parse()
1421 fn parse(input: ParseStream) -> Result<Self> { in parse()
1423 attrs: input.call(Attribute::parse_outer)?, in parse()
1424 vis: input.parse()?, in parse()
1425 const_token: input.parse()?, in parse()
1427 let lookahead = input.lookahead1(); in parse()
1429 input.call(Ident::parse_any)? in parse()
1434 colon_token: input.parse()?, in parse()
1435 ty: input.parse()?, in parse()
1436 eq_token: input.parse()?, in parse()
1437 expr: input.parse()?, in parse()
1438 semi_token: input.parse()?, in parse()
1491 fn peek_signature(input: ParseStream) -> bool { in peek_signature()
1492 let fork = input.fork(); in peek_signature()
1502 fn parse(input: ParseStream) -> Result<Self> { in parse()
1503 let constness: Option<Token![const]> = input.parse()?; in parse()
1504 let asyncness: Option<Token![async]> = input.parse()?; in parse()
1505 let unsafety: Option<Token![unsafe]> = input.parse()?; in parse()
1506 let abi: Option<Abi> = input.parse()?; in parse()
1507 let fn_token: Token![fn] = input.parse()?; in parse()
1508 let ident: Ident = input.parse()?; in parse()
1509 let mut generics: Generics = input.parse()?; in parse()
1512 let paren_token = parenthesized!(content in input); in parse()
1516 let output: ReturnType = input.parse()?; in parse()
1517 generics.where_clause = input.parse()?; in parse()
1537 fn parse(input: ParseStream) -> Result<Self> { in parse()
1538 let outer_attrs = input.call(Attribute::parse_outer)?; in parse()
1539 let vis: Visibility = input.parse()?; in parse()
1540 let sig: Signature = input.parse()?; in parse()
1541 parse_rest_of_fn(input, outer_attrs, vis, sig) in parse()
1546 input: ParseStream, in parse_rest_of_fn()
1552 let brace_token = braced!(content in input); in parse_rest_of_fn()
1566 fn parse(input: ParseStream) -> Result<Self> { in parse()
1567 let attrs = input.call(Attribute::parse_outer)?; in parse()
1569 let ahead = input.fork(); in parse()
1572 input.advance_to(&ahead); in parse()
1578 let mut typed = input.call(fn_arg_typed)?; in parse()
1586 fn parse(input: ParseStream) -> Result<Self> { in parse()
1590 if input.peek(Token![&]) { in parse()
1591 Some((input.parse()?, input.parse()?)) in parse()
1596 mutability: input.parse()?, in parse()
1597 self_token: input.parse()?, in parse()
1602 fn parse_fn_args(input: ParseStream) -> Result<Punctuated<FnArg, Token![,]>> { in parse_fn_args()
1606 while !input.is_empty() { in parse_fn_args()
1607 let attrs = input.call(Attribute::parse_outer)?; in parse_fn_args()
1609 let arg = if let Some(dots) = input.parse::<Option<Token![...]>>()? { in parse_fn_args()
1617 let mut arg: FnArg = input.parse()?; in parse_fn_args()
1641 if input.is_empty() { in parse_fn_args()
1645 let comma: Token![,] = input.parse()?; in parse_fn_args()
1652 fn fn_arg_typed(input: ParseStream) -> Result<PatType> { in fn_arg_typed()
1656 if input.peek(Ident) && input.peek2(Token![<]) { in fn_arg_typed()
1657 let span = input.fork().parse::<Ident>()?.span(); in fn_arg_typed()
1665 ty: input.parse()?, in fn_arg_typed()
1671 pat: Box::new(pat::parsing::multi_pat(input)?), in fn_arg_typed()
1672 colon_token: input.parse()?, in fn_arg_typed()
1673 ty: Box::new(match input.parse::<Option<Token![...]>>()? { in fn_arg_typed()
1675 None => input.parse()?, in fn_arg_typed()
1682 fn parse(input: ParseStream) -> Result<Self> { in parse()
1683 let mut attrs = input.call(Attribute::parse_outer)?; in parse()
1684 let vis: Visibility = input.parse()?; in parse()
1685 let mod_token: Token![mod] = input.parse()?; in parse()
1686 let ident: Ident = input.parse()?; in parse()
1688 let lookahead = input.lookahead1(); in parse()
1696 semi: Some(input.parse()?), in parse()
1700 let brace_token = braced!(content in input); in parse()
1724 fn parse(input: ParseStream) -> Result<Self> { in parse()
1725 let mut attrs = input.call(Attribute::parse_outer)?; in parse()
1726 let abi: Abi = input.parse()?; in parse()
1729 let brace_token = braced!(content in input); in parse()
1747 fn parse(input: ParseStream) -> Result<Self> { in parse()
1748 let begin = input.fork(); in parse()
1749 let mut attrs = input.call(Attribute::parse_outer)?; in parse()
1750 let ahead = input.fork(); in parse()
1755 let vis: Visibility = input.parse()?; in parse()
1756 let sig: Signature = input.parse()?; in parse()
1757 if input.peek(token::Brace) { in parse()
1759 braced!(content in input); in parse()
1763 Ok(ForeignItem::Verbatim(verbatim::between(begin, input))) in parse()
1769 semi_token: input.parse()?, in parse()
1773 let vis = input.parse()?; in parse()
1774 let static_token = input.parse()?; in parse()
1775 let mutability = input.parse()?; in parse()
1776 let ident = input.parse()?; in parse()
1777 let colon_token = input.parse()?; in parse()
1778 let ty = input.parse()?; in parse()
1779 if input.peek(Token![=]) { in parse()
1780 input.parse::<Token![=]>()?; in parse()
1781 input.parse::<Expr>()?; in parse()
1782 input.parse::<Token![;]>()?; in parse()
1783 Ok(ForeignItem::Verbatim(verbatim::between(begin, input))) in parse()
1793 semi_token: input.parse()?, in parse()
1797 parse_foreign_item_type(begin, input) in parse()
1805 input.parse().map(ForeignItem::Macro) in parse()
1829 fn parse(input: ParseStream) -> Result<Self> { in parse()
1830 let attrs = input.call(Attribute::parse_outer)?; in parse()
1831 let vis: Visibility = input.parse()?; in parse()
1832 let sig: Signature = input.parse()?; in parse()
1833 let semi_token: Token![;] = input.parse()?; in parse()
1845 fn parse(input: ParseStream) -> Result<Self> { in parse()
1847 attrs: input.call(Attribute::parse_outer)?, in parse()
1848 vis: input.parse()?, in parse()
1849 static_token: input.parse()?, in parse()
1850 mutability: input.parse()?, in parse()
1851 ident: input.parse()?, in parse()
1852 colon_token: input.parse()?, in parse()
1853 ty: input.parse()?, in parse()
1854 semi_token: input.parse()?, in parse()
1861 fn parse(input: ParseStream) -> Result<Self> { in parse()
1863 attrs: input.call(Attribute::parse_outer)?, in parse()
1864 vis: input.parse()?, in parse()
1865 type_token: input.parse()?, in parse()
1866 ident: input.parse()?, in parse()
1867 semi_token: input.parse()?, in parse()
1872 fn parse_foreign_item_type(begin: ParseBuffer, input: ParseStream) -> Result<ForeignItem> { in parse_foreign_item_type()
1883 } = FlexibleItemType::parse(input, WhereClauseLocation::BeforeEq)?; in parse_foreign_item_type()
1891 Ok(ForeignItem::Verbatim(verbatim::between(begin, input))) in parse_foreign_item_type()
1905 fn parse(input: ParseStream) -> Result<Self> { in parse()
1906 let attrs = input.call(Attribute::parse_outer)?; in parse()
1907 let mac: Macro = input.parse()?; in parse()
1911 Some(input.parse()?) in parse()
1923 fn parse(input: ParseStream) -> Result<Self> { in parse()
1925 attrs: input.call(Attribute::parse_outer)?, in parse()
1926 vis: input.parse()?, in parse()
1927 type_token: input.parse()?, in parse()
1928 ident: input.parse()?, in parse()
1930 let mut generics: Generics = input.parse()?; in parse()
1931 generics.where_clause = input.parse()?; in parse()
1934 eq_token: input.parse()?, in parse()
1935 ty: input.parse()?, in parse()
1936 semi_token: input.parse()?, in parse()
1941 fn parse_item_type(begin: ParseBuffer, input: ParseStream) -> Result<Item> { in parse_item_type()
1952 } = FlexibleItemType::parse(input, WhereClauseLocation::BeforeEq)?; in parse_item_type()
1955 Ok(Item::Verbatim(verbatim::between(begin, input))) in parse_item_type()
1973 fn parse(input: ParseStream) -> Result<Self> { in parse()
1974 let attrs = input.call(Attribute::parse_outer)?; in parse()
1975 let vis = input.parse::<Visibility>()?; in parse()
1976 let struct_token = input.parse::<Token![struct]>()?; in parse()
1977 let ident = input.parse::<Ident>()?; in parse()
1978 let generics = input.parse::<Generics>()?; in parse()
1979 let (where_clause, fields, semi_token) = derive::parsing::data_struct(input)?; in parse()
1997 fn parse(input: ParseStream) -> Result<Self> { in parse()
1998 let attrs = input.call(Attribute::parse_outer)?; in parse()
1999 let vis = input.parse::<Visibility>()?; in parse()
2000 let enum_token = input.parse::<Token![enum]>()?; in parse()
2001 let ident = input.parse::<Ident>()?; in parse()
2002 let generics = input.parse::<Generics>()?; in parse()
2003 let (where_clause, brace_token, variants) = derive::parsing::data_enum(input)?; in parse()
2021 fn parse(input: ParseStream) -> Result<Self> { in parse()
2022 let attrs = input.call(Attribute::parse_outer)?; in parse()
2023 let vis = input.parse::<Visibility>()?; in parse()
2024 let union_token = input.parse::<Token![union]>()?; in parse()
2025 let ident = input.parse::<Ident>()?; in parse()
2026 let generics = input.parse::<Generics>()?; in parse()
2027 let (where_clause, fields) = derive::parsing::data_union(input)?; in parse()
2042 fn parse_trait_or_trait_alias(input: ParseStream) -> Result<Item> { in parse_trait_or_trait_alias()
2043 let (attrs, vis, trait_token, ident, generics) = parse_start_of_trait_alias(input)?; in parse_trait_or_trait_alias()
2044 let lookahead = input.lookahead1(); in parse_trait_or_trait_alias()
2052 input, in parse_trait_or_trait_alias()
2063 parse_rest_of_trait_alias(input, attrs, vis, trait_token, ident, generics) in parse_trait_or_trait_alias()
2072 fn parse(input: ParseStream) -> Result<Self> { in parse()
2073 let outer_attrs = input.call(Attribute::parse_outer)?; in parse()
2074 let vis: Visibility = input.parse()?; in parse()
2075 let unsafety: Option<Token![unsafe]> = input.parse()?; in parse()
2076 let auto_token: Option<Token![auto]> = input.parse()?; in parse()
2077 let trait_token: Token![trait] = input.parse()?; in parse()
2078 let ident: Ident = input.parse()?; in parse()
2079 let generics: Generics = input.parse()?; in parse()
2081 input, in parse()
2094 input: ParseStream, in parse_rest_of_trait()
2103 let colon_token: Option<Token![:]> = input.parse()?; in parse_rest_of_trait()
2108 if input.peek(Token![where]) || input.peek(token::Brace) { in parse_rest_of_trait()
2111 supertraits.push_value(input.parse()?); in parse_rest_of_trait()
2112 if input.peek(Token![where]) || input.peek(token::Brace) { in parse_rest_of_trait()
2115 supertraits.push_punct(input.parse()?); in parse_rest_of_trait()
2119 generics.where_clause = input.parse()?; in parse_rest_of_trait()
2122 let brace_token = braced!(content in input); in parse_rest_of_trait()
2146 fn parse(input: ParseStream) -> Result<Self> { in parse()
2147 let (attrs, vis, trait_token, ident, generics) = parse_start_of_trait_alias(input)?; in parse()
2148 parse_rest_of_trait_alias(input, attrs, vis, trait_token, ident, generics) in parse()
2153 input: ParseStream, in parse_start_of_trait_alias()
2155 let attrs = input.call(Attribute::parse_outer)?; in parse_start_of_trait_alias()
2156 let vis: Visibility = input.parse()?; in parse_start_of_trait_alias()
2157 let trait_token: Token![trait] = input.parse()?; in parse_start_of_trait_alias()
2158 let ident: Ident = input.parse()?; in parse_start_of_trait_alias()
2159 let generics: Generics = input.parse()?; in parse_start_of_trait_alias()
2164 input: ParseStream, in parse_rest_of_trait_alias()
2171 let eq_token: Token![=] = input.parse()?; in parse_rest_of_trait_alias()
2175 if input.peek(Token![where]) || input.peek(Token![;]) { in parse_rest_of_trait_alias()
2178 bounds.push_value(input.parse()?); in parse_rest_of_trait_alias()
2179 if input.peek(Token![where]) || input.peek(Token![;]) { in parse_rest_of_trait_alias()
2182 bounds.push_punct(input.parse()?); in parse_rest_of_trait_alias()
2185 generics.where_clause = input.parse()?; in parse_rest_of_trait_alias()
2186 let semi_token: Token![;] = input.parse()?; in parse_rest_of_trait_alias()
2202 fn parse(input: ParseStream) -> Result<Self> { in parse()
2203 let begin = input.fork(); in parse()
2204 let mut attrs = input.call(Attribute::parse_outer)?; in parse()
2205 let vis: Visibility = input.parse()?; in parse()
2206 let defaultness: Option<Token![default]> = input.parse()?; in parse()
2207 let ahead = input.fork(); in parse()
2211 input.parse().map(TraitItem::Method) in parse()
2216 input.parse().map(TraitItem::Const) in parse()
2222 input.parse().map(TraitItem::Method) in parse()
2227 parse_trait_item_type(begin.fork(), input) in parse()
2234 input.parse().map(TraitItem::Macro) in parse()
2241 _ => return Ok(TraitItem::Verbatim(verbatim::between(begin, input))), in parse()
2262 fn parse(input: ParseStream) -> Result<Self> { in parse()
2264 attrs: input.call(Attribute::parse_outer)?, in parse()
2265 const_token: input.parse()?, in parse()
2267 let lookahead = input.lookahead1(); in parse()
2269 input.call(Ident::parse_any)? in parse()
2274 colon_token: input.parse()?, in parse()
2275 ty: input.parse()?, in parse()
2277 if input.peek(Token![=]) { in parse()
2278 let eq_token: Token![=] = input.parse()?; in parse()
2279 let default: Expr = input.parse()?; in parse()
2285 semi_token: input.parse()?, in parse()
2292 fn parse(input: ParseStream) -> Result<Self> { in parse()
2293 let mut attrs = input.call(Attribute::parse_outer)?; in parse()
2294 let sig: Signature = input.parse()?; in parse()
2296 let lookahead = input.lookahead1(); in parse()
2299 let brace_token = braced!(content in input); in parse()
2304 let semi_token: Token![;] = input.parse()?; in parse()
2321 fn parse(input: ParseStream) -> Result<Self> { in parse()
2322 let attrs = input.call(Attribute::parse_outer)?; in parse()
2323 let type_token: Token![type] = input.parse()?; in parse()
2324 let ident: Ident = input.parse()?; in parse()
2325 let mut generics: Generics = input.parse()?; in parse()
2326 let colon_token: Option<Token![:]> = input.parse()?; in parse()
2330 while !input.peek(Token![where]) && !input.peek(Token![=]) && !input.peek(Token![;]) in parse()
2333 bounds.push_punct(input.parse()?); in parse()
2335 bounds.push_value(input.parse()?); in parse()
2339 let default = if input.peek(Token![=]) { in parse()
2340 let eq_token: Token![=] = input.parse()?; in parse()
2341 let default: Type = input.parse()?; in parse()
2347 generics.where_clause = input.parse()?; in parse()
2348 let semi_token: Token![;] = input.parse()?; in parse()
2363 fn parse_trait_item_type(begin: ParseBuffer, input: ParseStream) -> Result<TraitItem> { in parse_trait_item_type()
2374 } = FlexibleItemType::parse(input, WhereClauseLocation::Both)?; in parse_trait_item_type()
2377 Ok(TraitItem::Verbatim(verbatim::between(begin, input))) in parse_trait_item_type()
2394 fn parse(input: ParseStream) -> Result<Self> { in parse()
2395 let attrs = input.call(Attribute::parse_outer)?; in parse()
2396 let mac: Macro = input.parse()?; in parse()
2400 Some(input.parse()?) in parse()
2412 fn parse(input: ParseStream) -> Result<Self> { in parse()
2414 parse_impl(input, allow_verbatim_impl).map(Option::unwrap) in parse()
2418 fn parse_impl(input: ParseStream, allow_verbatim_impl: bool) -> Result<Option<ItemImpl>> { in parse_impl()
2419 let mut attrs = input.call(Attribute::parse_outer)?; in parse_impl()
2420 let has_visibility = allow_verbatim_impl && input.parse::<Visibility>()?.is_some(); in parse_impl()
2421 let defaultness: Option<Token![default]> = input.parse()?; in parse_impl()
2422 let unsafety: Option<Token![unsafe]> = input.parse()?; in parse_impl()
2423 let impl_token: Token![impl] = input.parse()?; in parse_impl()
2425 let has_generics = input.peek(Token![<]) in parse_impl()
2426 && (input.peek2(Token![>]) in parse_impl()
2427 || input.peek2(Token![#]) in parse_impl()
2428 || (input.peek2(Ident) || input.peek2(Lifetime)) in parse_impl()
2429 && (input.peek3(Token![:]) in parse_impl()
2430 || input.peek3(Token![,]) in parse_impl()
2431 || input.peek3(Token![>]) in parse_impl()
2432 || input.peek3(Token![=])) in parse_impl()
2433 || input.peek2(Token![const])); in parse_impl()
2435 input.parse()? in parse_impl()
2441 && (input.peek(Token![const]) || input.peek(Token![?]) && input.peek2(Token![const])); in parse_impl()
2443 input.parse::<Option<Token![?]>>()?; in parse_impl()
2444 input.parse::<Token![const]>()?; in parse_impl()
2447 let begin = input.fork(); in parse_impl()
2448 let polarity = if input.peek(Token![!]) && !input.peek2(token::Brace) { in parse_impl()
2449 Some(input.parse::<Token![!]>()?) in parse_impl()
2455 let first_ty_span = input.span(); in parse_impl()
2456 let mut first_ty: Type = input.parse()?; in parse_impl()
2460 let is_impl_for = input.peek(Token![for]); in parse_impl()
2462 let for_token: Token![for] = input.parse()?; in parse_impl()
2484 self_ty = input.parse()?; in parse_impl()
2490 Type::Verbatim(verbatim::between(begin, input)) in parse_impl()
2494 generics.where_clause = input.parse()?; in parse_impl()
2497 let brace_token = braced!(content in input); in parse_impl()
2524 fn parse(input: ParseStream) -> Result<Self> { in parse()
2525 let begin = input.fork(); in parse()
2526 let mut attrs = input.call(Attribute::parse_outer)?; in parse()
2527 let ahead = input.fork(); in parse()
2540 input.parse().map(ImplItem::Method) in parse()
2545 input.advance_to(&ahead); in parse()
2546 let ident: Ident = input.call(Ident::parse_any)?; in parse()
2547 let colon_token: Token![:] = input.parse()?; in parse()
2548 let ty: Type = input.parse()?; in parse()
2549 if let Some(eq_token) = input.parse()? { in parse()
2559 expr: input.parse()?, in parse()
2560 semi_token: input.parse()?, in parse()
2563 input.parse::<Token![;]>()?; in parse()
2564 return Ok(ImplItem::Verbatim(verbatim::between(begin, input))); in parse()
2570 parse_impl_item_type(begin, input) in parse()
2579 input.parse().map(ImplItem::Macro) in parse()
2605 fn parse(input: ParseStream) -> Result<Self> { in parse()
2607 attrs: input.call(Attribute::parse_outer)?, in parse()
2608 vis: input.parse()?, in parse()
2609 defaultness: input.parse()?, in parse()
2610 const_token: input.parse()?, in parse()
2612 let lookahead = input.lookahead1(); in parse()
2614 input.call(Ident::parse_any)? in parse()
2619 colon_token: input.parse()?, in parse()
2620 ty: input.parse()?, in parse()
2621 eq_token: input.parse()?, in parse()
2622 expr: input.parse()?, in parse()
2623 semi_token: input.parse()?, in parse()
2630 fn parse(input: ParseStream) -> Result<Self> { in parse()
2631 let mut attrs = input.call(Attribute::parse_outer)?; in parse()
2632 let vis: Visibility = input.parse()?; in parse()
2633 let defaultness: Option<Token![default]> = input.parse()?; in parse()
2634 let sig: Signature = input.parse()?; in parse()
2636 let block = if let Some(semi) = input.parse::<Option<Token![;]>>()? { in parse()
2650 let brace_token = braced!(content in input); in parse()
2670 fn parse(input: ParseStream) -> Result<Self> { in parse()
2671 let attrs = input.call(Attribute::parse_outer)?; in parse()
2672 let vis: Visibility = input.parse()?; in parse()
2673 let defaultness: Option<Token![default]> = input.parse()?; in parse()
2674 let type_token: Token![type] = input.parse()?; in parse()
2675 let ident: Ident = input.parse()?; in parse()
2676 let mut generics: Generics = input.parse()?; in parse()
2677 let eq_token: Token![=] = input.parse()?; in parse()
2678 let ty: Type = input.parse()?; in parse()
2679 generics.where_clause = input.parse()?; in parse()
2680 let semi_token: Token![;] = input.parse()?; in parse()
2695 fn parse_impl_item_type(begin: ParseBuffer, input: ParseStream) -> Result<ImplItem> { in parse_impl_item_type()
2706 } = FlexibleItemType::parse(input, WhereClauseLocation::Both)?; in parse_impl_item_type()
2709 Ok(ImplItem::Verbatim(verbatim::between(begin, input))) in parse_impl_item_type()
2728 fn parse(input: ParseStream) -> Result<Self> { in parse()
2729 let attrs = input.call(Attribute::parse_outer)?; in parse()
2730 let mac: Macro = input.parse()?; in parse()
2734 Some(input.parse()?) in parse()