Skip to content

Instantly share code, notes, and snippets.

@narodnik
Created July 5, 2020 09:54
Show Gist options
  • Save narodnik/3388cf18681df91c478fdd86138fa201 to your computer and use it in GitHub Desktop.
Save narodnik/3388cf18681df91c478fdd86138fa201 to your computer and use it in GitHub Desktop.
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