Skip to content

Commit 28cea50

Browse files
committed
Update error code numbers
1 parent d4bfae1 commit 28cea50

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

src/libsyntax/diagnostic_list.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,6 @@ register_diagnostics! {
397397
E0630, // rustc_const_unstable attribute must be paired with stable/unstable attribute
398398
E0693, // incorrect `repr(align)` attribute format
399399
E0694, // an unknown tool name found in scoped attributes
400-
E0697, // invalid ABI
401-
E0698, // incorrect visibility restriction
400+
E0703, // invalid ABI
401+
E0704, // incorrect visibility restriction
402402
}

src/libsyntax/parse/parser.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -6000,7 +6000,7 @@ impl<'a> Parser<'a> {
60006000
let sp = self.prev_span;
60016001
let help_msg = format!("make this visible only to module `{}` with `in`", path);
60026002
self.expect(&token::CloseDelim(token::Paren))?; // `)`
6003-
let mut err = struct_span_err!(self.sess.span_diagnostic, sp, E0698, "{}", msg);
6003+
let mut err = struct_span_err!(self.sess.span_diagnostic, sp, E0704, "{}", msg);
60046004
err.help(suggestion);
60056005
err.span_suggestion_with_applicability(
60066006
sp, &help_msg, format!("in {}", path), Applicability::MachineApplicable
@@ -6550,7 +6550,7 @@ impl<'a> Parser<'a> {
65506550
let mut err = struct_span_err!(
65516551
self.sess.span_diagnostic,
65526552
prev_span,
6553-
E0697,
6553+
E0703,
65546554
"invalid ABI: found `{}`",
65556555
s);
65566556
err.span_label(prev_span, "invalid ABI");
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0697]: invalid ABI: found `路濫狼á́́`
1+
error[E0703]: invalid ABI: found `路濫狼á́́`
22
--> $DIR/unicode.rs:11:8
33
|
44
LL | extern "路濫狼á́́" fn foo() {} //~ ERROR invalid ABI
@@ -8,4 +8,4 @@ LL | extern "路濫狼á́́" fn foo() {} //~ ERROR invalid ABI
88

99
error: aborting due to previous error
1010

11-
For more information about this error, try `rustc --explain E0697`.
11+
For more information about this error, try `rustc --explain E0703`.

src/test/ui/pub/pub-restricted.stderr

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0698]: incorrect visibility restriction
1+
error[E0704]: incorrect visibility restriction
22
--> $DIR/pub-restricted.rs:15:6
33
|
44
LL | pub (a) fn afn() {} //~ incorrect visibility restriction
@@ -9,7 +9,7 @@ LL | pub (a) fn afn() {} //~ incorrect visibility restriction
99
`pub(super)`: visible only in the current module's parent
1010
`pub(in path::to::module)`: visible only on the specified path
1111

12-
error[E0698]: incorrect visibility restriction
12+
error[E0704]: incorrect visibility restriction
1313
--> $DIR/pub-restricted.rs:16:6
1414
|
1515
LL | pub (b) fn bfn() {} //~ incorrect visibility restriction
@@ -20,7 +20,7 @@ LL | pub (b) fn bfn() {} //~ incorrect visibility restriction
2020
`pub(super)`: visible only in the current module's parent
2121
`pub(in path::to::module)`: visible only on the specified path
2222

23-
error[E0698]: incorrect visibility restriction
23+
error[E0704]: incorrect visibility restriction
2424
--> $DIR/pub-restricted.rs:32:14
2525
|
2626
LL | pub (a) invalid: usize, //~ incorrect visibility restriction
@@ -31,7 +31,7 @@ LL | pub (a) invalid: usize, //~ incorrect visibility restriction
3131
`pub(super)`: visible only in the current module's parent
3232
`pub(in path::to::module)`: visible only on the specified path
3333

34-
error[E0698]: incorrect visibility restriction
34+
error[E0704]: incorrect visibility restriction
3535
--> $DIR/pub-restricted.rs:41:6
3636
|
3737
LL | pub (xyz) fn xyz() {} //~ incorrect visibility restriction
@@ -50,4 +50,4 @@ LL | pub (in x) non_parent_invalid: usize, //~ ERROR visibilities can on
5050

5151
error: aborting due to 5 previous errors
5252

53-
For more information about this error, try `rustc --explain E0698`.
53+
For more information about this error, try `rustc --explain E0704`.

0 commit comments

Comments
 (0)