Created
July 5, 2020 09:54
-
-
Save narodnik/3388cf18681df91c478fdd86138fa201 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Special | |
{ | |
} | |
trait Trait | |
{ | |
fn foo(&self); | |
} | |
impl<T> Trait for T | |
{ | |
default fn foo(&self) { println!("hi"); } | |
} | |
impl Trait for Special | |
{ | |
fn foo(&self) { println!("special"); } | |
} | |
fn main() { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment