Skip to content

Commit 39808ba

Browse files
committed
DO NOT MERGE
1 parent 3df1b7b commit 39808ba

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

hermit-macro/src/system.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,6 @@ fn parse_attr(attr: Option<Ident>) -> Result<bool> {
1515
bail!(label, "#[system] can only contain \"errno\" or nothing");
1616
}
1717

18-
fn validate_vis(vis: &Visibility) -> Result<()> {
19-
if !matches!(vis, Visibility::Public(_)) {
20-
bail!(vis, "#[system] functions must be public");
21-
}
22-
23-
Ok(())
24-
}
25-
2618
struct ParsedSig {
2719
args: Vec<Ident>,
2820
}
@@ -199,7 +191,6 @@ fn emit_func(func: ItemFn, sig: &ParsedSig, errno: bool) -> Result<ItemFn> {
199191

200192
pub fn system_attribute(attr: Option<Ident>, func: ItemFn) -> Result<Item> {
201193
let errno = parse_attr(attr)?;
202-
validate_vis(&func.vis)?;
203194
let sig = parse_sig(&func.sig)?;
204195
validate_attrs(&func.attrs)?;
205196
let func = emit_func(func, &sig, errno)?;

0 commit comments

Comments
 (0)