rune_macros/path_in.rs
1use syn::parse::{Parse, ParseStream};
2use syn::Token;
3
4pub(super) struct PathIn<T = syn::Path> {
5 pub(super) in_crate: syn::Path,
6 #[allow(unused)]
7 pub(super) comma_token: Token![,],
8 pub(super) item: T,
9}
10
11impl<T> Parse for PathIn<T>
12where
13 T: Parse,
14{
15 #[inline]
16 fn parse(input: ParseStream) -> syn::Result<Self> {
17 Ok(Self {
18 in_crate: input.parse()?,
19 comma_token: input.parse()?,
20 item: input.parse()?,
21 })
22 }
23}