From b182259d391a033a3a7017a7be7d5494405fc8e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Thu, 5 Jan 2023 01:26:44 +0000 Subject: [PATCH] review comments: reword --- compiler/rustc_hir_typeck/src/demand.rs | 2 +- src/test/ui/type/type-check/point-at-inference-3.fixed | 2 +- src/test/ui/type/type-check/point-at-inference-3.rs | 2 +- src/test/ui/type/type-check/point-at-inference-3.stderr | 2 +- src/test/ui/type/type-check/point-at-inference.stderr | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler/rustc_hir_typeck/src/demand.rs b/compiler/rustc_hir_typeck/src/demand.rs index 06f34abbea26b..6cf515cbb0adc 100644 --- a/compiler/rustc_hir_typeck/src/demand.rs +++ b/compiler/rustc_hir_typeck/src/demand.rs @@ -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}`", ), ); diff --git a/src/test/ui/type/type-check/point-at-inference-3.fixed b/src/test/ui/type/type-check/point-at-inference-3.fixed index ff299940a5766..870f2779b8c48 100644 --- a/src/test/ui/type/type-check/point-at-inference-3.fixed +++ b/src/test/ui/type/type-check/point-at-inference-3.fixed @@ -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` + //~^ NOTE this is of type `i32`, which causes `v` to be inferred as `Vec` v.push(0); v.push(1i32); //~ ERROR mismatched types //~^ NOTE expected `i32`, found `u32` diff --git a/src/test/ui/type/type-check/point-at-inference-3.rs b/src/test/ui/type/type-check/point-at-inference-3.rs index 812a39e4aaf33..a4471e12fc2af 100644 --- a/src/test/ui/type/type-check/point-at-inference-3.rs +++ b/src/test/ui/type/type-check/point-at-inference-3.rs @@ -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` + //~^ NOTE this is of type `i32`, which causes `v` to be inferred as `Vec` v.push(0); v.push(1u32); //~ ERROR mismatched types //~^ NOTE expected `i32`, found `u32` diff --git a/src/test/ui/type/type-check/point-at-inference-3.stderr b/src/test/ui/type/type-check/point-at-inference-3.stderr index 4e77796946691..c373c6722fdd7 100644 --- a/src/test/ui/type/type-check/point-at-inference-3.stderr +++ b/src/test/ui/type/type-check/point-at-inference-3.stderr @@ -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` + | ---- this is of type `i32`, which causes `v` to be inferred as `Vec` ... LL | v.push(1u32); | ---- ^^^^ expected `i32`, found `u32` diff --git a/src/test/ui/type/type-check/point-at-inference.stderr b/src/test/ui/type/type-check/point-at-inference.stderr index 197511bf64ef2..70428fe841b9c 100644 --- a/src/test/ui/type/type-check/point-at-inference.stderr +++ b/src/test/ui/type/type-check/point-at-inference.stderr @@ -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}`