Test define opaques in extern items

This commit is contained in:
Michael Goulet 2025-03-24 23:19:33 +00:00
parent f8df298d74
commit 0827f76586
3 changed files with 34 additions and 1 deletions

View file

@ -52,7 +52,10 @@ pub(crate) fn expand(
.collect(),
);
} else {
ecx.dcx().span_err(meta_item.span, "only functions and methods can define opaque types");
ecx.dcx().span_err(
meta_item.span,
"only functions, statics, and consts can define opaque types",
);
}
vec![item]