Remove usage of specialization from rustc_borrowck

This commit is contained in:
bjorn3 2024-06-30 15:10:34 +00:00
parent f23c1fdaeb
commit 449581d89b
2 changed files with 26 additions and 3 deletions

View file

@ -213,8 +213,32 @@ trait FactCell {
fn to_string(&self, location_table: &LocationTable) -> String;
}
impl<A: Debug> FactCell for A {
default fn to_string(&self, _location_table: &LocationTable) -> String {
impl FactCell for BorrowIndex {
fn to_string(&self, _location_table: &LocationTable) -> String {
format!("{self:?}")
}
}
impl FactCell for Local {
fn to_string(&self, _location_table: &LocationTable) -> String {
format!("{self:?}")
}
}
impl FactCell for MovePathIndex {
fn to_string(&self, _location_table: &LocationTable) -> String {
format!("{self:?}")
}
}
impl FactCell for PoloniusRegionVid {
fn to_string(&self, _location_table: &LocationTable) -> String {
format!("{self:?}")
}
}
impl FactCell for RegionVid {
fn to_string(&self, _location_table: &LocationTable) -> String {
format!("{self:?}")
}
}

View file

@ -7,7 +7,6 @@
#![feature(box_patterns)]
#![feature(control_flow_enum)]
#![feature(let_chains)]
#![feature(min_specialization)]
#![feature(never_type)]
#![feature(rustc_attrs)]
#![feature(rustdoc_internals)]