Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Untitled
a guest
Apr 26th, 2018
65
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
text
0.17 KB
| None
|
0
0
raw
download
clone
embed
print
report
use std::any::Any;
trait Trait {}
struct A;
impl Trait for A {}
fn foo() -> impl Trait {
A
}
fn main() {
let x = foo();
println!("{}", (&x as &Any).is::<A>());
}
Add Comment
Please,
Sign In
to add comment
Public Pastes
Untitled
Python | 1 min ago | 0.94 KB
Untitled
JSON | 12 min ago | 4.07 KB
Untitled
JSON | 15 min ago | 4.84 KB
PU Prime Forex Live Trading Contest The Great...
PHP | 23 min ago | 2.79 KB
🤑 G2A.com Free Gift Card Guide Apr 2024 FIX 🤑
GetText | 54 min ago | 0.39 KB
🤑 G2A.com Free Gift Card Guide Apr 2024 FIX 💰
GetText | 55 min ago | 0.38 KB
How Does HFM 100% SuperCharged Bonus Work for...
PHP | 1 hour ago | 2.51 KB
Untitled
HTML 5 | 1 hour ago | 0.34 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!