diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2014-11-05 22:06:04 -0500 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2014-11-17 14:25:11 -0500 |
| commit | f8403aac81d5720bb722a85a9120c14ceb763eb9 (patch) | |
| tree | 510db4cf66cb0bd455cbf1775fbe9bf5041512a3 /src/libsyntax/ast_map | |
| parent | f09279395b6ca40f1398277971586197f949738a (diff) | |
| download | rust-f8403aac81d5720bb722a85a9120c14ceb763eb9.tar.gz rust-f8403aac81d5720bb722a85a9120c14ceb763eb9.zip | |
Rewrite method resolution to be cleaner, more correct, and to lay
groundwork for better performance. Key points: - Separate out determining which method to use from actually selecting a method (this should enable caching, as well as the pcwalton fast-reject strategy). - Merge the impl selection back into method resolution and don't rely on trait matching (this should perform better but also is needed to resolve some kind of conflicts, see e.g. `method-two-traits-distinguished-via-where-clause.rs`) - Purge a lot of out-of-date junk and coercions from method lookups.
Diffstat (limited to 'src/libsyntax/ast_map')
| -rw-r--r-- | src/libsyntax/ast_map/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/ast_map/mod.rs b/src/libsyntax/ast_map/mod.rs index 2a2ad9fd664..b116c84552e 100644 --- a/src/libsyntax/ast_map/mod.rs +++ b/src/libsyntax/ast_map/mod.rs @@ -544,7 +544,7 @@ impl<'ast> Map<'ast> { pub fn def_id_span(&self, def_id: DefId, fallback: Span) -> Span { if def_id.krate == LOCAL_CRATE { - self.span(def_id.node) + self.opt_span(def_id.node).unwrap_or(fallback) } else { fallback } |
