]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #32293 - nikomatsakis:incr-comp-def-path-munging, r=alexcrichton
authorbors <bors@rust-lang.org>
Sat, 26 Mar 2016 01:09:28 +0000 (18:09 -0700)
committerbors <bors@rust-lang.org>
Sat, 26 Mar 2016 01:09:28 +0000 (18:09 -0700)
Revamp symbol names for impls (and make them deterministic, etc)

This builds on @michaelwoerister's epic PR #31539 (note that his PR never landed, so I just incorporated it into this one). The main change here is that we remove the "name" from `DefPathData` for impls, since that name is synthetic and not sufficiently predictable for incr comp. However, just doing that would cause bad symbol names since those are based on the `DefPath`. Therefore, I introduce a new mechanism for getting symbol names (and also paths for user display) called `item_path`. This is kind of simplistic for now (based on strings) but I expect to expand it later to support richer types, hopefully generating C++-mangled names that gdb etc can understand. Along the way I cleaned up how we track the path that leads to an extern crate.

There is still some cleanup left undone here. Notably, I didn't remove the impl names altogether -- that would probably make sense. I also didn't try to remove the `item_symbols` vector. Mostly I want to unblock my other incr. comp. work. =)

r? @eddyb
cc @eddyb @alexcrichton @michaelwoerister


Trivial merge