rust/src/librustc_save_analysis
bors 4ed2edaafe Auto merge of #42281 - eddyb:well-adjusted, r=nikomatsakis
Decompose Adjustment into smaller steps and remove the method map.

The method map held method callee information for:
* actual method calls (`x.f(...)`)
* overloaded unary, binary, indexing and call operators
* *every overloaded deref adjustment* (many can exist for each expression)

That last one was a historical ~~accident~~ hack, and part of the motivation for this PR, along with:
* a desire to compose adjustments more freely
* containing the autoderef logic better to avoid mutation within an inference snapshot
* not creating `TyFnDef` types which are incompatible with the original one
  * i.e. we used to take a`TyFnDef`'s `for<'a> &'a T -> &'a U` signature and instantiate `'a` using a region inference variable, *then* package the resulting `&'b T -> &'b U` signature in another `TyFnDef`, while keeping *the same* `DefId` and `Substs`
* to fix #3548 by explicitly writing autorefs for the RHS of comparison operators

Individual commits tell their own story, of "atomic" changes avoiding breaking semantics.

Future work based on this PR could include:
* removing the signature from `TyFnDef`, now that it's always "canonical"
  * some questions of variance remain, as subtyping *still* treats the signature differently
* moving part of the typeck logic for methods, autoderef and coercion into `rustc::traits`
* allowing LUB coercions (joining multiple expressions) to "stack up" many adjustments
* transitive coercions (e.g. reify or unsize after multiple steps of autoderef)

r? @nikomatsakis
2017-06-01 11:34:13 +00:00
..
Cargo.toml Update save-analysis deps and RLS submodule 2017-05-09 07:15:48 +12:00
csv_dumper.rs Fix various useless derefs and slicings 2017-03-27 08:58:00 +02:00
data.rs Ensure we walk the root module of the crate 2017-05-11 17:45:27 +12:00
dump.rs Removal pass for anonymous parameters 2017-05-02 05:55:20 +02:00
dump_visitor.rs Pass crate attributes in visit.rs 2017-05-12 07:15:29 +12:00
external_data.rs Ensure we walk the root module of the crate 2017-05-11 17:45:27 +12:00
json_api_dumper.rs Ensure we walk the root module of the crate 2017-05-11 17:45:27 +12:00
json_dumper.rs Ensure we walk the root module of the crate 2017-05-11 17:45:27 +12:00
lib.rs Auto merge of #42281 - eddyb:well-adjusted, r=nikomatsakis 2017-06-01 11:34:13 +00:00
span_utils.rs Refactor how spans are combined in the parser. 2017-03-29 11:17:59 +00:00