summaryrefslogtreecommitdiffstats
path: root/vendor/chalk-solve-0.87.0/src/display/render_trait.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
commitdc0db358abe19481e475e10c32149b53370f1a1c (patch)
treeab8ce99c4b255ce46f99ef402c27916055b899ee /vendor/chalk-solve-0.87.0/src/display/render_trait.rs
parentReleasing progress-linux version 1.71.1+dfsg1-2~progress7.99u1. (diff)
downloadrustc-dc0db358abe19481e475e10c32149b53370f1a1c.tar.xz
rustc-dc0db358abe19481e475e10c32149b53370f1a1c.zip
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/chalk-solve-0.87.0/src/display/render_trait.rs')
-rw-r--r--vendor/chalk-solve-0.87.0/src/display/render_trait.rs30
1 files changed, 0 insertions, 30 deletions
diff --git a/vendor/chalk-solve-0.87.0/src/display/render_trait.rs b/vendor/chalk-solve-0.87.0/src/display/render_trait.rs
deleted file mode 100644
index a565f076c..000000000
--- a/vendor/chalk-solve-0.87.0/src/display/render_trait.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-//! `RenderAsRust` trait and related utils.
-use std::fmt::{Display, Formatter, Result};
-
-use chalk_ir::interner::Interner;
-
-use super::state::InternalWriterState;
-
-/// Displays `RenderAsRust` data.
-///
-/// This is a utility struct for making `RenderAsRust` nice to use with rust format macros.
-pub(in crate::display) struct DisplayRenderAsRust<'a, I: Interner, T> {
- s: &'a InternalWriterState<'a, I>,
- rar: &'a T,
-}
-
-impl<I: Interner, T: RenderAsRust<I>> Display for DisplayRenderAsRust<'_, I, T> {
- fn fmt(&self, f: &mut Formatter<'_>) -> Result {
- self.rar.fmt(self.s, f)
- }
-}
-
-pub(in crate::display) trait RenderAsRust<I: Interner> {
- fn fmt(&self, s: &InternalWriterState<'_, I>, f: &mut Formatter<'_>) -> Result;
- fn display<'a>(&'a self, s: &'a InternalWriterState<'a, I>) -> DisplayRenderAsRust<'a, I, Self>
- where
- Self: Sized,
- {
- DisplayRenderAsRust { s, rar: self }
- }
-}