Skip to content

Commit

Permalink
Fix rustdoc tests on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Aug 25, 2021
1 parent 41d815e commit 25406d5
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/test/rustdoc/auxiliary/issue-15318.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,31 @@
#![feature(lang_items)]
#![no_std]

#[cfg(windows)]
#[link(name = "vcruntime")]
extern {}

#[cfg(windows)]
#[link(name = "ucrt")]
extern {}

#[cfg(windows)]
#[no_mangle]
#[used]
static _fltused: i32 = 0;
#[cfg(windows)]
#[no_mangle]
#[used]
static __aullrem: i32 = 0;
#[cfg(windows)]
#[no_mangle]
#[used]
static __aulldiv: i32 = 0;

#[cfg(windows)]
#[no_mangle]
extern "system" fn _DllMainCRTStartup(_: *const u8, _: u32, _: *const u8) -> u32 { 1 }

#[lang = "eh_personality"]
fn foo() {}

Expand Down
9 changes: 9 additions & 0 deletions src/test/rustdoc/auxiliary/primitive-doc.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
// compile-flags: --crate-type lib --edition 2018
#![no_core]
#![feature(no_core)]
#![feature(lang_items)]

#[cfg(windows)]
#[no_mangle]
extern "system" fn _DllMainCRTStartup(_: *const u8, _: u32, _: *const u8) -> u32 { 1 }

#[cfg(windows)]
#[lang = "sized"]
trait Sized {}

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

0 comments on commit 25406d5

Please sign in to comment.