aboutsummaryrefslogtreecommitdiff
path: root/mingling_macros/src/res_injection.rs
diff options
context:
space:
mode:
Diffstat (limited to 'mingling_macros/src/res_injection.rs')
-rw-r--r--mingling_macros/src/res_injection.rs16
1 files changed, 1 insertions, 15 deletions
diff --git a/mingling_macros/src/res_injection.rs b/mingling_macros/src/res_injection.rs
index f2280e3..4f0be88 100644
--- a/mingling_macros/src/res_injection.rs
+++ b/mingling_macros/src/res_injection.rs
@@ -30,21 +30,7 @@ pub(crate) fn extract_args_info(
FnArg::Typed(PatType { pat, ty, .. }) => {
let param_pat = (**pat).clone();
match &**ty {
- Type::Path(type_path) => {
- // Check that the type is a single-segment type (no `::`)
- if type_path.path.segments.len() > 1 {
- return Err(syn::Error::new(
- type_path.span(),
- format!(
- "The type `{}` must be a simple single-segment type, \
- e.g. `Empty` instead of `other::Empty`. \
- Qualified paths with `::` are not allowed here.",
- quote! { #type_path }
- ),
- ));
- }
- (param_pat, type_path.clone())
- }
+ Type::Path(type_path) => (param_pat, type_path.clone()),
Type::Reference(_) => {
return Err(syn::Error::new(
ty.span(),