Skip to content

Instantly share code, notes, and snippets.

@rust-play
Created September 20, 2019 20:50
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/3b82edc3278afee11aa1818358a8a7a0 to your computer and use it in GitHub Desktop.
Save rust-play/3b82edc3278afee11aa1818358a8a7a0 to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
#![feature(const_generics)]
trait Foo {
const A: usize;
}
trait Aux<const A: usize> {}
impl<T: Foo> Aux<{ <T as Foo>::A }> for T where T: Foo {}
trait Trait {}
impl<T> Trait for T where T: Aux<{ 2 }> {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment