aboutsummaryrefslogtreecommitdiff
path: root/tests/doctests.md
blob: ef557feb936f24b583c807b167aa8872c13d8aa9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Tests that the object-safety assertion via `impl dyn` is working:

```rust compile_fail
trait ObjectUnsafe: Sized {}

#[dynamize::dynamize]
trait Trait: ObjectUnsafe {}
```

```rust compile_fail
trait ObjectUnsafe: Sized {}

#[dynamize::dynamize]
trait Trait {
    type A: ObjectUnsafe;

    fn f(&self) -> Self::A;
}
```