diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2020-08-16 21:20:12 +0200 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2020-08-20 15:24:33 +0200 |
| commit | ca9fc101c00e33a0735a3bd2fa44eeeb7841422f (patch) | |
| tree | d09008e0c73f798f98c0bca0838c0e1b04c4ac26 /example | |
| parent | 02b7cdc316b733649635fe7df1051429b0dfe25b (diff) | |
| download | rust-ca9fc101c00e33a0735a3bd2fa44eeeb7841422f.tar.gz rust-ca9fc101c00e33a0735a3bd2fa44eeeb7841422f.zip | |
Fix weak linkage
This removes the last sysroot patch apart from the few patches that disable tests
Diffstat (limited to 'example')
| -rw-r--r-- | example/mini_core_hello_world.rs | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/example/mini_core_hello_world.rs b/example/mini_core_hello_world.rs index 9c2ab5a5165..d79f9f5f79c 100644 --- a/example/mini_core_hello_world.rs +++ b/example/mini_core_hello_world.rs @@ -241,19 +241,22 @@ fn main() { assert_eq!(((|()| 42u8) as fn(()) -> u8)(()), 42); - extern { - #[linkage = "extern_weak"] - static ABC: *const u8; - } - + #[cfg(not(jit))] { extern { #[linkage = "extern_weak"] static ABC: *const u8; } - } - unsafe { assert_eq!(ABC as usize, 0); } + { + extern { + #[linkage = "extern_weak"] + static ABC: *const u8; + } + } + + unsafe { assert_eq!(ABC as usize, 0); } + } &mut (|| Some(0 as *const ())) as &mut dyn FnMut() -> Option<*const ()>; |
