Skip to content

Commit

Permalink
Add regression test for unsafe mods
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay authored and calebcartwright committed Sep 23, 2020
1 parent 1972375 commit 2927e89
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/source/unsafe-mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// These are supported by rustc syntactically but not semantically.

#[cfg(any())]
unsafe mod m { }

#[cfg(any())]
unsafe extern "C++" { }
7 changes: 7 additions & 0 deletions tests/target/unsafe-mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// These are supported by rustc syntactically but not semantically.

#[cfg(any())]
unsafe mod m {}

#[cfg(any())]
unsafe extern "C++" {}

0 comments on commit 2927e89

Please sign in to comment.