Fix uninlined_format_args
for some compiler crates
Convert all the crates that have had their diagnostic migration completed (except save_analysis because that will be deleted soon and apfloat because of the licensing problem).
This commit is contained in:
parent
1d284af117
commit
fd7a159710
91 changed files with 287 additions and 329 deletions
|
@ -29,7 +29,7 @@ impl DepNodeFilter {
|
|||
|
||||
/// Tests whether `node` meets the filter, returning true if so.
|
||||
pub fn test<K: DepKind>(&self, node: &DepNode<K>) -> bool {
|
||||
let debug_str = format!("{:?}", node);
|
||||
let debug_str = format!("{node:?}");
|
||||
self.text.split('&').map(|s| s.trim()).all(|f| debug_str.contains(f))
|
||||
}
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ impl<K: DepKind> EdgeFilter<K> {
|
|||
pub fn new(test: &str) -> Result<EdgeFilter<K>, Box<dyn Error>> {
|
||||
let parts: Vec<_> = test.split("->").collect();
|
||||
if parts.len() != 2 {
|
||||
Err(format!("expected a filter like `a&b -> c&d`, not `{}`", test).into())
|
||||
Err(format!("expected a filter like `a&b -> c&d`, not `{test}`").into())
|
||||
} else {
|
||||
Ok(EdgeFilter {
|
||||
source: DepNodeFilter::new(parts[0]),
|
||||
|
|
|
@ -120,7 +120,7 @@ pub trait DepNodeParams<Tcx: DepContext>: fmt::Debug + Sized {
|
|||
}
|
||||
|
||||
fn to_debug_str(&self, _: Tcx) -> String {
|
||||
format!("{:?}", self)
|
||||
format!("{self:?}")
|
||||
}
|
||||
|
||||
/// This method tries to recover the query key from the given `DepNode`,
|
||||
|
|
|
@ -316,10 +316,8 @@ impl<K: DepKind> DepGraph<K> {
|
|||
assert!(
|
||||
!self.dep_node_exists(&key),
|
||||
"forcing query with already existing `DepNode`\n\
|
||||
- query-key: {:?}\n\
|
||||
- dep-node: {:?}",
|
||||
arg,
|
||||
key
|
||||
- query-key: {arg:?}\n\
|
||||
- dep-node: {key:?}"
|
||||
);
|
||||
|
||||
let task_deps = if cx.dep_context().is_eval_always(key.kind) {
|
||||
|
@ -365,8 +363,7 @@ impl<K: DepKind> DepGraph<K> {
|
|||
debug_assert!(
|
||||
data.colors.get(prev_index).is_none(),
|
||||
"DepGraph::with_task() - Duplicate DepNodeColor \
|
||||
insertion for {:?}",
|
||||
key
|
||||
insertion for {key:?}"
|
||||
);
|
||||
|
||||
data.colors.insert(prev_index, color);
|
||||
|
@ -447,7 +444,7 @@ impl<K: DepKind> DepGraph<K> {
|
|||
TaskDepsRef::Allow(deps) => deps.lock(),
|
||||
TaskDepsRef::Ignore => return,
|
||||
TaskDepsRef::Forbid => {
|
||||
panic!("Illegal read of: {:?}", dep_node_index)
|
||||
panic!("Illegal read of: {dep_node_index:?}")
|
||||
}
|
||||
};
|
||||
let task_deps = &mut *task_deps;
|
||||
|
@ -824,8 +821,7 @@ impl<K: DepKind> DepGraph<K> {
|
|||
debug_assert!(
|
||||
data.colors.get(prev_dep_node_index).is_none(),
|
||||
"DepGraph::try_mark_previous_green() - Duplicate DepNodeColor \
|
||||
insertion for {:?}",
|
||||
dep_node
|
||||
insertion for {dep_node:?}"
|
||||
);
|
||||
|
||||
if !side_effects.is_empty() {
|
||||
|
@ -1164,7 +1160,7 @@ impl<K: DepKind> CurrentDepGraph<K> {
|
|||
if let Some(fingerprint) = fingerprint {
|
||||
if fingerprint == prev_graph.fingerprint_by_index(prev_index) {
|
||||
if print_status {
|
||||
eprintln!("[task::green] {:?}", key);
|
||||
eprintln!("[task::green] {key:?}");
|
||||
}
|
||||
|
||||
// This is a green node: it existed in the previous compilation,
|
||||
|
@ -1186,7 +1182,7 @@ impl<K: DepKind> CurrentDepGraph<K> {
|
|||
(dep_node_index, Some((prev_index, DepNodeColor::Green(dep_node_index))))
|
||||
} else {
|
||||
if print_status {
|
||||
eprintln!("[task::red] {:?}", key);
|
||||
eprintln!("[task::red] {key:?}");
|
||||
}
|
||||
|
||||
// This is a red node: it existed in the previous compilation, its query
|
||||
|
@ -1209,7 +1205,7 @@ impl<K: DepKind> CurrentDepGraph<K> {
|
|||
}
|
||||
} else {
|
||||
if print_status {
|
||||
eprintln!("[task::unknown] {:?}", key);
|
||||
eprintln!("[task::unknown] {key:?}");
|
||||
}
|
||||
|
||||
// This is a red node, effectively: it existed in the previous compilation
|
||||
|
@ -1234,7 +1230,7 @@ impl<K: DepKind> CurrentDepGraph<K> {
|
|||
}
|
||||
} else {
|
||||
if print_status {
|
||||
eprintln!("[task::new] {:?}", key);
|
||||
eprintln!("[task::new] {key:?}");
|
||||
}
|
||||
|
||||
let fingerprint = fingerprint.unwrap_or(Fingerprint::ZERO);
|
||||
|
|
|
@ -270,17 +270,14 @@ impl<K: DepKind + Encodable<FileEncoder>> GraphEncoder<K> {
|
|||
|
||||
eprintln!("[incremental]");
|
||||
eprintln!("[incremental] DepGraph Statistics");
|
||||
eprintln!("{}", SEPARATOR);
|
||||
eprintln!("{SEPARATOR}");
|
||||
eprintln!("[incremental]");
|
||||
eprintln!("[incremental] Total Node Count: {}", status.total_node_count);
|
||||
eprintln!("[incremental] Total Edge Count: {}", status.total_edge_count);
|
||||
|
||||
if cfg!(debug_assertions) {
|
||||
eprintln!("[incremental] Total Edge Reads: {}", total_read_count);
|
||||
eprintln!(
|
||||
"[incremental] Total Duplicate Edge Reads: {}",
|
||||
total_duplicate_read_count
|
||||
);
|
||||
eprintln!("[incremental] Total Edge Reads: {total_read_count}");
|
||||
eprintln!("[incremental] Total Duplicate Edge Reads: {total_duplicate_read_count}");
|
||||
}
|
||||
|
||||
eprintln!("[incremental]");
|
||||
|
@ -288,7 +285,7 @@ impl<K: DepKind + Encodable<FileEncoder>> GraphEncoder<K> {
|
|||
"[incremental] {:<36}| {:<17}| {:<12}| {:<17}|",
|
||||
"Node Kind", "Node Frequency", "Node Count", "Avg. Edge Count"
|
||||
);
|
||||
eprintln!("{}", SEPARATOR);
|
||||
eprintln!("{SEPARATOR}");
|
||||
|
||||
for stat in stats {
|
||||
let node_kind_ratio =
|
||||
|
@ -304,7 +301,7 @@ impl<K: DepKind + Encodable<FileEncoder>> GraphEncoder<K> {
|
|||
);
|
||||
}
|
||||
|
||||
eprintln!("{}", SEPARATOR);
|
||||
eprintln!("{SEPARATOR}");
|
||||
eprintln!("[incremental]");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue