INNER CODE UNIT · Rust

_ensure_cfg_doc_means_rustdoc

EmbarkStudios/rust-gpu · crates/spirv-builder/src/lib.rs:86

fn _ensure_cfg_doc_means_rustdoc() {
    // HACK(eddyb) this relies on specific `rustdoc` behavior (i.e. it skips
    // type-checking function bodies, so we trigger a compile-time `panic! from
    // a type) to check that we're in fact under `rustdoc`, not just `--cfg doc`.
    #[rustfmt::skip]
    let _: [(); panic!("

            `--cfg doc` was set outside of `rustdoc`
            (if you are running `rustdoc` or `cargo doc`, please file an issue)

")];
}

mod depfile;
#[cfg(feature = "watch")]
mod watch;

use raw_string::{RawStr, RawString};

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…