mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-02 18:27:37 +00:00
14 lines
466 B
Rust
14 lines
466 B
Rust
/// Do not point at the format string if it wasn't written in the source.
|
|
//@ forbid-output: required by this formatting parameter
|
|
|
|
#[derive(Debug)]
|
|
pub struct NonDisplay;
|
|
pub struct NonDebug;
|
|
|
|
fn main() {
|
|
let _ = format!(concat!("{", "}"), NonDisplay); //~ ERROR
|
|
let _ = format!(concat!("{", "0", "}"), NonDisplay); //~ ERROR
|
|
let _ = format!(concat!("{:", "?}"), NonDebug); //~ ERROR
|
|
let _ = format!(concat!("{", "0", ":?}"), NonDebug); //~ ERROR
|
|
}
|