Skip to content

Commit eb35039

Browse files
committed
Change 'must' to 'should' in non_camel_case_types message
1 parent 5e9d38e commit eb35039

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

src/rustc/middle/lint.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ fn get_lint_dict() -> lint_dict {
156156

157157
(~"non_camel_case_types",
158158
@{lint: non_camel_case_types,
159-
desc: ~"types, variants and traits must have camel case names",
159+
desc: ~"types, variants and traits should have camel case names",
160160
default: warn}),
161161

162162
(~"managed_heap_memory",
@@ -605,7 +605,8 @@ fn check_item_non_camel_case_types(cx: ty::ctxt, it: @ast::item) {
605605
if !is_camel_case(cx, ident) {
606606
cx.sess.span_lint(
607607
non_camel_case_types, expr_id, item_id, span,
608-
~"type, variant, or trait must be camel case");
608+
~"type, variant, or trait should have \
609+
a camel case identifier");
609610
}
610611
}
611612

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
#[forbid(non_camel_case_types)];
22

3-
struct foo { //~ ERROR type, variant, or trait must be camel case
3+
struct foo { //~ ERROR type, variant, or trait should have a camel case identifier
44
bar: int,
55
}
66

7-
enum foo2 { //~ ERROR type, variant, or trait must be camel case
7+
enum foo2 { //~ ERROR type, variant, or trait should have a camel case identifier
88
Bar
99
}
1010

11-
struct foo3 { //~ ERROR type, variant, or trait must be camel case
11+
struct foo3 { //~ ERROR type, variant, or trait should have a camel case identifier
1212
bar: int
1313
}
1414

15-
type foo4 = int; //~ ERROR type, variant, or trait must be camel case
15+
type foo4 = int; //~ ERROR type, variant, or trait should have a camel case identifier
1616

1717
enum Foo5 {
18-
bar //~ ERROR type, variant, or trait must be camel case
18+
bar //~ ERROR type, variant, or trait should have a camel case identifier
1919
}
2020

21-
trait foo6 { //~ ERROR type, variant, or trait must be camel case
21+
trait foo6 { //~ ERROR type, variant, or trait should have a camel case identifier
2222
}
2323

2424
fn main() { }

0 commit comments

Comments
 (0)