|
1 | | -#![expect( |
2 | | - mismatched_lifetime_syntaxes, |
3 | | - reason = "I can't figure out how to fix this." |
4 | | -)] |
5 | 1 | use crate::func::args::{Arg, ArgError}; |
6 | 2 | use crate::{Reflect, TypePath}; |
7 | 3 |
|
@@ -33,21 +29,21 @@ pub trait FromArg { |
33 | 29 | /// Creates an item from an argument. |
34 | 30 | /// |
35 | 31 | /// The argument must be of the expected type and ownership. |
36 | | - fn from_arg(arg: Arg) -> Result<Self::This<'_>, ArgError>; |
| 32 | + fn from_arg(arg: Arg<'_>) -> Result<Self::This<'_>, ArgError>; |
37 | 33 | } |
38 | 34 |
|
39 | 35 | // Blanket impl. |
40 | 36 | impl<T: Reflect + TypePath> FromArg for &'static T { |
41 | 37 | type This<'a> = &'a T; |
42 | | - fn from_arg(arg: Arg) -> Result<Self::This<'_>, ArgError> { |
| 38 | + fn from_arg(arg: Arg<'_>) -> Result<Self::This<'_>, ArgError> { |
43 | 39 | arg.take_ref() |
44 | 40 | } |
45 | 41 | } |
46 | 42 |
|
47 | 43 | // Blanket impl. |
48 | 44 | impl<T: Reflect + TypePath> FromArg for &'static mut T { |
49 | 45 | type This<'a> = &'a mut T; |
50 | | - fn from_arg(arg: Arg) -> Result<Self::This<'_>, ArgError> { |
| 46 | + fn from_arg(arg: Arg<'_>) -> Result<Self::This<'_>, ArgError> { |
51 | 47 | arg.take_mut() |
52 | 48 | } |
53 | 49 | } |
@@ -85,7 +81,7 @@ macro_rules! impl_from_arg { |
85 | 81 | mismatched_lifetime_syntaxes, |
86 | 82 | reason = "I can't figure out how to fix this." |
87 | 83 | )] |
88 | | - fn from_arg(arg: $crate::func::args::Arg) -> |
| 84 | + fn from_arg(arg: $crate::func::args::Arg<'_>) -> |
89 | 85 | Result<Self::This<'_>, $crate::func::args::ArgError> |
90 | 86 | { |
91 | 87 | arg.take_owned() |
|
0 commit comments