Require no_check to have an associated annotation

This commit is contained in:
Ayaz Hafiz 2022-12-27 12:50:53 -06:00
parent 09c38798e5
commit 76d4bea0f3
No known key found for this signature in database
GPG Key ID: 0E2A37416A25EF58
2 changed files with 4 additions and 4 deletions

View File

@ -593,7 +593,7 @@ fn record_optional_field_function_use_default() {
"#
}
#[mono_test(no_check)]
#[mono_test(no_check = "https://github.com/roc-lang/roc/issues/4694")]
fn quicksort_help() {
// do we still need with_larger_debug_stack?
r#"

View File

@ -10,9 +10,6 @@ pub fn mono_test(args: TokenStream, item: TokenStream) -> TokenStream {
let mut mode = "exec".to_owned();
for arg in syn::parse_macro_input!(args as syn::AttributeArgs) {
use syn::{Lit, Meta, MetaNameValue, NestedMeta};
if matches!(&arg, NestedMeta::Meta(Meta::Path(p)) if p.is_ident("no_check")) {
no_check = true;
}
if let NestedMeta::Meta(Meta::NameValue(MetaNameValue {
path,
eq_token: _,
@ -22,6 +19,9 @@ pub fn mono_test(args: TokenStream, item: TokenStream) -> TokenStream {
if path.is_ident("mode") {
mode = s.value();
}
if path.is_ident("no_check") {
no_check = true;
}
}
}