Skip to content

Commit 25406d5

Browse files
Fix rustdoc tests on Windows
1 parent 41d815e commit 25406d5

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

src/test/rustdoc/auxiliary/issue-15318.rs

+25
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,31 @@
44
#![feature(lang_items)]
55
#![no_std]
66

7+
#[cfg(windows)]
8+
#[link(name = "vcruntime")]
9+
extern {}
10+
11+
#[cfg(windows)]
12+
#[link(name = "ucrt")]
13+
extern {}
14+
15+
#[cfg(windows)]
16+
#[no_mangle]
17+
#[used]
18+
static _fltused: i32 = 0;
19+
#[cfg(windows)]
20+
#[no_mangle]
21+
#[used]
22+
static __aullrem: i32 = 0;
23+
#[cfg(windows)]
24+
#[no_mangle]
25+
#[used]
26+
static __aulldiv: i32 = 0;
27+
28+
#[cfg(windows)]
29+
#[no_mangle]
30+
extern "system" fn _DllMainCRTStartup(_: *const u8, _: u32, _: *const u8) -> u32 { 1 }
31+
732
#[lang = "eh_personality"]
833
fn foo() {}
934

src/test/rustdoc/auxiliary/primitive-doc.rs

+9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
// compile-flags: --crate-type lib --edition 2018
22
#![no_core]
33
#![feature(no_core)]
4+
#![feature(lang_items)]
5+
6+
#[cfg(windows)]
7+
#[no_mangle]
8+
extern "system" fn _DllMainCRTStartup(_: *const u8, _: u32, _: *const u8) -> u32 { 1 }
9+
10+
#[cfg(windows)]
11+
#[lang = "sized"]
12+
trait Sized {}
413

514
#[doc(primitive = "usize")]
615
/// This is the built-in type `usize`.

0 commit comments

Comments
 (0)