Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![feature(specialization)]
- fn main() {
- println!("{:?}", {
- use ::std::fmt::{Debug, Display}; trait Foo {} impl<T: Debug> Foo for T {} impl<T: Display> Foo for T {} impl<T: Debug + Display> Foo for T {}
- });
- }
- /* ~~~~=== stderr ===~~~~
- Compiling playground v0.0.1 (file:///playground)
- error[E0119]: conflicting implementations of trait `main::Foo`:
- --> src/main.rs:5:85
- |
- 5 | use ::std::fmt::{Debug, Display}; trait Foo {} impl<T: Debug> Foo for T {} impl<T: Display> Foo for T {} impl<T: Debug + Display> Foo for T {}
- | ------------------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
- | |
- | first implementation here
- error: aborting due to previous error
- For more information about this error, try `rustc --explain E0119`.
- error: Could not compile `playground`.
- To learn more, run the command again with --verbose.
- */
- /* ~~~~=== stdout ===~~~~
- */
Add Comment
Please, Sign In to add comment