rust/src/test/rustdoc-ui/test-no_std.rs
Oliver Middleton 17f4cbc303 rustdoc: Fix handling of compile errors when running rustdoc --test
* Call `abort_if_errors` so all errors actually stop rustdoc.
* Don't panic with "compiler aborted in rustdoc!", instead just exit to avoid the ugly panic message.
* Use rlib as the crate type when searching for doctests matching what is used for doc generation so `#[no_std]` crates don't create "no global memory allocator" errors.
2020-01-18 23:51:06 +00:00

12 lines
179 B
Rust

// compile-flags:--test
// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR"
// build-pass
#![no_std]
extern crate alloc;
/// ```
/// assert!(true)
/// ```
pub fn f() {}