mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 16:54:01 +00:00
433da1fc04
They pass fine.
13 lines
263 B
C
13 lines
263 B
C
#ifdef _WIN32
|
|
__declspec(dllexport)
|
|
#endif
|
|
|
|
// An external function, defined in Rust.
|
|
extern void panic_if_greater_than_10(unsigned x);
|
|
|
|
unsigned add_small_numbers(unsigned a, unsigned b) {
|
|
unsigned c = a + b;
|
|
panic_if_greater_than_10(c);
|
|
return c;
|
|
}
|