diff options
Diffstat (limited to 'src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-89118.rs')
-rw-r--r-- | src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-89118.rs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-89118.rs b/src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-89118.rs new file mode 100644 index 000000000..fffb54f86 --- /dev/null +++ b/src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-89118.rs @@ -0,0 +1,32 @@ +trait BufferMut {} +struct Ctx<D>(D); + +trait BufferUdpStateContext<B> {} +impl<B: BufferMut, C> BufferUdpStateContext<B> for C {} + +trait StackContext +where + Ctx<()>: for<'a> BufferUdpStateContext<&'a ()>, +{ + type Dispatcher; +} + +trait TimerContext { + type Handler; +} +impl<C> TimerContext for C +where + C: StackContext, + //~^ ERROR: is not satisfied [E0277] +{ + type Handler = Ctx<C::Dispatcher>; + //~^ ERROR: is not satisfied [E0277] +} + +struct EthernetWorker<C>(C) +where + Ctx<()>: for<'a> BufferUdpStateContext<&'a ()>; +impl<C> EthernetWorker<C> {} +//~^ ERROR: is not satisfied [E0277] + +fn main() {} |