aboutsummaryrefslogtreecommitdiff
path: root/macros/src/declare_interface_args.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-11-06 17:20:45 +0100
committerHampusM <hampus@hampusmat.com>2022-11-06 17:20:45 +0100
commite282375de4ba75c69f7d619fc33c6250f6caba18 (patch)
treef09410f57ea154c834dba88d76510e2a27548956 /macros/src/declare_interface_args.rs
parent2c03974a7e7cfec8d734caa6036d9a2461694818 (diff)
fix: allow declaring a concrete type as it's own interface
Diffstat (limited to 'macros/src/declare_interface_args.rs')
-rw-r--r--macros/src/declare_interface_args.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/macros/src/declare_interface_args.rs b/macros/src/declare_interface_args.rs
index bd2f24e..1641e38 100644
--- a/macros/src/declare_interface_args.rs
+++ b/macros/src/declare_interface_args.rs
@@ -1,6 +1,6 @@
use syn::parse::{Parse, ParseStream, Result};
use syn::punctuated::Punctuated;
-use syn::{Path, Token, Type};
+use syn::{Token, TypePath};
use crate::macro_flag::MacroFlag;
use crate::util::iterator_ext::IteratorExt;
@@ -9,8 +9,8 @@ pub const DECLARE_INTERFACE_FLAGS: &[&str] = &["async"];
pub struct DeclareInterfaceArgs
{
- pub implementation: Type,
- pub interface: Path,
+ pub implementation: TypePath,
+ pub interface: TypePath,
pub flags: Punctuated<MacroFlag, Token![,]>,
}
@@ -18,11 +18,11 @@ impl Parse for DeclareInterfaceArgs
{
fn parse(input: ParseStream) -> Result<Self>
{
- let implementation: Type = input.parse()?;
+ let implementation: TypePath = input.parse()?;
input.parse::<Token![->]>()?;
- let interface: Path = input.parse()?;
+ let interface: TypePath = input.parse()?;
let flags = if input.peek(Token![,]) {
input.parse::<Token![,]>()?;