• Home
  • Raw
  • Download

Lines Matching full:quote

13 use quote::{ToTokens, format_ident, quote};
85 if let Ok(newty) = parse2::<Type>(quote!(&(dyn #tpb))) { in concretize_args()
87 let subst_ty: Type = parse2(quote!(#ident)).unwrap(); in concretize_args()
91 let subst_ty: Type = parse2(quote!(&#ident)).unwrap(); in concretize_args()
98 if let Ok(newty) = parse2::<Type>(quote!(&mut (dyn #tpb))) { in concretize_args()
100 let subst_ty: Type = parse2(quote!(&mut #ident)).unwrap(); in concretize_args()
109 if let Ok(newty) = parse2::<Type>(quote!(&[&(dyn #tpb)])) { in concretize_args()
110 let subst_ty: Type = parse2(quote!(&[#ident])).unwrap(); in concretize_args()
129 if let Ok(ident) = parse2::<Ident>(quote!(#bounded_ty)) { in concretize_args()
183 Some(quote!( in concretize_args()
189 Some(quote!(#pat)) in concretize_args()
192 Some(quote!(&#pat)) in concretize_args()
195 Some(quote!(#pat)) in concretize_args()
286 let newty: Type = parse2(quote!(Box<dyn #tb>)).unwrap(); in declosurefy()
287 let subst_ty: Type = parse2(quote!(#ident)).unwrap(); in declosurefy()
306 if let Ok(ident) = parse2::<Ident>(quote!(#bounded_ty)) { in declosurefy()
319 let ty: Type = parse2(quote!(#ident)).unwrap(); in declosurefy()
337 if let Ok(ident) = parse2::<Ident>(quote!(#bounded_ty)) { in declosurefy()
395 Some(quote!(Box::new(#pat))) in declosurefy()
397 Some(quote!(#pat)) in declosurefy()
427 *ty = parse2(quote!(::std::pin::Pin<Box<dyn #bounds>>)).unwrap(); in deimplify()
429 *ty = parse2(quote!(Box<dyn #bounds>)).unwrap(); in deimplify()
441 pt.bounded_ty != parse2(quote!(Self)).unwrap() in dewhereselfify()
956 0 => quote!(<()>), in gen_keyid()
959 quote!(#tg) in gen_keyid()
968 quote!(<(#tps)>) in gen_keyid()
1351 assert_not_contains(&output, quote!(pub fn foo)); in inherent_method_visibility()
1353 assert_contains(&output, quote!(pub fn bar)); in inherent_method_visibility()
1354 assert_contains(&output, quote!(pub(crate) fn baz)); in inherent_method_visibility()
1355 assert_contains(&output, quote!(pub(super) fn bean)); in inherent_method_visibility()
1356 assert_contains(&output, quote!(pub(in crate::outer) fn boom)); in inherent_method_visibility()
1358 assert_not_contains(&output, quote!(pub fn expect_foo)); in inherent_method_visibility()
1361 assert_contains(&output, quote!(pub fn expect_bar)); in inherent_method_visibility()
1362 assert_contains(&output, quote!(pub(crate) fn expect_baz)); in inherent_method_visibility()
1363 assert_contains(&output, quote!(pub(super) fn expect_bean)); in inherent_method_visibility()
1364 assert_contains(&output, quote!(pub(in crate::outer) fn expect_boom)); in inherent_method_visibility()
1380 assert_contains(&output, quote!(impl Bar for MockFoo<u32>)); in specific_impl()
1381 assert_contains(&output, quote!(impl Bar for MockFoo<i32>)); in specific_impl()
1383 assert_not_contains(&output, quote!( in specific_impl()
1388 assert_contains(&output, quote!( in specific_impl()
1391 assert_contains(&output, quote!( in specific_impl()
1415 assert_contains(&output, quote!(#[doc=" Function docs"] pub fn bar)); in doc_comments()
1431 assert_not_contains(&output, quote!(pub fn foo)); in method_visibility()
1433 assert_not_contains(&output, quote!(pub fn expect_foo)); in method_visibility()
1435 assert_contains(&output, quote!(pub fn bar)); in method_visibility()
1436 assert_contains(&output, quote!(pub fn expect_bar)); in method_visibility()
1437 assert_contains(&output, quote!(pub(super) fn baz)); in method_visibility()
1438 assert_contains(&output, quote!(pub(super) fn expect_baz)); in method_visibility()
1439 assert_contains(&output, quote!(pub ( crate ) fn bang)); in method_visibility()
1440 assert_contains(&output, quote!(pub ( crate ) fn expect_bang)); in method_visibility()
1441 assert_contains(&output, quote!(pub ( in super :: x ) fn bean)); in method_visibility()
1442 assert_contains(&output, quote!(pub ( in super :: x ) fn expect_bean)); in method_visibility()
1462 assert_contains(&output, quote!(pub ( super ) struct MockFoo)); in trait_visibility()
1483 assert_eq!(quote!(#actual).to_string(), quote!(#exp).to_string()); in check_concretize()
1488 assert_eq!(quote!(#actual).to_string(), quote!(#exp).to_string()); in check_concretize()
1495 quote!(fn foo<P: AsRef<Path>>(x: i32, p: P, y: &f64)), in bystanders()
1496 &[quote!(x: i32), quote!(p: &(dyn AsRef<Path>)), quote!(y: &f64)], in bystanders()
1497 &[quote!(x), quote!(&p), quote!(y)] in bystanders()
1504 quote!(fn foo<P: AsRef<String> + AsMut<String>>(p: P)), in multi_bounds()
1505 &[quote!(p: &(dyn AsRef<String> + AsMut<String>))], in multi_bounds()
1506 &[quote!(&p)] in multi_bounds()
1513 quote!(fn foo<P: AsMut<Path>>(p: &mut P)), in mutable_reference_arg()
1514 &[quote!(p: &mut (dyn AsMut<Path>))], in mutable_reference_arg()
1515 &[quote!(p)] in mutable_reference_arg()
1522 quote!(fn foo<P: AsRef<String> + AsMut<String>>(p: &mut P)), in mutable_reference_multi_bounds()
1523 &[quote!(p: &mut (dyn AsRef<String> + AsMut<String>))], in mutable_reference_multi_bounds()
1524 &[quote!(p)] in mutable_reference_multi_bounds()
1531 quote!(fn foo<P: AsRef<Path>>(p: &P)), in reference_arg()
1532 &[quote!(p: &(dyn AsRef<Path>))], in reference_arg()
1533 &[quote!(p)] in reference_arg()
1540 quote!(fn foo<P: AsRef<Path>>(p: P)), in simple()
1541 &[quote!(p: &(dyn AsRef<Path>))], in simple()
1542 &[quote!(&p)] in simple()
1549 quote!(fn foo<P: AsRef<Path>>(p: &[P])), in slice()
1550 &[quote!(p: &[&(dyn AsRef<Path>)])], in slice()
1551 …&[quote!(&(0..p.len()).map(|__mockall_i| &p[__mockall_i] as &(dyn AsRef<Path>)).collect::<Vec<_>>(… in slice()
1558 quote!(fn foo<P: AsRef<Path> + AsMut<String>>(p: &[P])), in slice_with_multi_bounds()
1559 &[quote!(p: &[&(dyn AsRef<Path> + AsMut<String>)])], in slice_with_multi_bounds()
1560 …&[quote!(&(0..p.len()).map(|__mockall_i| &p[__mockall_i] as &(dyn AsRef<Path> + AsMut<String>)).co… in slice_with_multi_bounds()
1567 quote!(fn foo<P>(p: P) where P: AsRef<Path>), in where_clause()
1568 &[quote!(p: &(dyn AsRef<Path>))], in where_clause()
1569 &[quote!(&p)] in where_clause()
1581 assert_eq!(quote!(#orig).to_string(), quote!(#expected).to_string()); in check_deimplify()
1588 quote!(-> impl Future<Output=i32>), in impl_future()
1589 quote!(-> ::std::pin::Pin<Box<dyn Future<Output=i32>>>) in impl_future()
1597 quote!(-> impl Send + Future<Output=i32>), in impl_future_reverse()
1598 quote!(-> ::std::pin::Pin<Box<dyn Send + Future<Output=i32>>>) in impl_future_reverse()
1606 quote!(-> impl Stream<Item=i32>), in impl_stream()
1607 quote!(-> ::std::pin::Pin<Box<dyn Stream<Item=i32>>>) in impl_stream()
1614 quote!(-> impl Foo), in impl_trait()
1615 quote!(-> Box<dyn Foo>) in impl_trait()
1623 quote!(-> impl Foo + Send), in impl_trait2()
1624 quote!(-> Box<dyn Foo + Send>) in impl_trait2()
1643 assert_eq!(quote!(#ty).to_string(), in check_deselfify()
1644 quote!(#expected).to_string()); in check_deselfify()
1650 quote!(Arc<Self>), in arc()
1651 quote!(Foo), in arc()
1652 quote!(), in arc()
1653 quote!(Arc<Foo>) in arc()
1659 quote!(Box<dyn Future<Output=Self>>), in future()
1660 quote!(Foo), in future()
1661 quote!(), in future()
1662 quote!(Box<dyn Future<Output=Foo>>) in future()
1669 quote!(<Self as Self>::Self), in qself()
1670 quote!(Foo), in qself()
1671 quote!(), in qself()
1672 quote!(<Foo as Foo>::Foo) in qself()
1679 quote!(Box<dyn Self>), in trait_object()
1680 quote!(Foo), in trait_object()
1681 quote!(), in trait_object()
1682 quote!(Box<dyn Foo>) in trait_object()
1690 quote!(Box<dyn Self + Send>), in trait_object2()
1691 quote!(Foo), in trait_object2()
1692 quote!(), in trait_object2()
1693 quote!(Box<dyn Foo + Send>) in trait_object2()
1703 let mut meth: ImplItemFn = parse2(quote!( in lifetime()
1706 let expected: ImplItemFn = parse2(quote!( in lifetime()
1715 let mut meth: ImplItemFn = parse2(quote!( in normal_method()
1718 let expected: ImplItemFn = parse2(quote!( in normal_method()
1727 let mut meth: ImplItemFn = parse2(quote!( in with_real_generics()
1730 let expected: ImplItemFn = parse2(quote!( in with_real_generics()
1744 assert_eq!(quote!(#keyid).to_string(), quote!(#expected).to_string()); in check_gen_keyid()
1749 check_gen_keyid(quote!(), quote!(<()>)); in empty()
1754 check_gen_keyid(quote!(<T>), quote!(<T>)); in onetype()
1759 check_gen_keyid(quote!(<T, V>), quote!(<(T, V)>)); in twotypes()
1768 let mut g1: Generics = parse2(quote!(<T: 'static, V: Copy> )).unwrap(); in both()
1769 let wc1: WhereClause = parse2(quote!(where T: Default)).unwrap(); in both()
1772 let mut g2: Generics = parse2(quote!(<Q: Send, V: Clone>)).unwrap(); in both()
1773 let wc2: WhereClause = parse2(quote!(where T: Sync, Q: Debug)).unwrap(); in both()
1779 let ge: Generics = parse2(quote!( in both()
1782 let wce: WhereClause = parse2(quote!( in both()
1786 assert_eq!(quote!(#ge #wce).to_string(), in both()
1787 quote!(#gm #gm_wc).to_string()); in both()
1792 let mut g1: Generics = parse2(quote!(<T: 'static, V: Copy> )).unwrap(); in eq()
1793 let wc1: WhereClause = parse2(quote!(where T: Default)).unwrap(); in eq()
1799 assert_eq!(quote!(#g1 #wc1).to_string(), in eq()
1800 quote!(#gm #gm_wc).to_string()); in eq()
1805 let mut g1: Generics = parse2(quote!(<T: 'static, V: Copy> )).unwrap(); in lhs_only()
1806 let wc1: WhereClause = parse2(quote!(where T: Default)).unwrap(); in lhs_only()
1814 assert_eq!(quote!(#g1 #wc1).to_string(), in lhs_only()
1815 quote!(#gm #gm_wc).to_string()); in lhs_only()
1821 let wc1: WhereClause = parse2(quote!(where T: Default)).unwrap(); in lhs_wc_only()
1829 assert_eq!(quote!(#g1 #wc1).to_string(), in lhs_wc_only()
1830 quote!(#gm #gm_wc).to_string()); in lhs_wc_only()
1836 let mut g2: Generics = parse2(quote!(<Q: Send, V: Clone>)).unwrap(); in rhs_only()
1837 let wc2: WhereClause = parse2(quote!(where T: Sync, Q: Debug)).unwrap(); in rhs_only()
1843 assert_eq!(quote!(#g2 #wc2).to_string(), in rhs_only()
1844 quote!(#gm #gm_wc).to_string()); in rhs_only()
1855 assert_eq!(quote!(#output).to_string(), in check_supersuperfy()
1856 quote!(#expected_ty).to_string()); in check_supersuperfy()
1862 quote!([super::X; n]), in array()
1863 quote!([super::super::X; n]) in array()
1870 quote!(fn(super::A) -> super::B), in barefn()
1871 quote!(fn(super::super::A) -> super::super::B) in barefn()
1879 elem: Box::new(parse2(quote!(super::T)).unwrap()) in group()
1883 elem: Box::new(parse2(quote!(super::super::T)).unwrap()) in group()
1886 assert_eq!(quote!(#output).to_string(), in group()
1887 quote!(#expected).to_string()); in group()
1893 check_supersuperfy( quote!(_), quote!(_)); in infer()
1899 check_supersuperfy( quote!(!), quote!(!)); in never()
1905 quote!((super::X)), in paren()
1906 quote!((super::super::X)) in paren()
1913 quote!(::super::SuperT<u32>), in path()
1914 quote!(::super::super::SuperT<u32>) in path()
1921 quote!(<super::X as super::Y>::Foo<u32>), in path_with_qself()
1922 quote!(<super::super::X as super::super::Y>::Foo<u32>), in path_with_qself()
1929 quote!(mod_::T<super::X>), in angle_bracketed_generic_arguments()
1930 quote!(mod_::T<super::super::X>) in angle_bracketed_generic_arguments()
1937 quote!(*const super::X), in ptr()
1938 quote!(*const super::super::X) in ptr()
1945 quote!(&'a mut super::X), in reference()
1946 quote!(&'a mut super::super::X) in reference()
1953 quote!([super::X]), in slice()
1954 quote!([super::super::X]) in slice()
1961 quote!(dyn super::X + super::Y), in trait_object()
1962 quote!(dyn super::super::X + super::super::Y) in trait_object()
1969 quote!((super::A, super::B)), in tuple()
1970 quote!((super::super::A, super::super::B)) in tuple()
1992 assert_eq!(quote!(#o_ig).to_string(), quote!(#e_ig).to_string()); in check_supersuperfy_generics()
1993 assert_eq!(quote!(#o_tg).to_string(), quote!(#e_tg).to_string()); in check_supersuperfy_generics()
1994 assert_eq!(quote!(#o_wc).to_string(), quote!(#e_wc).to_string()); in check_supersuperfy_generics()
2000 quote!(<T: X = super::Y>), quote!(), in default()
2001 quote!(<T: X = super::super::Y>), quote!(), in default()
2007 check_supersuperfy_generics(quote!(), quote!(), quote!(), quote!()); in empty()
2013 quote!(<T: super::A = super::B>), in everything()
2014 quote!(where super::C: super::D), in everything()
2015 quote!(<T: super::super::A = super::super::B>), in everything()
2016 quote!(where super::super::C: super::super::D), in everything()
2023 quote!(<T: super::A>), quote!(), in bound()
2024 quote!(<T: super::super::A>), quote!(), in bound()
2031 quote!(<F: Fn(u32) -> super::SuperT>), quote!(), in closure()
2032 quote!(<F: Fn(u32) -> super::super::SuperT>), quote!(), in closure()
2039 quote!(), quote!(where super::T: X), in wc_bounded_ty()
2040 quote!(), quote!(where super::super::T: X), in wc_bounded_ty()
2047 quote!(), quote!(where T: super::X), in wc_bounds()
2048 quote!(), quote!(where T: super::super::X), in wc_bounds()