]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/impl-trait/negative-reasoning.rs
1 // Tests that we cannot assume that an opaque type does *not* implement some
3 #![feature(type_alias_impl_trait)]
6 impl<T
> OpaqueTrait
for T {}
7 type OpaqueType
= impl OpaqueTrait
;
8 fn mk_opaque() -> OpaqueType
{
16 impl<T
: std
::fmt
::Debug
> AnotherTrait
for T {}
18 // This is in error, because we cannot assume that `OpaqueType: !Debug`
19 impl AnotherTrait
for D
<OpaqueType
> {
20 //~^ ERROR conflicting implementations of trait `AnotherTrait` for type `D<impl OpaqueTrait>`