]> git.lizzy.rs Git - rust.git/commit
Auto merge of #41911 - michaelwoerister:querify_trait_def, r=nikomatsakis
authorbors <bors@rust-lang.org>
Wed, 17 May 2017 21:44:08 +0000 (21:44 +0000)
committerbors <bors@rust-lang.org>
Wed, 17 May 2017 21:44:08 +0000 (21:44 +0000)
commit4640e185725955ea7be30655e8de3c88ef824f2d
tree9ac769e2c05b8f8dc833f59fcb8a3c689dc65b6d
parent7b5c3d2b208f47b0750ea6c39f6f3f97cb1ca1bb
parent08660afe90d6c2257c59408116c718929af58963
Auto merge of #41911 - michaelwoerister:querify_trait_def, r=nikomatsakis

Remove interior mutability from TraitDef by turning fields into queries

This PR gets rid of anything `std::cell` in `TraitDef` by
- moving the global list of trait impls from `TraitDef` into a query,
- moving the list of trait impls relevent for some self-type from `TraitDef` into a query
- moving the specialization graph of trait impls into a query, and
- moving `TraitDef::object_safety` into a query.

I really like how querifying things not only helps with incremental compilation and on-demand, but also just plain makes the code cleaner `:)`

There are also some smaller fixes in the PR. Commits can be reviewed separately.

r? @eddyb or @nikomatsakis
src/librustc/ty/maps.rs
src/librustc_driver/driver.rs
src/librustc_metadata/creader.rs
src/librustc_metadata/cstore.rs
src/librustc_metadata/cstore_impl.rs
src/librustc_metadata/decoder.rs
src/librustc_metadata/lib.rs