// The rustc-cfg strings below are *not* public API. Please let us know by // opening a GitHub issue if your build environment requires some way to enable // these cfgs other than by executing our build script. fn main() { let compiler = match rustc_version() {
Some(compiler) => compiler,
None => return,
};
// NOTE: // Adding a new cfg gated by Rust version MUST be accompanied by an addition to the matrix in // .github/workflows/ci.yml. if compiler.minor >= 44 {
println!("cargo:rustc-cfg=path_buf_capacity");
} if compiler.minor >= 56 {
println!("cargo:rustc-cfg=shrink_to");
} // Stable and beta 1.63 have a stable try_reserve_2. if (compiler.minor >= 63
&& (compiler.channel == ReleaseChannel::Stable || compiler.channel == ReleaseChannel::Beta))
|| compiler.minor >= 64
{
println!("cargo:rustc-cfg=try_reserve_2");
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.