syntax: fix span for obsolete extern visibility error
This commit is contained in:
parent
5109ce691c
commit
2a18c29d67
2 changed files with 11 additions and 1 deletions
|
@ -4196,7 +4196,7 @@ impl Parser {
|
||||||
|
|
||||||
// Do not allow visibility to be specified.
|
// Do not allow visibility to be specified.
|
||||||
if visibility != ast::inherited {
|
if visibility != ast::inherited {
|
||||||
self.obsolete(*self.span, ObsoleteExternVisibility);
|
self.obsolete(*self.last_span, ObsoleteExternVisibility);
|
||||||
}
|
}
|
||||||
|
|
||||||
let abis = opt_abis.get_or_default(AbiSet::C());
|
let abis = opt_abis.get_or_default(AbiSet::C());
|
||||||
|
|
|
@ -63,4 +63,14 @@ fn obsolete_moves() {
|
||||||
//~^ ERROR obsolete syntax: binary move
|
//~^ ERROR obsolete syntax: binary move
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern mod obsolete_name {
|
||||||
|
//~^ ERROR obsolete syntax: named external module
|
||||||
|
fn bar();
|
||||||
|
}
|
||||||
|
|
||||||
|
pub extern {
|
||||||
|
//~^ ERROR obsolete syntax: `pub extern`
|
||||||
|
pub fn bar();
|
||||||
|
}
|
||||||
|
|
||||||
fn main() { }
|
fn main() { }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue