mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-19 18:34:08 +00:00
it is also legal to call unsafe functions from other unsafe functions
This commit is contained in:
parent
046ca827dd
commit
d207bc3a0b
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…
Reference in New Issue
Block a user