]> git.lizzy.rs Git - rust.git/commit
prove defaults meet WF requirements, not that they are WF
authorNiko Matsakis <niko@alum.mit.edu>
Fri, 29 Jun 2018 09:31:59 +0000 (05:31 -0400)
committerNiko Matsakis <niko@alum.mit.edu>
Mon, 2 Jul 2018 14:38:30 +0000 (10:38 -0400)
commit5c15163cb9101d9a9cc8a41fe98b253cce351857
tree9f663c4679c33cfcf7ab88c8a47ecb547da90de5
parent2eb6969c6a2efba9e59544bc18b4d96a9f2b2504
prove defaults meet WF requirements, not that they are WF

If we have

```rust
struct Foo<T: Copy = String> { .. }
```

the old code would have proven that `String: Copy` was WF -- this,
incidentally, also proved that `String: Copy`. The new code just
proves `String: Copy` directly.

Co-authored-by: Tyler Mandry <tmandry@gmail.com>
src/librustc_typeck/check/wfcheck.rs
src/test/ui/type-check-defaults.stderr