We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e721194 + 2a18c29 commit ed20fccCopy full SHA for ed20fcc
src/libsyntax/parse/parser.rs
@@ -4196,7 +4196,7 @@ impl Parser {
4196
4197
// Do not allow visibility to be specified.
4198
if visibility != ast::inherited {
4199
- self.obsolete(*self.span, ObsoleteExternVisibility);
+ self.obsolete(*self.last_span, ObsoleteExternVisibility);
4200
}
4201
4202
let abis = opt_abis.get_or_default(AbiSet::C());
src/test/compile-fail/obsolete-syntax.rs
@@ -63,4 +63,14 @@ fn obsolete_moves() {
63
//~^ ERROR obsolete syntax: binary move
64
65
66
+extern mod obsolete_name {
67
+ //~^ ERROR obsolete syntax: named external module
68
+ fn bar();
69
+}
70
+
71
+pub extern {
72
+ //~^ ERROR obsolete syntax: `pub extern`
73
+ pub fn bar();
74
75
76
fn main() { }
0 commit comments