Skip to content

Commit

Permalink
Fix minor doc issues
Browse files Browse the repository at this point in the history
Misisng link and incorrect `cargo:cargo:...` prefix
  • Loading branch information
Techcable authored and cuviper committed Sep 27, 2024
1 parent e0e0f18 commit 546f7c6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ pub struct AutoCfg {
/// This does not automatically call [`emit_possibility`]
/// so the compiler my generate an [`unexpected_cfgs` warning][check-cfg-flags].
/// However, all the builtin emit methods on [`AutoCfg`] call [`emit_possibility`] automatically.
///
/// [check-cfg-flags]: https://blog.rust-lang.org/2024/05/06/check-cfg.html
pub fn emit(cfg: &str) {
println!("cargo:rustc-cfg={}", cfg);
}
Expand Down Expand Up @@ -131,7 +133,7 @@ pub fn rerun_env(var: &str) {

/// Indicates to rustc that a config flag should not generate an [`unexpected_cfgs` warning][check-cfg-flags]
///
/// This looks like `cargo:cargo:rustc-check-cfg=cfg(VAR)`
/// This looks like `cargo:rustc-check-cfg=cfg(VAR)`
///
/// As of rust 1.80, the compiler does [automatic checking of cfgs at compile time][check-cfg-flags].
/// All custom configuration flags must be known to rustc, or they will generate a warning.
Expand Down

0 comments on commit 546f7c6

Please sign in to comment.