it is also legal to call unsafe functions from other unsafe functions
This commit is contained in:
parent
046ca827dd
commit
d207bc3a0b
1 changed files with 10 additions and 0 deletions
10
src/test/run-pass/unsafe-fn-called-from-unsafe-fn.rs
Normal file
10
src/test/run-pass/unsafe-fn-called-from-unsafe-fn.rs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
// -*- rust -*-
|
||||
//
|
||||
// See also: compile-fail/unsafe-fn-called-from-safe.rs
|
||||
|
||||
unsafe fn f() { ret; }
|
||||
|
||||
unsafe fn g() {
|
||||
f();
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue