1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use std::fmt;

pub trait Secure {}
pub trait Insecure {}

impl<T: Secure> Secure for &T {}

impl<'a> Insecure for fmt::Arguments<'a> {}

pub struct InsecureString(pub String);
impl Insecure for InsecureString {}

#[macro_export]
macro_rules! insecure_print {
  ($($arg:tt),*) => {
    let s = $crate::InsecureString(format!($($arg),+));
    println!("{}", s.0);
  }
}