Skip to content

Commit 3092ac4

Browse files
author
Cengiz Can
committed
change note for patterns
1 parent 8b45a21 commit 3092ac4

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/librustc/traits/error_reporting.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
940940
if let Some(simple_name) = pattern.simple_name() {
941941
labels.push((pattern.span, format!("consider giving `{}` a type", simple_name)));
942942
} else {
943-
labels.push((pattern.span, format!("consider giving a type to pattern")));
943+
labels.push((pattern.span, format!("consider giving the pattern a type")));
944944
}
945945
}
946946

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ fn main() {
1616
let &v = new();
1717
//~^ ERROR type annotations needed [E0282]
1818
//~| NOTE cannot infer type for `_`
19-
//~| NOTE consider giving a type to pattern
19+
//~| NOTE consider giving the pattern a type
2020
}

src/test/compile-fail/issue-12187-2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ fn main() {
1616
let &v = new();
1717
//~^ ERROR type annotations needed [E0282]
1818
//~| NOTE cannot infer type for `_`
19-
//~| NOTE consider giving a type to pattern
19+
//~| NOTE consider giving the pattern a type
2020
}

src/test/ui/type-check/cannot_infer_local_or_vec_in_tuples.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0282]: type annotations needed
44
12 | let (x, ) = (vec![], );
55
| ----- ^^^^^^ cannot infer type for `T`
66
| |
7-
| consider giving a type to pattern
7+
| consider giving the pattern a type
88
|
99
= note: this error originates in a macro outside of the current crate
1010

0 commit comments

Comments
 (0)