We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 251df51 + 09fd5c7 commit 0d654c8Copy full SHA for 0d654c8
1 file changed
crates/ide-db/src/lib.rs
@@ -385,7 +385,7 @@ pub enum Severity {
385
Allow,
386
}
387
388
-#[derive(Debug, Clone, Copy)]
+#[derive(Clone, Copy)]
389
pub struct MiniCore<'a>(&'a str);
390
391
impl<'a> MiniCore<'a> {
@@ -400,6 +400,15 @@ impl<'a> MiniCore<'a> {
400
401
402
403
+impl std::fmt::Debug for MiniCore<'_> {
404
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
405
+ f.debug_tuple("MiniCore")
406
+ // don't print the whole contents if they correspond to the default
407
+ .field(if self.0 == test_utils::MiniCore::RAW_SOURCE { &"<default>" } else { &self.0 })
408
+ .finish()
409
+ }
410
+}
411
+
412
impl<'a> Default for MiniCore<'a> {
413
#[inline]
414
fn default() -> Self {
0 commit comments