mirror of
https://github.com/allankoechke/rust.git
synced 2026-11-30 11:05:36 +00:00
invert dependency on rustc_error_messages
This commit is contained in:
@@ -3976,7 +3976,6 @@ dependencies = [
|
||||
"rustc_macros",
|
||||
"rustc_serialize",
|
||||
"rustc_span",
|
||||
"rustc_structures",
|
||||
"unic-langid",
|
||||
]
|
||||
|
||||
@@ -4788,6 +4787,7 @@ version = "0.0.0"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"rustc_data_structures",
|
||||
"rustc_error_messages",
|
||||
"rustc_macros",
|
||||
"rustc_serialize",
|
||||
"schemars",
|
||||
|
||||
@@ -14,6 +14,5 @@ rustc_data_structures = { path = "../rustc_data_structures" }
|
||||
rustc_macros = { path = "../rustc_macros" }
|
||||
rustc_serialize = { path = "../rustc_serialize" }
|
||||
rustc_span = { path = "../rustc_span" }
|
||||
rustc_structures = { path = "../rustc_structures" }
|
||||
unic-langid = { version = "0.9.0", features = ["macros"] }
|
||||
# tidy-alphabetical-end
|
||||
|
||||
@@ -6,7 +6,6 @@ use std::path::{Path, PathBuf};
|
||||
use std::process::ExitStatus;
|
||||
|
||||
use rustc_span::edition::Edition;
|
||||
use rustc_structures::Limit;
|
||||
|
||||
use crate::{DiagArgValue, IntoDiagArg};
|
||||
|
||||
@@ -157,9 +156,3 @@ impl IntoDiagArg for Backtrace {
|
||||
DiagArgValue::Str(Cow::from(self.to_string()))
|
||||
}
|
||||
}
|
||||
|
||||
impl IntoDiagArg for Limit {
|
||||
fn into_diag_arg(self, _: &mut Option<std::path::PathBuf>) -> DiagArgValue {
|
||||
self.0.into_diag_arg(&mut None)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ edition = "2024"
|
||||
# tidy-alphabetical-start
|
||||
bitflags = "2.4.1"
|
||||
rustc_data_structures = { path = "../rustc_data_structures", optional = true }
|
||||
rustc_error_messages = { path = "../rustc_error_messages", optional = true }
|
||||
rustc_macros = { path = "../rustc_macros", optional = true }
|
||||
rustc_serialize = { path = "../rustc_serialize", optional = true }
|
||||
schemars = "1.0.4"
|
||||
@@ -18,6 +19,7 @@ serde = "1.0.219"
|
||||
default = ["nightly"]
|
||||
nightly = [
|
||||
"dep:rustc_data_structures",
|
||||
"dep:rustc_error_messages",
|
||||
"dep:rustc_macros",
|
||||
"dep:rustc_serialize",
|
||||
]
|
||||
|
||||
@@ -56,3 +56,13 @@ impl Mul<usize> for Limit {
|
||||
Limit::new(self.0 * rhs)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "nightly")]
|
||||
impl rustc_error_messages::IntoDiagArg for Limit {
|
||||
fn into_diag_arg(
|
||||
self,
|
||||
_: &mut Option<std::path::PathBuf>,
|
||||
) -> rustc_error_messages::DiagArgValue {
|
||||
self.0.into_diag_arg(&mut None)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user