diff options
| author | klutzy <klutzytheklutzy@gmail.com> | 2013-09-26 22:44:45 +0900 |
|---|---|---|
| committer | klutzy <klutzytheklutzy@gmail.com> | 2013-09-26 22:48:21 +0900 |
| commit | fc44a9c7dd7203315a47b307c774d22f89d864be (patch) | |
| tree | a6e2ffa9f278d7a1fa811bdbb091ed8777990f1c /src/libsyntax/parse | |
| parent | a56e2eecf5db674be7650ddefb14d97b39a7df67 (diff) | |
| download | rust-fc44a9c7dd7203315a47b307c774d22f89d864be.tar.gz rust-fc44a9c7dd7203315a47b307c774d22f89d864be.zip | |
syntax: Fix wrong span on trait fn visibility
Fixes #9348.
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 10393fc8624..e604384c259 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -922,6 +922,7 @@ impl Parser { let attrs = p.parse_outer_attributes(); let lo = p.span.lo; + let vis_span = *self.span; let vis = p.parse_visibility(); let pur = p.parse_fn_purity(); // NB: at the moment, trait methods are public by default; this @@ -947,7 +948,7 @@ impl Parser { // NB: at the moment, visibility annotations on required // methods are ignored; this could change. if vis != ast::inherited { - self.obsolete(*self.last_span, + self.obsolete(vis_span, ObsoleteTraitFuncVisibility); } required(TypeMethod { |
