DebugIt: Use specialization so you can debug-print a value without explicit (and viral) Debug trait bound. (Not really maintained. Uses specialization so it may break)
use std::fmt;fnfoo<T>(x:T){
debugit::debugit!("", x);}fnmain(){use std::cell::RefCell;structStruct<S>(RefCell<S>);impl<'a> fmt::DebugforStruct<(&mut&'a str,&'a str)>{fnfmt(&self, _:&mut fmt::Formatter<'_>) -> fmt::Result{letmut this = self.0.borrow_mut();*this.0 = this.1;Ok(())}}letmut s = "";{let x = "Hello World!".to_owned();foo(Struct(RefCell::new((&mut s, x.as_str()))));}println!("{}", s);// outputs like "��B�" indicate using the String after its dropped}