Skip to content

Commit 449581d

Browse files
committed
Remove usage of specialization from rustc_borrowck
1 parent f23c1fd commit 449581d

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

compiler/rustc_borrowck/src/facts.rs

+26-2
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,32 @@ trait FactCell {
213213
fn to_string(&self, location_table: &LocationTable) -> String;
214214
}
215215

216-
impl<A: Debug> FactCell for A {
217-
default fn to_string(&self, _location_table: &LocationTable) -> String {
216+
impl FactCell for BorrowIndex {
217+
fn to_string(&self, _location_table: &LocationTable) -> String {
218+
format!("{self:?}")
219+
}
220+
}
221+
222+
impl FactCell for Local {
223+
fn to_string(&self, _location_table: &LocationTable) -> String {
224+
format!("{self:?}")
225+
}
226+
}
227+
228+
impl FactCell for MovePathIndex {
229+
fn to_string(&self, _location_table: &LocationTable) -> String {
230+
format!("{self:?}")
231+
}
232+
}
233+
234+
impl FactCell for PoloniusRegionVid {
235+
fn to_string(&self, _location_table: &LocationTable) -> String {
236+
format!("{self:?}")
237+
}
238+
}
239+
240+
impl FactCell for RegionVid {
241+
fn to_string(&self, _location_table: &LocationTable) -> String {
218242
format!("{self:?}")
219243
}
220244
}

compiler/rustc_borrowck/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#![feature(box_patterns)]
88
#![feature(control_flow_enum)]
99
#![feature(let_chains)]
10-
#![feature(min_specialization)]
1110
#![feature(never_type)]
1211
#![feature(rustc_attrs)]
1312
#![feature(rustdoc_internals)]

0 commit comments

Comments
 (0)