Open
Description
macro_rules! impl_somethingable {
($Base: ty, $Block:ty) => {
impl<'a, T> Somethingable for $Block where T: $Base {
}
}
}
impl_somethingable!(ATrait, A);
<anon>:15:52: 15:60 error: each predicate in a `where` clause must have at least one bound in it
<anon>:15 impl<'a, T> Somethingable for $Block where T: $Base {
^~~~~~~~
<anon>:15:56: 15:60 error: expected one of `,` or `{`, found `ATrait`
<anon>:15 impl<'a, T> Somethingable for $Block where T: $Base {
^~~~
The solution is to use $ident
instead of $ty
, but this is non-obvious to the user, especially since it's perfectly ok to have ATrait
in that location.
Playpen: http://is.gd/AMUJDw
cc @huonw