diff options
| author | bors <bors@rust-lang.org> | 2014-11-17 20:37:19 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-11-17 20:37:19 +0000 |
| commit | 336349c93207d792587eb0b5258b29da6ec0db8a (patch) | |
| tree | 1b4b1c0298399f1d57a0fce546f8b63cbb2d7217 /src/libsyntax | |
| parent | f09279395b6ca40f1398277971586197f949738a (diff) | |
| parent | 99fbd34d7e60faf99afd5065eb55c4fc19af87ec (diff) | |
| download | rust-336349c93207d792587eb0b5258b29da6ec0db8a.tar.gz rust-336349c93207d792587eb0b5258b29da6ec0db8a.zip | |
auto merge of #18694 : nikomatsakis/rust/issue-18208-method-dispatch-2, r=nrc
This is a pretty major refactoring of the method dispatch infrastructure. It is intended to avoid gross inefficiencies and enable caching and other optimizations (e.g. #17995), though it itself doesn't seem to execute particularly faster yet. It also solves some cases where we were failing to resolve methods that we theoretically should have succeeded with. Fixes #18674. cc #18208
Diffstat (limited to 'src/libsyntax')
| -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 } |
