about summary refs log tree commit diff
path: root/tests/ui/fmt/fmt_debug/full.rs
blob: 4e9384d2c5200f9243867ce39761a094c72a0a1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//@ compile-flags: -Zfmt-debug=full
//@ run-pass
#![feature(fmt_debug)]
#![allow(dead_code)]
#![allow(unused)]

#[derive(Debug)]
struct Foo {
    bar: u32,
}

fn main() {
    let s = format!("Still works: {:?} '{:?}'", cfg!(fmt_debug = "full"), Foo { bar: 1 });
    assert_eq!("Still works: true 'Foo { bar: 1 }'", s);
}