Skip to content

Commit e4d8b21

Browse files
committed
Remove check for no-longer-supported attribute syntax.
1 parent 911162c commit e4d8b21

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

macros/src/lib.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ mod run;
1818
fn python_impl(input: TokenStream) -> Result<TokenStream, TokenStream> {
1919
let tokens = input.clone();
2020

21-
check_no_attribute(input.clone())?;
22-
2321
let filename = Span::call_site().file();
2422

2523
let mut x = EmbedPython::new();
@@ -90,22 +88,6 @@ fn ct_python_impl(input: TokenStream) -> Result<TokenStream, TokenStream> {
9088
})
9189
}
9290

93-
fn check_no_attribute(input: TokenStream) -> Result<(), TokenStream> {
94-
let mut input = input.into_iter();
95-
if let Some(token) = input.next() {
96-
if token.to_string() == "#"
97-
&& input.next().map_or(false, |t| t.to_string() == "!")
98-
&& input.next().map_or(false, |t| t.to_string().starts_with('['))
99-
{
100-
return Err(quote!(compile_error! {
101-
"Attributes in python!{} are no longer supported. \
102-
Use context.run(python!{..}) to use a context.",
103-
}));
104-
}
105-
}
106-
Ok(())
107-
}
108-
10991
#[doc(hidden)]
11092
#[proc_macro]
11193
pub fn python(input: TokenStream1) -> TokenStream1 {

0 commit comments

Comments
 (0)