]> git.lizzy.rs Git - rust.git/blob - src/test/ui/log-knows-the-names-of-variants.rs
Bump chalk to v0.87
[rust.git] / src / test / ui / log-knows-the-names-of-variants.rs
1 // run-pass
2
3 #![allow(non_camel_case_types)]
4 #![allow(dead_code)]
5 #[derive(Debug)]
6 enum foo {
7   a(usize),
8   b(String),
9   c,
10 }
11
12 #[derive(Debug)]
13 enum bar {
14   d, e, f
15 }
16
17 pub fn main() {
18     assert_eq!("a(22)".to_string(), format!("{:?}", foo::a(22)));
19     assert_eq!("c".to_string(), format!("{:?}", foo::c));
20     assert_eq!("d".to_string(), format!("{:?}", bar::d));
21 }