diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-04-15 10:29:36 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-04-15 10:29:36 +0100 |
commit | 1e0ba04033df87d6966140f74c2f63d0e143fb63 (patch) | |
tree | 1e74385af4f803b04943a47cb40d0abd9d76e41d /crates/ra_db/src | |
parent | d61909f9047ba94c4ed9af580193958257ab21e6 (diff) | |
parent | c8b2ec8c20be44ae19d15e90ff812745f029899e (diff) | |
parent | 464af68ec56b1b35151acc3b53eea3d3d67e03d3 (diff) |
Merge #3966 #3968
3966: Add support for bounds on associated types in trait definitions r=matklad a=flodiebold
E.g.
```rust
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.)
(Another one from my recursive solver branch...)
3968: Remove format from syntax_bridge hot path r=matklad a=edwin0cheng
Although only around 1% speed up by running:
```
Measure-Command {start-process .\target\release\rust-analyzer "analysis-stats -q ." -NoNewWindow -wait}
```
Co-authored-by: Florian Diebold <[email protected]>
Co-authored-by: Edwin Cheng <[email protected]>