Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Untitled
a guest
Oct 11th, 2018
95
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
text
0.20 KB
| None
|
0
0
raw
download
clone
embed
print
report
use std::fmt::Debug;
fn take_trait_obj<T: AsRef<Debug>>(o: T) {
println!("{:?}", o.as_ref());
}
fn main(){
take_trait_obj::<Box<Debug>>(Box::new(1i32));
take_trait_obj(Box::new(1i32));
}
Add Comment
Please,
Sign In
to add comment
Public Pastes
Untitled
Python | 30 sec ago | 0.87 KB
🤑 G2A.com Free Gift Card Guide May 2024 FIX 🎁
GetText | 4 min ago | 0.38 KB
Untitled
C++ | 4 min ago | 1.45 KB
Untitled
C++ | 5 min ago | 0.82 KB
Untitled
C++ | 5 min ago | 1.70 KB
Untitled
C++ | 6 min ago | 1.28 KB
Untitled
C++ | 7 min ago | 1.18 KB
Untitled
C++ | 8 min ago | 2.20 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!