Skip to content

Commit 2a17659

Browse files
committed
Default debug functions to None
1 parent 51b3e22 commit 2a17659

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

chalk-ir/src/interner.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,13 @@ pub trait Interner: Debug + Copy + Eq + Ord + Hash {
201201
///
202202
/// Returns `None` to fallback to the default debug output (e.g.,
203203
/// if no info about current program is available from TLS).
204+
#[allow(unused_variables)]
204205
fn debug_opaque_ty_id(
205206
opaque_ty_id: OpaqueTyId<Self>,
206207
fmt: &mut fmt::Formatter<'_>,
207-
) -> Option<fmt::Result>;
208+
) -> Option<fmt::Result> {
209+
None
210+
}
208211

209212
/// Prints the debug representation of an alias. To get good
210213
/// results, this requires inspecting TLS, and is difficult to
@@ -225,10 +228,13 @@ pub trait Interner: Debug + Copy + Eq + Ord + Hash {
225228
///
226229
/// Returns `None` to fallback to the default debug output (e.g.,
227230
/// if no info about current program is available from TLS).
231+
#[allow(unused_variables)]
228232
fn debug_projection_ty(
229233
projection_ty: &ProjectionTy<Self>,
230234
fmt: &mut fmt::Formatter<'_>,
231-
) -> Option<fmt::Result>;
235+
) -> Option<fmt::Result> {
236+
None
237+
}
232238

233239
/// Prints the debug representation of an OpaqueTy. To get good
234240
/// results, this requires inspecting TLS, and is difficult to
@@ -237,10 +243,13 @@ pub trait Interner: Debug + Copy + Eq + Ord + Hash {
237243
///
238244
/// Returns `None` to fallback to the default debug output (e.g.,
239245
/// if no info about current program is available from TLS).
246+
#[allow(unused_variables)]
240247
fn debug_opaque_ty(
241248
opaque_ty: &OpaqueTy<Self>,
242249
fmt: &mut fmt::Formatter<'_>,
243-
) -> Option<fmt::Result>;
250+
) -> Option<fmt::Result> {
251+
None
252+
}
244253

245254
/// Prints the debug representation of an type. To get good
246255
/// results, this requires inspecting TLS, and is difficult to

0 commit comments

Comments
 (0)