Skip to content

Commit

Permalink
review comments: reword
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Jan 5, 2023
1 parent 98f3936 commit b182259
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_hir_typeck/src/demand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
err.span_label(
arg.span,
&format!(
"this is of type `{arg_ty}`, which makes `{ident}` to be \
"this is of type `{arg_ty}`, which causes `{ident}` to be \
inferred as `{ty}`",
),
);
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/type/type-check/point-at-inference-3.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
fn main() {
let mut v = Vec::new();
v.push(0i32);
//~^ NOTE this is of type `i32`, which makes `v` to be inferred as `Vec<i32>`
//~^ NOTE this is of type `i32`, which causes `v` to be inferred as `Vec<i32>`
v.push(0);
v.push(1i32); //~ ERROR mismatched types
//~^ NOTE expected `i32`, found `u32`
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/type/type-check/point-at-inference-3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
fn main() {
let mut v = Vec::new();
v.push(0i32);
//~^ NOTE this is of type `i32`, which makes `v` to be inferred as `Vec<i32>`
//~^ NOTE this is of type `i32`, which causes `v` to be inferred as `Vec<i32>`
v.push(0);
v.push(1u32); //~ ERROR mismatched types
//~^ NOTE expected `i32`, found `u32`
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/type/type-check/point-at-inference-3.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error[E0308]: mismatched types
--> $DIR/point-at-inference-3.rs:7:12
|
LL | v.push(0i32);
| ---- this is of type `i32`, which makes `v` to be inferred as `Vec<i32>`
| ---- this is of type `i32`, which causes `v` to be inferred as `Vec<i32>`
...
LL | v.push(1u32);
| ---- ^^^^ expected `i32`, found `u32`
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/type/type-check/point-at-inference.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error[E0308]: mismatched types
--> $DIR/point-at-inference.rs:12:9
|
LL | foo.push(i);
| - this is of type `&{integer}`, which makes `foo` to be inferred as `Vec<&{integer}>`
| - this is of type `&{integer}`, which causes `foo` to be inferred as `Vec<&{integer}>`
...
LL | bar(foo);
| --- ^^^ expected `i32`, found `&{integer}`
Expand Down

0 comments on commit b182259

Please sign in to comment.