]> git.lizzy.rs Git - rust.git/commit
Add support for bounds on associated types in trait definitions
authorFlorian Diebold <flodiebold@gmail.com>
Sun, 12 Apr 2020 10:28:24 +0000 (12:28 +0200)
committerFlorian Diebold <flodiebold@gmail.com>
Mon, 13 Apr 2020 13:57:28 +0000 (15:57 +0200)
commitc8b2ec8c20be44ae19d15e90ff812745f029899e
tree98ed585238a37d722159a489db24e0514ae562ce
parentc388130f5ffbcbe7d3131213a24d12d02f769b87
Add support for bounds on associated types in trait definitions

E.g.
```
trait Trait {
    type Item: SomeOtherTrait;
}
```
Note that these don't simply desugar to where clauses; as I understand it, where
clauses have to be proved by the *user* of the trait, but these bounds are proved
by the *implementor*. (Also, where clauses on associated types are unstable.)
crates/ra_hir_def/src/data.rs
crates/ra_hir_ty/src/tests/traits.rs
crates/ra_hir_ty/src/traits.rs
crates/ra_hir_ty/src/traits/chalk.rs