Skip to content

Instantly share code, notes, and snippets.

@TethysSvensson
Created June 15, 2014 17:57
Show Gist options
  • Save TethysSvensson/6d4cf69fb991fc112ebb to your computer and use it in GitHub Desktop.
Save TethysSvensson/6d4cf69fb991fc112ebb to your computer and use it in GitHub Desktop.
struct Foo(u8);
type Bar = Foo;
impl Bar {}
fn main() {}
/*
bug2.rs:3:1: 3:12 error: cannot associate methods with a type outside the crate the type is defined in; define and implement a trait or new type instead
bug2.rs:3 impl Bar {}
^~~~~~~~~~~
error: aborting due to previous error
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment