Skip to content

Commit

Permalink
Showcase
Browse files Browse the repository at this point in the history
  • Loading branch information
tyranron committed Aug 19, 2024
1 parent 33f95a7 commit f4fa13e
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion tests/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2023,6 +2023,7 @@ mod type_variables {
pub use std::{boxed::Box, format, vec, vec::Vec};
}

use core::iter;
use our_alloc::{format, vec, Box, Vec};

use derive_more::Debug;
Expand Down Expand Up @@ -2110,6 +2111,12 @@ mod type_variables {
t: Box<dyn MyTrait<T>>,
}

#[derive(Debug)]
struct AssocType<I: Iterator> {
iter: I,
elem: Option<I::Item>,
}

#[test]
fn assert() {
assert_eq!(
Expand Down Expand Up @@ -2148,6 +2155,17 @@ mod type_variables {
assert_eq!(
format!("{item:?}"),
"Node { children: [Node { children: [], inner: 0 }, Leaf { inner: 1 }], inner: 2 }",
)
);

assert_eq!(
format!(
"{:?}",
AssocType {
iter: iter::empty::<bool>(),
elem: None,
},
),
"AssocType { iter: Empty, elem: None }",
);
}
}

0 comments on commit f4fa13e

Please sign in to comment.