1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// SPDX-License-Identifier: 0BSD
// rustc-version-const
// Copyright (C) 2025 by LoRd_MuldeR <mulder2@gmx.de>
//! # rustc-version-const
//!
//! Makes the current **rustc** version available via a `const fn` at runtime.
//!
//! The version detection happens automatically at build-time.
//!
//! ### Usage
//!
//! Here is a simple example that demonstrates how to use `rustc_version()` in your code:
//!
//! ```rust
//! use rustc_version_const::{rustc_version, rustc_version_full};
//!
//! const RUSTC_VERSION: &str = rustc_version();
//!
//! fn main() {
//! println!("rustc version: \"{}\"", RUSTC_VERSION);
//! }
//! ```
/// Returns the `rustc` version that was used to build this application
///
/// This function returns just the plain version number *without* revision, e.g., `1.90.0`.
pub const
/// Returns the `rustc` version that was used to build this application
///
/// This function returns the full version string, e.g., `rustc 1.90.0 (1159e78c4 2025-09-14)`.
pub const