Skip to content

Instantly share code, notes, and snippets.

@CarlKCarlK
Created October 19, 2022 21:16
Show Gist options
  • Save CarlKCarlK/0edb596a76330c31f7b520da60ae30f4 to your computer and use it in GitHub Desktop.
Save CarlKCarlK/0edb596a76330c31f7b520da60ae30f4 to your computer and use it in GitHub Desktop.
#[test]
#[should_panic(
expected = "proc-macro-error API cannot be used outside of `entry_point` invocation, perhaps you forgot to annotate your #[proc_macro] function with `#[proc_macro_error]"
)]
fn one_bad_input_3() {
let before = quote! {
pub fn any_str_len(s: AnyIter(AnyString)) {
s.len()
}
};
let _after = anyinput_core(quote!(), before);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment