Skip to content

Instantly share code, notes, and snippets.

@rust-play
Created April 20, 2019 04:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rust-play/9c29877ca56f3b491ff5c95537bb2c2e to your computer and use it in GitHub Desktop.
Save rust-play/9c29877ca56f3b491ff5c95537bb2c2e to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
trait Zoo {
type X;
}
impl Zoo for u16 {
type X = usize;
}
fn foo(abc: <u16 as Zoo>::X) {}
fn main() {
let x: *const u8 = foo as _;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment