diff options
| author | bors <bors@rust-lang.org> | 2023-01-06 02:58:40 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-01-06 02:58:40 +0000 |
| commit | 0853d9677ca903cd650d5c4b93b1c55e7995cf01 (patch) | |
| tree | 8f32ca5eb05b018c9e3ecda9eebdf8cb137dbb8c /compiler/rustc_data_structures/src/graph | |
| parent | b85f57d652a141b5c73f4f46b986a92b6992e9d9 (diff) | |
| parent | fd7a15971069156f1741fb3a3c34c9f0c54d5744 (diff) | |
| download | rust-0853d9677ca903cd650d5c4b93b1c55e7995cf01.tar.gz rust-0853d9677ca903cd650d5c4b93b1c55e7995cf01.zip | |
Auto merge of #105890 - Nilstrieb:inline-fmt-part-1, r=jackh726
Fix `uninlined_format_args` in compiler crates with the diagnostic migration completed 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). Some of them have been reviewed by myself and they were all correct (though I still recommend going over all of them again for review).
Diffstat (limited to 'compiler/rustc_data_structures/src/graph')
| -rw-r--r-- | compiler/rustc_data_structures/src/graph/dominators/mod.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_data_structures/src/graph/scc/mod.rs | 14 |
2 files changed, 8 insertions, 10 deletions
diff --git a/compiler/rustc_data_structures/src/graph/dominators/mod.rs b/compiler/rustc_data_structures/src/graph/dominators/mod.rs index 94a8c1fc051..ea2a4388b92 100644 --- a/compiler/rustc_data_structures/src/graph/dominators/mod.rs +++ b/compiler/rustc_data_structures/src/graph/dominators/mod.rs @@ -277,12 +277,12 @@ impl<Node: Idx> Dominators<Node> { } pub fn immediate_dominator(&self, node: Node) -> Node { - assert!(self.is_reachable(node), "node {:?} is not reachable", node); + assert!(self.is_reachable(node), "node {node:?} is not reachable"); self.immediate_dominators[node].unwrap() } pub fn dominators(&self, node: Node) -> Iter<'_, Node> { - assert!(self.is_reachable(node), "node {:?} is not reachable", node); + assert!(self.is_reachable(node), "node {node:?} is not reachable"); Iter { dominators: self, node: Some(node) } } diff --git a/compiler/rustc_data_structures/src/graph/scc/mod.rs b/compiler/rustc_data_structures/src/graph/scc/mod.rs index b31092eca98..c8e66eb672c 100644 --- a/compiler/rustc_data_structures/src/graph/scc/mod.rs +++ b/compiler/rustc_data_structures/src/graph/scc/mod.rs @@ -233,10 +233,9 @@ where .map(G::Node::new) .map(|node| match this.start_walk_from(node) { WalkReturn::Complete { scc_index } => scc_index, - WalkReturn::Cycle { min_depth } => panic!( - "`start_walk_node({:?})` returned cycle with depth {:?}", - node, min_depth - ), + WalkReturn::Cycle { min_depth } => { + panic!("`start_walk_node({node:?})` returned cycle with depth {min_depth:?}") + } }) .collect(); @@ -272,8 +271,7 @@ where NodeState::NotVisited => return None, NodeState::InCycleWith { parent } => panic!( - "`find_state` returned `InCycleWith({:?})`, which ought to be impossible", - parent + "`find_state` returned `InCycleWith({parent:?})`, which ought to be impossible" ), }) } @@ -369,7 +367,7 @@ where previous_node = previous; } // Only InCycleWith nodes were added to the reverse linked list. - other => panic!("Invalid previous link while compressing cycle: {:?}", other), + other => panic!("Invalid previous link while compressing cycle: {other:?}"), } debug!("find_state: parent_state = {:?}", node_state); @@ -394,7 +392,7 @@ where // NotVisited can not be part of a cycle since it should // have instead gotten explored. NodeState::NotVisited | NodeState::InCycleWith { .. } => { - panic!("invalid parent state: {:?}", node_state) + panic!("invalid parent state: {node_state:?}") } } } |
