Hmm.. Having a strange macro issue here, not sure if anyone can tell me the issue. 
Using https://crates.io/crates/optional_struct, I have
```rust
trait Association {
    type OptFoo: DeserializeOwned;
}

#[derive(Deserialize)]
#[optional_struct]
struct Foo {
    a: u8,
    b: u8,
}

impl Association for Foo {
    type OptFoo = OptionalFoo;
}
```

Which results in 
```
error[E0277]: the trait bound `for<'de> OptionalFoo: Deserialize<'de>` is not satisfied
  --> src/shadows/shadow_diff/mod.rs:52:19
   |
52 |     type OptFoo = OptionalFoo;
   |                   ^^^^^^^^^^^ the trait `for<'de> Deserialize<'de>` is not implemented for `OptionalFoo`
   |
```

But, doing a manual macro expansion shows
```rust
// Recursive expansion of optional_struct macro
// =============================================

#[derive(Deserialize)]
struct Foo {
    a: u8,
    b: u8,
}
#[derive(Debug, Default, PartialEq, Clone, Deserialize)]
struct OptionalFoo {
    pub a: Option<u8>,
    pub b: Option<u8>,
}
impl optional_struct::Applicable for OptionalFoo {
    type Base = Foo;
    fn apply_to(self, t: &mut Self::Base) {
        if let Some(inner) = self.a {
            t.a = inner;
        }
        if let Some(inner) = self.b {
            t.b = inner;
        }
    }
    fn apply_to_opt(self, t: &mut Self) {
        if let Some(inner) = self.a {
            t.a = Some(inner);
        }
        if let Some(inner) = self.b {
            t.b = Some(inner);
        }
    }
    fn can_convert(&self) -> bool {
        if self.a.is_none() {
            return false;
        }
        if self.b.is_none() {
            return false;
        }
        true
    }
}
impl TryFrom<OptionalFoo> for Foo {
    type Error = OptionalFoo;
    fn try_from(v: Self::Error) -> Result<Self, Self::Error> {
        if v.a.is_none() {
            return Err(v);
        }
        if v.b.is_none() {
            return Err(v);
        }
        Ok(Self {
            a: v.a.unwrap(),
            b: v.b.unwrap(),
        })
    }
}
```

And indeed, replacing this manually instead of the Foo definition works as expected..
Is this some quirk with proc_macros?