diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2024-06-30 15:10:34 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2024-06-30 16:42:53 +0000 |
| commit | 449581d89bd8361d6eaa2d0e91c2197831658b1a (patch) | |
| tree | 0854c45b5108393ca2c989e5dd5c7a78bb0bd377 | |
| parent | f23c1fdaeba6a1c8237996ae2efecaf938ba9ef8 (diff) | |
| download | rust-449581d89bd8361d6eaa2d0e91c2197831658b1a.tar.gz rust-449581d89bd8361d6eaa2d0e91c2197831658b1a.zip | |
Remove usage of specialization from rustc_borrowck
| -rw-r--r-- | compiler/rustc_borrowck/src/facts.rs | 28 | ||||
| -rw-r--r-- | compiler/rustc_borrowck/src/lib.rs | 1 |
2 files changed, 26 insertions, 3 deletions
diff --git a/compiler/rustc_borrowck/src/facts.rs b/compiler/rustc_borrowck/src/facts.rs index 51ea59e2092..af96f115385 100644 --- a/compiler/rustc_borrowck/src/facts.rs +++ b/compiler/rustc_borrowck/src/facts.rs @@ -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:?}") } } diff --git a/compiler/rustc_borrowck/src/lib.rs b/compiler/rustc_borrowck/src/lib.rs index 69efee2fbdc..91c0a390738 100644 --- a/compiler/rustc_borrowck/src/lib.rs +++ b/compiler/rustc_borrowck/src/lib.rs @@ -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)] |
