diff options
| author | Jonathan Dönszelmann <jonathan@donsz.nl> | 2024-12-13 14:47:11 +0100 |
|---|---|---|
| committer | Jonathan Dönszelmann <jonathan@donsz.nl> | 2024-12-16 19:08:19 +0100 |
| commit | efb98b6552abd00c58a2c1dd171b9086edf28214 (patch) | |
| tree | 1a8ad8d3257b94c8a0c4bf75629851a1ae94289c /compiler/rustc_session/src | |
| parent | 1341366af911a16c53513d5eda2cc8cf31c8c027 (diff) | |
| download | rust-efb98b6552abd00c58a2c1dd171b9086edf28214.tar.gz rust-efb98b6552abd00c58a2c1dd171b9086edf28214.zip | |
rename rustc_attr to rustc_attr_parsing and create rustc_attr_data_structures
Diffstat (limited to 'compiler/rustc_session/src')
| -rw-r--r-- | compiler/rustc_session/src/lib.rs | 3 | ||||
| -rw-r--r-- | compiler/rustc_session/src/version.rs | 29 |
2 files changed, 0 insertions, 32 deletions
diff --git a/compiler/rustc_session/src/lib.rs b/compiler/rustc_session/src/lib.rs index 0b4470b2b0f..dcf86d1a408 100644 --- a/compiler/rustc_session/src/lib.rs +++ b/compiler/rustc_session/src/lib.rs @@ -29,9 +29,6 @@ pub mod output; pub use getopts; -mod version; -pub use version::RustcVersion; - rustc_fluent_macro::fluent_messages! { "../messages.ftl" } /// Requirements for a `StableHashingContext` to be used in this crate. diff --git a/compiler/rustc_session/src/version.rs b/compiler/rustc_session/src/version.rs deleted file mode 100644 index 1696eaf902b..00000000000 --- a/compiler/rustc_session/src/version.rs +++ /dev/null @@ -1,29 +0,0 @@ -use std::borrow::Cow; -use std::fmt::{self, Display}; - -use rustc_errors::IntoDiagArg; -use rustc_macros::{Decodable, Encodable, HashStable_Generic, current_rustc_version}; - -#[derive(Encodable, Decodable, Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -#[derive(HashStable_Generic)] -pub struct RustcVersion { - pub major: u16, - pub minor: u16, - pub patch: u16, -} - -impl RustcVersion { - pub const CURRENT: Self = current_rustc_version!(); -} - -impl Display for RustcVersion { - fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(formatter, "{}.{}.{}", self.major, self.minor, self.patch) - } -} - -impl IntoDiagArg for RustcVersion { - fn into_diag_arg(self) -> rustc_errors::DiagArgValue { - rustc_errors::DiagArgValue::Str(Cow::Owned(self.to_string())) - } -} |
