Test define opaques in extern items
This commit is contained in:
parent
f8df298d74
commit
0827f76586
3 changed files with 34 additions and 1 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue