Skip to content

Commit 432adc6

Browse files
committed
Adjust some error messages to start with a lowercase letter and not finish with a full stop
1 parent dbbb722 commit 432adc6

23 files changed

+68
-68
lines changed

src/librustc/middle/resolve.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3239,7 +3239,7 @@ impl<'a> Resolver<'a> {
32393239
segment_name),
32403240
}
32413241
} else {
3242-
format!("Could not find `{}` in `{}`.",
3242+
format!("Could not find `{}` in `{}`",
32433243
segment_name,
32443244
module_name)
32453245
};
@@ -4744,7 +4744,7 @@ impl<'a> Resolver<'a> {
47444744
Some(&DefMod(_)) => {
47454745
self.resolve_error(path.span, "inherent implementations are not \
47464746
allowed for types not defined in \
4747-
the current module.");
4747+
the current module");
47484748
}
47494749
_ => {}
47504750
}
@@ -5843,12 +5843,12 @@ impl<'a> Resolver<'a> {
58435843
};
58445844

58455845
if msg.len() > 0 {
5846-
msg = format!(" Did you mean {}?", msg)
5846+
msg = format!(". Did you mean {}?", msg)
58475847
}
58485848

58495849
self.resolve_error(
58505850
expr.span,
5851-
format!("unresolved name `{}`.{}",
5851+
format!("unresolved name `{}`{}",
58525852
wrong_name,
58535853
msg).as_slice());
58545854
}

src/librustc/middle/typeck/collect.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ impl<'a, 'tcx> AstConv<'tcx> for CrateCtxt<'a, 'tcx> {
184184

185185
fn ty_infer(&self, span: Span) -> Ty<'tcx> {
186186
span_err!(self.tcx.sess, span, E0121,
187-
"the type placeholder `_` is not allowed within types on item signatures.");
187+
"the type placeholder `_` is not allowed within types on item signatures");
188188
ty::mk_err()
189189
}
190190

@@ -1715,7 +1715,7 @@ fn add_unsized_bound<'tcx,AC>(this: &AC,
17151715
the given bound is not \
17161716
a default. \
17171717
Only `Sized?` is \
1718-
supported.",
1718+
supported",
17191719
desc).as_slice());
17201720
ty::try_add_builtin_trait(this.tcx(),
17211721
kind_id,

src/librustc/middle/typeck/infer/error_reporting.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1648,15 +1648,15 @@ impl<'a, 'tcx> ErrorReportingHelpers<'tcx> for InferCtxt<'a, 'tcx> {
16481648
self.tcx.sess.span_note(
16491649
span,
16501650
format!("...so that the type `{}` \
1651-
will meet the declared lifetime bounds.",
1651+
will meet the declared lifetime bounds",
16521652
self.ty_to_string(t)).as_slice());
16531653
}
16541654
infer::RelateDefaultParamBound(span, t) => {
16551655
self.tcx.sess.span_note(
16561656
span,
16571657
format!("...so that type parameter \
16581658
instantiated with `{}`, \
1659-
will meet its declared lifetime bounds.",
1659+
will meet its declared lifetime bounds",
16601660
self.ty_to_string(t)).as_slice());
16611661
}
16621662
infer::RelateRegionParamBound(span) => {

src/libsyntax/ext/asm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ pub fn expand_asm<'cx>(cx: &'cx mut ExtCtxt, sp: Span, tts: &[ast::TokenTree])
6464
match state {
6565
Asm => {
6666
let (s, style) = match expr_to_string(cx, p.parse_expr(),
67-
"inline assembly must be a string literal.") {
67+
"inline assembly must be a string literal") {
6868
Some((s, st)) => (s, st),
6969
// let compilation continue
7070
None => return DummyResult::expr(sp),

src/libsyntax/parse/attr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ impl<'a> ParserAttr for Parser<'a> {
9999

100100
if permit_inner && self.eat(&token::Semi) {
101101
self.span_warn(span, "this inner attribute syntax is deprecated. \
102-
The new syntax is `#![foo]`, with a bang and no semicolon.");
102+
The new syntax is `#![foo]`, with a bang and no semicolon");
103103
style = ast::AttrInner;
104104
}
105105

src/libsyntax/parse/lexer/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ impl<'a> StringReader<'a> {
809809
self.span_diagnostic.span_help(
810810
sp,
811811
"this is an isolated carriage return; consider checking \
812-
your editor and version control settings.")
812+
your editor and version control settings")
813813
}
814814
false
815815
}

src/test/compile-fail-fulldeps/phase-syntax-doesnt-resolve.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ extern crate macro_crate_test;
2020
fn main() {
2121
macro_crate_test::foo();
2222
//~^ ERROR failed to resolve. Use of undeclared module `macro_crate_test`
23-
//~^^ ERROR unresolved name `macro_crate_test::foo`.
23+
//~^^ ERROR unresolved name `macro_crate_test::foo`
2424
}

src/test/compile-fail/does-nothing.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// error-pattern: unresolved name `this_does_nothing_what_the`.
11+
// error-pattern: unresolved name `this_does_nothing_what_the`
1212
fn main() { println!("doing"); this_does_nothing_what_the; println!("boing"); }

src/test/compile-fail/import2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
use baz::zed::bar;
12-
//~^ ERROR unresolved import `baz::zed::bar`. Could not find `zed` in `baz`.
12+
//~^ ERROR unresolved import `baz::zed::bar`. Could not find `zed` in `baz`
1313

1414

1515
mod baz {}

src/test/compile-fail/issue-1476.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
// except according to those terms.
1010

1111
fn main() {
12-
println!("{}", x); //~ ERROR unresolved name `x`.
12+
println!("{}", x); //~ ERROR unresolved name `x`
1313
}

src/test/compile-fail/issue-2281-part1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// error-pattern: unresolved name `foobar`.
11+
// error-pattern: unresolved name `foobar`
1212

1313
fn main() { println!("{}", foobar); }

src/test/compile-fail/issue-2356.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ impl MaybeDog {
2525
fn bark() {
2626
// If this provides a suggestion, it's a bug as MaybeDog doesn't impl Groom
2727
shave();
28-
//~^ ERROR: unresolved name `shave`.
28+
//~^ ERROR: unresolved name `shave`
2929
}
3030
}
3131

@@ -67,7 +67,7 @@ impl cat {
6767
grow_older();
6868
//~^ ERROR: unresolved name `grow_older`. Did you mean to call `cat::grow_older`
6969
shave();
70-
//~^ ERROR: unresolved name `shave`.
70+
//~^ ERROR: unresolved name `shave`
7171
}
7272

7373
fn burn_whiskers(&mut self) {
@@ -85,6 +85,6 @@ impl cat {
8585

8686
fn main() {
8787
self += 1;
88-
//~^ ERROR: unresolved name `self`.
88+
//~^ ERROR: unresolved name `self`
8989
// it's a bug if this suggests a missing `self` as we're not in a method
9090
}

src/test/compile-fail/issue-3021-b.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fn siphash(k0 : u64) {
1717
impl siphash {
1818
pub fn reset(&mut self) {
1919
self.v0 = k0 ^ 0x736f6d6570736575; //~ ERROR can't capture dynamic environment
20-
//~^ ERROR unresolved name `k0`.
20+
//~^ ERROR unresolved name `k0`
2121
}
2222
}
2323
}

src/test/compile-fail/issue-3021-d.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ fn siphash(k0 : u64, k1 : u64) -> siphash {
2929
impl siphash for SipState {
3030
fn reset(&self) {
3131
self.v0 = k0 ^ 0x736f6d6570736575; //~ ERROR can't capture dynamic environment
32-
//~^ ERROR unresolved name `k0`.
32+
//~^ ERROR unresolved name `k0`
3333
self.v1 = k1 ^ 0x646f72616e646f6d; //~ ERROR can't capture dynamic environment
34-
//~^ ERROR unresolved name `k1`.
34+
//~^ ERROR unresolved name `k1`
3535
}
3636
fn result(&self) -> u64 { return mk_result(self); }
3737
}

src/test/compile-fail/issue-3021.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ fn siphash(k0 : u64) -> SipHash {
2020
impl SipHash for SipState {
2121
fn reset(&self) {
2222
self.v0 = k0 ^ 0x736f6d6570736575; //~ ERROR can't capture dynamic environment
23-
//~^ ERROR unresolved name `k0`.
23+
//~^ ERROR unresolved name `k0`
2424
}
2525
}
2626
panic!();

src/test/compile-fail/issue-7607-1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ struct Foo {
1414
x: int
1515
}
1616

17-
impl Fo { //~ERROR inherent implementations are not allowed for types not defined in the current module.
17+
impl Fo { //~ERROR inherent implementations are not allowed for types not defined in the current module
1818
fn foo() {}
1919
}
2020

src/test/compile-fail/issue-8767.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// ignore-tidy-linelength
1212

13-
impl B { //~ERROR inherent implementations are not allowed for types not defined in the current module.
13+
impl B { //~ERROR inherent implementations are not allowed for types not defined in the current module
1414
}
1515

1616
fn main() {

src/test/compile-fail/match-join.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ fn my_panic() -> ! { panic!(); }
1616
fn main() {
1717
match true { false => { my_panic(); } true => { } }
1818

19-
println!("{}", x); //~ ERROR unresolved name `x`.
19+
println!("{}", x); //~ ERROR unresolved name `x`
2020
let x: int;
2121
}

src/test/compile-fail/privacy-ns1.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub mod foo1 {
2828
fn test_glob1() {
2929
use foo1::*;
3030

31-
Bar(); //~ ERROR unresolved name `Bar`.
31+
Bar(); //~ ERROR unresolved name `Bar`
3232
}
3333

3434
// private type, public value
@@ -58,7 +58,7 @@ pub mod foo3 {
5858
fn test_glob3() {
5959
use foo3::*;
6060

61-
Bar(); //~ ERROR unresolved name `Bar`.
61+
Bar(); //~ ERROR unresolved name `Bar`
6262
let _x: Box<Bar>; //~ ERROR use of undeclared type name `Bar`
6363
}
6464

src/test/compile-fail/test-cfg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
fn foo() {}
1515

1616
fn main() {
17-
foo(); //~ ERROR unresolved name `foo`.
17+
foo(); //~ ERROR unresolved name `foo`
1818
}

src/test/compile-fail/trait-or-new-type-instead.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// ignore-tidy-linelength
1212

13-
impl<T> Option<T> { //~ERROR inherent implementations are not allowed for types not defined in the current module.
13+
impl<T> Option<T> { //~ERROR inherent implementations are not allowed for types not defined in the current module
1414
pub fn foo(&self) { }
1515
}
1616

src/test/compile-fail/typeck_type_placeholder_item.rs

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,108 +12,108 @@
1212
// inference by using the `_` type placeholder.
1313

1414
fn test() -> _ { 5 }
15-
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures.
15+
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
1616

1717
fn test2() -> (_, _) { (5u, 5u) }
18-
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures.
19-
//~^^ ERROR the type placeholder `_` is not allowed within types on item signatures.
18+
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
19+
//~^^ ERROR the type placeholder `_` is not allowed within types on item signatures
2020

2121
static TEST3: _ = "test";
22-
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures.
22+
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
2323

2424
static TEST4: _ = 145u16;
25-
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures.
25+
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
2626

2727
static TEST5: (_, _) = (1, 2);
28-
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures.
29-
//~^^ ERROR the type placeholder `_` is not allowed within types on item signatures.
28+
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
29+
//~^^ ERROR the type placeholder `_` is not allowed within types on item signatures
3030

3131
fn test6(_: _) { }
32-
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures.
32+
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
3333

3434
fn test7(x: _) { let _x: uint = x; }
35-
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures.
35+
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
3636

3737
fn test8(_f: fn() -> _) { }
38-
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures.
38+
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
3939

4040
struct Test9;
4141

4242
impl Test9 {
4343
fn test9(&self) -> _ { () }
44-
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures.
44+
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
4545

4646
fn test10(&self, _x : _) { }
47-
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures.
47+
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
4848
}
4949

5050
impl Clone for Test9 {
5151
fn clone(&self) -> _ { Test9 }
52-
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures.
52+
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
5353

5454
fn clone_from(&mut self, other: _) { *self = Test9; }
55-
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures.
55+
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
5656
}
5757

5858
struct Test10 {
5959
a: _,
60-
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures.
60+
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
6161
b: (_, _),
62-
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures.
63-
//~^^ ERROR the type placeholder `_` is not allowed within types on item signatures.
62+
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
63+
//~^^ ERROR the type placeholder `_` is not allowed within types on item signatures
6464
}
6565

6666
pub fn main() {
6767
fn fn_test() -> _ { 5 }
68-
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures.
68+
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
6969

7070
fn fn_test2() -> (_, _) { (5u, 5u) }
71-
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures.
72-
//~^^ ERROR the type placeholder `_` is not allowed within types on item signatures.
71+
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
72+
//~^^ ERROR the type placeholder `_` is not allowed within types on item signatures
7373

7474
static FN_TEST3: _ = "test";
75-
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures.
75+
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
7676

7777
static FN_TEST4: _ = 145u16;
78-
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures.
78+
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
7979

8080
static FN_TEST5: (_, _) = (1, 2);
81-
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures.
82-
//~^^ ERROR the type placeholder `_` is not allowed within types on item signatures.
81+
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
82+
//~^^ ERROR the type placeholder `_` is not allowed within types on item signatures
8383

8484
fn fn_test6(_: _) { }
85-
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures.
85+
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
8686

8787
fn fn_test7(x: _) { let _x: uint = x; }
88-
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures.
88+
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
8989

9090
fn fn_test8(_f: fn() -> _) { }
91-
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures.
91+
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
9292

9393
struct FnTest9;
9494

9595
impl FnTest9 {
9696
fn fn_test9(&self) -> _ { () }
97-
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures.
97+
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
9898

9999
fn fn_test10(&self, _x : _) { }
100-
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures.
100+
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
101101
}
102102

103103
impl Clone for FnTest9 {
104104
fn clone(&self) -> _ { FnTest9 }
105-
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures.
105+
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
106106

107107
fn clone_from(&mut self, other: _) { *self = FnTest9; }
108-
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures.
108+
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
109109
}
110110

111111
struct FnTest10 {
112112
a: _,
113-
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures.
113+
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
114114
b: (_, _),
115-
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures.
116-
//~^^ ERROR the type placeholder `_` is not allowed within types on item signatures.
115+
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures
116+
//~^^ ERROR the type placeholder `_` is not allowed within types on item signatures
117117
}
118118

119119
}

0 commit comments

Comments
 (0)