mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-18 09:56:31 +00:00
11 lines
338 B
Rust
11 lines
338 B
Rust
// Test ensuring that `dbg!(expr)` requires the passed type to implement `Debug`.
|
|
//
|
|
// `dbg!` shouldn't tell the user about format literal syntax; the user didn't write one.
|
|
//@ forbid-output: cannot be formatted using
|
|
|
|
struct NotDebug;
|
|
|
|
fn main() {
|
|
let _: NotDebug = dbg!(NotDebug); //~ ERROR `NotDebug` doesn't implement `Debug`
|
|
}
|