diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/mismatched_types/E0053.rs (renamed from src/test/ui/mismatched_types/E0053.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/E0053.stderr (renamed from src/test/ui/mismatched_types/E0053.stderr) | 8 | ||||
-rw-r--r-- | tests/ui/mismatched_types/E0409.rs (renamed from src/test/ui/mismatched_types/E0409.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/E0409.stderr (renamed from src/test/ui/mismatched_types/E0409.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/E0631.rs (renamed from src/test/ui/mismatched_types/E0631.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/E0631.stderr (renamed from src/test/ui/mismatched_types/E0631.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/abridged.rs (renamed from src/test/ui/mismatched_types/abridged.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/abridged.stderr (renamed from src/test/ui/mismatched_types/abridged.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/assignment-operator-unimplemented.rs (renamed from src/test/ui/mismatched_types/assignment-operator-unimplemented.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/assignment-operator-unimplemented.stderr (renamed from src/test/ui/mismatched_types/assignment-operator-unimplemented.stderr) | 5 | ||||
-rw-r--r-- | tests/ui/mismatched_types/binops.rs (renamed from src/test/ui/mismatched_types/binops.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/binops.stderr (renamed from src/test/ui/mismatched_types/binops.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/cast-rfc0401.rs (renamed from src/test/ui/mismatched_types/cast-rfc0401.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/cast-rfc0401.stderr (renamed from src/test/ui/mismatched_types/cast-rfc0401.stderr) | 10 | ||||
-rw-r--r-- | tests/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.fixed (renamed from src/test/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.fixed) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.rs (renamed from src/test/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.stderr (renamed from src/test/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/closure-arg-count.rs (renamed from src/test/ui/mismatched_types/closure-arg-count.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/closure-arg-count.stderr (renamed from src/test/ui/mismatched_types/closure-arg-count.stderr) | 12 | ||||
-rw-r--r-- | tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.fixed | 5 | ||||
-rw-r--r-- | tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.rs | 5 | ||||
-rw-r--r-- | tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.stderr | 38 | ||||
-rw-r--r-- | tests/ui/mismatched_types/closure-arg-type-mismatch.rs (renamed from src/test/ui/mismatched_types/closure-arg-type-mismatch.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/closure-arg-type-mismatch.stderr (renamed from src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr) | 11 | ||||
-rw-r--r-- | tests/ui/mismatched_types/closure-mismatch.rs (renamed from src/test/ui/mismatched_types/closure-mismatch.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/closure-mismatch.stderr (renamed from src/test/ui/mismatched_types/closure-mismatch.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/const-fn-in-trait.rs (renamed from src/test/ui/mismatched_types/const-fn-in-trait.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/const-fn-in-trait.stderr (renamed from src/test/ui/mismatched_types/const-fn-in-trait.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/do-not-suggest-boxed-trait-objects-instead-of-impl-trait.rs (renamed from src/test/ui/mismatched_types/do-not-suggest-boxed-trait-objects-instead-of-impl-trait.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/do-not-suggest-boxed-trait-objects-instead-of-impl-trait.stderr (renamed from src/test/ui/mismatched_types/do-not-suggest-boxed-trait-objects-instead-of-impl-trait.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/dont-point-return-on-E0308.rs (renamed from src/test/ui/mismatched_types/dont-point-return-on-E0308.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/dont-point-return-on-E0308.stderr (renamed from src/test/ui/mismatched_types/dont-point-return-on-E0308.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/float-literal-inference-restrictions.rs (renamed from src/test/ui/mismatched_types/float-literal-inference-restrictions.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/float-literal-inference-restrictions.stderr (renamed from src/test/ui/mismatched_types/float-literal-inference-restrictions.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/fn-variance-1.rs (renamed from src/test/ui/mismatched_types/fn-variance-1.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/fn-variance-1.stderr (renamed from src/test/ui/mismatched_types/fn-variance-1.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/for-loop-has-unit-body.rs (renamed from src/test/ui/mismatched_types/for-loop-has-unit-body.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/for-loop-has-unit-body.stderr (renamed from src/test/ui/mismatched_types/for-loop-has-unit-body.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/issue-106182.fixed | 14 | ||||
-rw-r--r-- | tests/ui/mismatched_types/issue-106182.rs | 14 | ||||
-rw-r--r-- | tests/ui/mismatched_types/issue-106182.stderr | 18 | ||||
-rw-r--r-- | tests/ui/mismatched_types/issue-19109.rs (renamed from src/test/ui/mismatched_types/issue-19109.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/issue-19109.stderr (renamed from src/test/ui/mismatched_types/issue-19109.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/issue-26480.rs (renamed from src/test/ui/mismatched_types/issue-26480.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/issue-26480.stderr (renamed from src/test/ui/mismatched_types/issue-26480.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/issue-35030.rs (renamed from src/test/ui/mismatched_types/issue-35030.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/issue-35030.stderr | 26 | ||||
-rw-r--r-- | tests/ui/mismatched_types/issue-36053-2.rs (renamed from src/test/ui/mismatched_types/issue-36053-2.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/issue-36053-2.stderr (renamed from src/test/ui/mismatched_types/issue-36053-2.stderr) | 15 | ||||
-rw-r--r-- | tests/ui/mismatched_types/issue-38371-unfixable.rs (renamed from src/test/ui/mismatched_types/issue-38371-unfixable.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/issue-38371-unfixable.stderr (renamed from src/test/ui/mismatched_types/issue-38371-unfixable.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/issue-38371.fixed (renamed from src/test/ui/mismatched_types/issue-38371.fixed) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/issue-38371.rs (renamed from src/test/ui/mismatched_types/issue-38371.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/issue-38371.stderr (renamed from src/test/ui/mismatched_types/issue-38371.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/issue-47706-trait.rs (renamed from src/test/ui/mismatched_types/issue-47706-trait.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/issue-47706-trait.stderr (renamed from src/test/ui/mismatched_types/issue-47706-trait.stderr) | 3 | ||||
-rw-r--r-- | tests/ui/mismatched_types/issue-47706.rs (renamed from src/test/ui/mismatched_types/issue-47706.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/issue-47706.stderr (renamed from src/test/ui/mismatched_types/issue-47706.stderr) | 3 | ||||
-rw-r--r-- | tests/ui/mismatched_types/issue-74918-missing-lifetime.rs (renamed from src/test/ui/mismatched_types/issue-74918-missing-lifetime.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/issue-74918-missing-lifetime.stderr (renamed from src/test/ui/mismatched_types/issue-74918-missing-lifetime.stderr) | 10 | ||||
-rw-r--r-- | tests/ui/mismatched_types/issue-75361-mismatched-impl.rs (renamed from src/test/ui/mismatched_types/issue-75361-mismatched-impl.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/issue-75361-mismatched-impl.stderr (renamed from src/test/ui/mismatched_types/issue-75361-mismatched-impl.stderr) | 4 | ||||
-rw-r--r-- | tests/ui/mismatched_types/issue-84976.rs (renamed from src/test/ui/mismatched_types/issue-84976.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/issue-84976.stderr (renamed from src/test/ui/mismatched_types/issue-84976.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/main.rs (renamed from src/test/ui/mismatched_types/main.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/main.stderr (renamed from src/test/ui/mismatched_types/main.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/method-help-unsatisfied-bound.rs (renamed from src/test/ui/mismatched_types/method-help-unsatisfied-bound.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/method-help-unsatisfied-bound.stderr | 18 | ||||
-rw-r--r-- | tests/ui/mismatched_types/non_zero_assigned_something.rs (renamed from src/test/ui/mismatched_types/non_zero_assigned_something.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/non_zero_assigned_something.stderr (renamed from src/test/ui/mismatched_types/non_zero_assigned_something.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/normalize-fn-sig.rs (renamed from src/test/ui/mismatched_types/normalize-fn-sig.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/normalize-fn-sig.stderr (renamed from src/test/ui/mismatched_types/normalize-fn-sig.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/numeric-literal-cast.rs (renamed from src/test/ui/mismatched_types/numeric-literal-cast.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/numeric-literal-cast.stderr (renamed from src/test/ui/mismatched_types/numeric-literal-cast.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/overloaded-calls-bad.rs (renamed from src/test/ui/mismatched_types/overloaded-calls-bad.rs) | 4 | ||||
-rw-r--r-- | tests/ui/mismatched_types/overloaded-calls-bad.stderr (renamed from src/test/ui/mismatched_types/overloaded-calls-bad.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/recovered-block.rs (renamed from src/test/ui/mismatched_types/recovered-block.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/recovered-block.stderr (renamed from src/test/ui/mismatched_types/recovered-block.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/ref-pat-suggestions.fixed (renamed from src/test/ui/mismatched_types/ref-pat-suggestions.fixed) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/ref-pat-suggestions.rs (renamed from src/test/ui/mismatched_types/ref-pat-suggestions.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/ref-pat-suggestions.stderr (renamed from src/test/ui/mismatched_types/ref-pat-suggestions.stderr) | 5 | ||||
-rw-r--r-- | tests/ui/mismatched_types/show_module.rs (renamed from src/test/ui/mismatched_types/show_module.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/show_module.stderr (renamed from src/test/ui/mismatched_types/show_module.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/similar_paths.rs (renamed from src/test/ui/mismatched_types/similar_paths.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/similar_paths.stderr (renamed from src/test/ui/mismatched_types/similar_paths.stderr) | 3 | ||||
-rw-r--r-- | tests/ui/mismatched_types/similar_paths_primitive.rs (renamed from src/test/ui/mismatched_types/similar_paths_primitive.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/similar_paths_primitive.stderr (renamed from src/test/ui/mismatched_types/similar_paths_primitive.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/suggest-adding-or-removing-ref-for-binding-pattern.fixed (renamed from src/test/ui/mismatched_types/suggest-adding-or-removing-ref-for-binding-pattern.fixed) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/suggest-adding-or-removing-ref-for-binding-pattern.rs (renamed from src/test/ui/mismatched_types/suggest-adding-or-removing-ref-for-binding-pattern.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/suggest-adding-or-removing-ref-for-binding-pattern.stderr (renamed from src/test/ui/mismatched_types/suggest-adding-or-removing-ref-for-binding-pattern.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.fixed (renamed from src/test/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.fixed) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.rs (renamed from src/test/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.stderr (renamed from src/test/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/suggest-removing-tuple-struct-field.fixed (renamed from src/test/ui/mismatched_types/suggest-removing-tulpe-struct-field.fixed) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/suggest-removing-tuple-struct-field.rs (renamed from src/test/ui/mismatched_types/suggest-removing-tulpe-struct-field.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/suggest-removing-tuple-struct-field.stderr | 41 | ||||
-rw-r--r-- | tests/ui/mismatched_types/trait-bounds-cant-coerce.rs (renamed from src/test/ui/mismatched_types/trait-bounds-cant-coerce.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/trait-bounds-cant-coerce.stderr (renamed from src/test/ui/mismatched_types/trait-bounds-cant-coerce.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/trait-impl-fn-incompatibility.rs (renamed from src/test/ui/mismatched_types/trait-impl-fn-incompatibility.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/trait-impl-fn-incompatibility.stderr (renamed from src/test/ui/mismatched_types/trait-impl-fn-incompatibility.stderr) | 8 | ||||
-rw-r--r-- | tests/ui/mismatched_types/unboxed-closures-vtable-mismatch.rs (renamed from src/test/ui/mismatched_types/unboxed-closures-vtable-mismatch.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr (renamed from src/test/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/wrap-suggestion-privacy.rs (renamed from src/test/ui/mismatched_types/wrap-suggestion-privacy.rs) | 0 | ||||
-rw-r--r-- | tests/ui/mismatched_types/wrap-suggestion-privacy.stderr (renamed from src/test/ui/mismatched_types/wrap-suggestion-privacy.stderr) | 2 |
104 files changed, 215 insertions, 67 deletions
diff --git a/src/test/ui/mismatched_types/E0053.rs b/tests/ui/mismatched_types/E0053.rs index d3146ce54..d3146ce54 100644 --- a/src/test/ui/mismatched_types/E0053.rs +++ b/tests/ui/mismatched_types/E0053.rs diff --git a/src/test/ui/mismatched_types/E0053.stderr b/tests/ui/mismatched_types/E0053.stderr index 54b419264..154f2fcbe 100644 --- a/src/test/ui/mismatched_types/E0053.stderr +++ b/tests/ui/mismatched_types/E0053.stderr @@ -12,8 +12,8 @@ note: type in trait | LL | fn foo(x: u16); | ^^^ - = note: expected fn pointer `fn(u16)` - found fn pointer `fn(i16)` + = note: expected signature `fn(u16)` + found signature `fn(i16)` error[E0053]: method `bar` has an incompatible type for trait --> $DIR/E0053.rs:11:12 @@ -29,8 +29,8 @@ note: type in trait | LL | fn bar(&self); | ^^^^^ - = note: expected fn pointer `fn(&Bar)` - found fn pointer `fn(&mut Bar)` + = note: expected signature `fn(&Bar)` + found signature `fn(&mut Bar)` error: aborting due to 2 previous errors diff --git a/src/test/ui/mismatched_types/E0409.rs b/tests/ui/mismatched_types/E0409.rs index 3710534cc..3710534cc 100644 --- a/src/test/ui/mismatched_types/E0409.rs +++ b/tests/ui/mismatched_types/E0409.rs diff --git a/src/test/ui/mismatched_types/E0409.stderr b/tests/ui/mismatched_types/E0409.stderr index 7fec6ecd7..7fec6ecd7 100644 --- a/src/test/ui/mismatched_types/E0409.stderr +++ b/tests/ui/mismatched_types/E0409.stderr diff --git a/src/test/ui/mismatched_types/E0631.rs b/tests/ui/mismatched_types/E0631.rs index 83dbdb77a..83dbdb77a 100644 --- a/src/test/ui/mismatched_types/E0631.rs +++ b/tests/ui/mismatched_types/E0631.rs diff --git a/src/test/ui/mismatched_types/E0631.stderr b/tests/ui/mismatched_types/E0631.stderr index 410ea4b0b..410ea4b0b 100644 --- a/src/test/ui/mismatched_types/E0631.stderr +++ b/tests/ui/mismatched_types/E0631.stderr diff --git a/src/test/ui/mismatched_types/abridged.rs b/tests/ui/mismatched_types/abridged.rs index 9a5c183ca..9a5c183ca 100644 --- a/src/test/ui/mismatched_types/abridged.rs +++ b/tests/ui/mismatched_types/abridged.rs diff --git a/src/test/ui/mismatched_types/abridged.stderr b/tests/ui/mismatched_types/abridged.stderr index ff1a836c9..ff1a836c9 100644 --- a/src/test/ui/mismatched_types/abridged.stderr +++ b/tests/ui/mismatched_types/abridged.stderr diff --git a/src/test/ui/mismatched_types/assignment-operator-unimplemented.rs b/tests/ui/mismatched_types/assignment-operator-unimplemented.rs index 21df464d5..21df464d5 100644 --- a/src/test/ui/mismatched_types/assignment-operator-unimplemented.rs +++ b/tests/ui/mismatched_types/assignment-operator-unimplemented.rs diff --git a/src/test/ui/mismatched_types/assignment-operator-unimplemented.stderr b/tests/ui/mismatched_types/assignment-operator-unimplemented.stderr index ffd95b48a..2393791a9 100644 --- a/src/test/ui/mismatched_types/assignment-operator-unimplemented.stderr +++ b/tests/ui/mismatched_types/assignment-operator-unimplemented.stderr @@ -11,11 +11,8 @@ note: an implementation of `AddAssign<_>` might be missing for `Foo` | LL | struct Foo; | ^^^^^^^^^^ must implement `AddAssign<_>` -note: the following trait must be implemented +note: the trait `AddAssign` must be implemented --> $SRC_DIR/core/src/ops/arith.rs:LL:COL - | -LL | pub trait AddAssign<Rhs = Self> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/mismatched_types/binops.rs b/tests/ui/mismatched_types/binops.rs index f359451df..f359451df 100644 --- a/src/test/ui/mismatched_types/binops.rs +++ b/tests/ui/mismatched_types/binops.rs diff --git a/src/test/ui/mismatched_types/binops.stderr b/tests/ui/mismatched_types/binops.stderr index 3585587ed..3585587ed 100644 --- a/src/test/ui/mismatched_types/binops.stderr +++ b/tests/ui/mismatched_types/binops.stderr diff --git a/src/test/ui/mismatched_types/cast-rfc0401.rs b/tests/ui/mismatched_types/cast-rfc0401.rs index 57222f459..57222f459 100644 --- a/src/test/ui/mismatched_types/cast-rfc0401.rs +++ b/tests/ui/mismatched_types/cast-rfc0401.rs diff --git a/src/test/ui/mismatched_types/cast-rfc0401.stderr b/tests/ui/mismatched_types/cast-rfc0401.stderr index eab8e8e80..2a36a352c 100644 --- a/src/test/ui/mismatched_types/cast-rfc0401.stderr +++ b/tests/ui/mismatched_types/cast-rfc0401.stderr @@ -243,10 +243,12 @@ error[E0606]: casting `&{float}` as `f32` is invalid --> $DIR/cast-rfc0401.rs:71:30 | LL | vec![0.0].iter().map(|s| s as f32).collect::<Vec<f32>>(); - | -^^^^^^^ - | | - | cannot cast `&{float}` as `f32` - | help: dereference the expression: `*s` + | ^^^^^^^^ + | +help: dereference the expression + | +LL | vec![0.0].iter().map(|s| *s as f32).collect::<Vec<f32>>(); + | + error: aborting due to 34 previous errors diff --git a/src/test/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.fixed b/tests/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.fixed index efba0543b..efba0543b 100644 --- a/src/test/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.fixed +++ b/tests/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.fixed diff --git a/src/test/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.rs b/tests/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.rs index 3ddb93d12..3ddb93d12 100644 --- a/src/test/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.rs +++ b/tests/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.rs diff --git a/src/test/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.stderr b/tests/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.stderr index d7db90e50..d7db90e50 100644 --- a/src/test/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.stderr +++ b/tests/ui/mismatched_types/closure-arg-count-expected-type-issue-47244.stderr diff --git a/src/test/ui/mismatched_types/closure-arg-count.rs b/tests/ui/mismatched_types/closure-arg-count.rs index 65c8d6a7e..65c8d6a7e 100644 --- a/src/test/ui/mismatched_types/closure-arg-count.rs +++ b/tests/ui/mismatched_types/closure-arg-count.rs diff --git a/src/test/ui/mismatched_types/closure-arg-count.stderr b/tests/ui/mismatched_types/closure-arg-count.stderr index a02ec8198..2ecab9f02 100644 --- a/src/test/ui/mismatched_types/closure-arg-count.stderr +++ b/tests/ui/mismatched_types/closure-arg-count.stderr @@ -128,9 +128,6 @@ LL | fn foo() {} | note: required by a bound in `map` --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL - | -LL | F: FnMut(Self::Item) -> B, - | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `map` error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 3 distinct arguments --> $DIR/closure-arg-count.rs:27:57 @@ -144,9 +141,6 @@ LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(bar); | note: required by a bound in `map` --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL - | -LL | F: FnMut(Self::Item) -> B, - | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `map` error[E0593]: function is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments --> $DIR/closure-arg-count.rs:29:57 @@ -161,9 +155,6 @@ LL | fn qux(x: usize, y: usize) {} | note: required by a bound in `map` --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL - | -LL | F: FnMut(Self::Item) -> B, - | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `map` error[E0593]: function is expected to take 1 argument, but it takes 2 arguments --> $DIR/closure-arg-count.rs:32:45 @@ -175,9 +166,6 @@ LL | let _it = vec![1, 2, 3].into_iter().map(usize::checked_add); | note: required by a bound in `map` --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL - | -LL | F: FnMut(Self::Item) -> B, - | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `map` error[E0593]: function is expected to take 0 arguments, but it takes 1 argument --> $DIR/closure-arg-count.rs:35:10 diff --git a/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.fixed b/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.fixed new file mode 100644 index 000000000..6315fcca2 --- /dev/null +++ b/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.fixed @@ -0,0 +1,5 @@ +// run-rustfix +fn main() { + let _ = (-10..=10).find(|x: &i32| x.signum() == 0); //~ ERROR type mismatch in closure arguments + let _ = (-10..=10).find(|x: &i32| x.signum() == 0); //~ ERROR type mismatch in closure arguments +} diff --git a/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.rs b/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.rs new file mode 100644 index 000000000..c12c5362e --- /dev/null +++ b/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.rs @@ -0,0 +1,5 @@ +// run-rustfix +fn main() { + let _ = (-10..=10).find(|x: i32| x.signum() == 0); //~ ERROR type mismatch in closure arguments + let _ = (-10..=10).find(|x: &&&i32| x.signum() == 0); //~ ERROR type mismatch in closure arguments +} diff --git a/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.stderr b/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.stderr new file mode 100644 index 000000000..fb8af4bb7 --- /dev/null +++ b/tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.stderr @@ -0,0 +1,38 @@ +error[E0631]: type mismatch in closure arguments + --> $DIR/closure-arg-type-mismatch-issue-45727.rs:3:24 + | +LL | let _ = (-10..=10).find(|x: i32| x.signum() == 0); + | ^^^^ -------- found signature defined here + | | + | expected due to this + | + = note: expected closure signature `for<'a> fn(&'a {integer}) -> _` + found closure signature `fn(i32) -> _` +note: required by a bound in `find` + --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL +help: consider borrowing the argument + | +LL | let _ = (-10..=10).find(|x: &i32| x.signum() == 0); + | + + +error[E0631]: type mismatch in closure arguments + --> $DIR/closure-arg-type-mismatch-issue-45727.rs:4:24 + | +LL | let _ = (-10..=10).find(|x: &&&i32| x.signum() == 0); + | ^^^^ ----------- found signature defined here + | | + | expected due to this + | + = note: expected closure signature `for<'a> fn(&'a {integer}) -> _` + found closure signature `for<'a, 'b, 'c> fn(&'a &'b &'c i32) -> _` +note: required by a bound in `find` + --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL +help: do not borrow the argument + | +LL - let _ = (-10..=10).find(|x: &&&i32| x.signum() == 0); +LL + let _ = (-10..=10).find(|x: &i32| x.signum() == 0); + | + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0631`. diff --git a/src/test/ui/mismatched_types/closure-arg-type-mismatch.rs b/tests/ui/mismatched_types/closure-arg-type-mismatch.rs index 98abb0ba9..98abb0ba9 100644 --- a/src/test/ui/mismatched_types/closure-arg-type-mismatch.rs +++ b/tests/ui/mismatched_types/closure-arg-type-mismatch.rs diff --git a/src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr b/tests/ui/mismatched_types/closure-arg-type-mismatch.stderr index 92d545b73..811ff0533 100644 --- a/src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr +++ b/tests/ui/mismatched_types/closure-arg-type-mismatch.stderr @@ -10,9 +10,10 @@ LL | a.iter().map(|_: (u32, u32)| 45); found closure signature `fn((u32, u32)) -> _` note: required by a bound in `map` --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL +help: consider borrowing the argument | -LL | F: FnMut(Self::Item) -> B, - | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `map` +LL | a.iter().map(|_: &(u32, u32)| 45); + | + error[E0631]: type mismatch in closure arguments --> $DIR/closure-arg-type-mismatch.rs:4:14 @@ -26,9 +27,6 @@ LL | a.iter().map(|_: &(u16, u16)| 45); found closure signature `for<'a> fn(&'a (u16, u16)) -> _` note: required by a bound in `map` --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL - | -LL | F: FnMut(Self::Item) -> B, - | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `map` error[E0631]: type mismatch in closure arguments --> $DIR/closure-arg-type-mismatch.rs:5:14 @@ -42,9 +40,6 @@ LL | a.iter().map(|_: (u16, u16)| 45); found closure signature `fn((u16, u16)) -> _` note: required by a bound in `map` --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL - | -LL | F: FnMut(Self::Item) -> B, - | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `map` error: aborting due to 3 previous errors diff --git a/src/test/ui/mismatched_types/closure-mismatch.rs b/tests/ui/mismatched_types/closure-mismatch.rs index b0644e796..b0644e796 100644 --- a/src/test/ui/mismatched_types/closure-mismatch.rs +++ b/tests/ui/mismatched_types/closure-mismatch.rs diff --git a/src/test/ui/mismatched_types/closure-mismatch.stderr b/tests/ui/mismatched_types/closure-mismatch.stderr index a7ef8fa08..a7ef8fa08 100644 --- a/src/test/ui/mismatched_types/closure-mismatch.stderr +++ b/tests/ui/mismatched_types/closure-mismatch.stderr diff --git a/src/test/ui/mismatched_types/const-fn-in-trait.rs b/tests/ui/mismatched_types/const-fn-in-trait.rs index e04d59c58..e04d59c58 100644 --- a/src/test/ui/mismatched_types/const-fn-in-trait.rs +++ b/tests/ui/mismatched_types/const-fn-in-trait.rs diff --git a/src/test/ui/mismatched_types/const-fn-in-trait.stderr b/tests/ui/mismatched_types/const-fn-in-trait.stderr index 7d1fbe45c..7d1fbe45c 100644 --- a/src/test/ui/mismatched_types/const-fn-in-trait.stderr +++ b/tests/ui/mismatched_types/const-fn-in-trait.stderr diff --git a/src/test/ui/mismatched_types/do-not-suggest-boxed-trait-objects-instead-of-impl-trait.rs b/tests/ui/mismatched_types/do-not-suggest-boxed-trait-objects-instead-of-impl-trait.rs index d302dc99b..d302dc99b 100644 --- a/src/test/ui/mismatched_types/do-not-suggest-boxed-trait-objects-instead-of-impl-trait.rs +++ b/tests/ui/mismatched_types/do-not-suggest-boxed-trait-objects-instead-of-impl-trait.rs diff --git a/src/test/ui/mismatched_types/do-not-suggest-boxed-trait-objects-instead-of-impl-trait.stderr b/tests/ui/mismatched_types/do-not-suggest-boxed-trait-objects-instead-of-impl-trait.stderr index 2f814445b..2f814445b 100644 --- a/src/test/ui/mismatched_types/do-not-suggest-boxed-trait-objects-instead-of-impl-trait.stderr +++ b/tests/ui/mismatched_types/do-not-suggest-boxed-trait-objects-instead-of-impl-trait.stderr diff --git a/src/test/ui/mismatched_types/dont-point-return-on-E0308.rs b/tests/ui/mismatched_types/dont-point-return-on-E0308.rs index f2ba610e2..f2ba610e2 100644 --- a/src/test/ui/mismatched_types/dont-point-return-on-E0308.rs +++ b/tests/ui/mismatched_types/dont-point-return-on-E0308.rs diff --git a/src/test/ui/mismatched_types/dont-point-return-on-E0308.stderr b/tests/ui/mismatched_types/dont-point-return-on-E0308.stderr index 13942682d..13942682d 100644 --- a/src/test/ui/mismatched_types/dont-point-return-on-E0308.stderr +++ b/tests/ui/mismatched_types/dont-point-return-on-E0308.stderr diff --git a/src/test/ui/mismatched_types/float-literal-inference-restrictions.rs b/tests/ui/mismatched_types/float-literal-inference-restrictions.rs index 34079b61e..34079b61e 100644 --- a/src/test/ui/mismatched_types/float-literal-inference-restrictions.rs +++ b/tests/ui/mismatched_types/float-literal-inference-restrictions.rs diff --git a/src/test/ui/mismatched_types/float-literal-inference-restrictions.stderr b/tests/ui/mismatched_types/float-literal-inference-restrictions.stderr index 454373c32..454373c32 100644 --- a/src/test/ui/mismatched_types/float-literal-inference-restrictions.stderr +++ b/tests/ui/mismatched_types/float-literal-inference-restrictions.stderr diff --git a/src/test/ui/mismatched_types/fn-variance-1.rs b/tests/ui/mismatched_types/fn-variance-1.rs index b8a6c9a9b..b8a6c9a9b 100644 --- a/src/test/ui/mismatched_types/fn-variance-1.rs +++ b/tests/ui/mismatched_types/fn-variance-1.rs diff --git a/src/test/ui/mismatched_types/fn-variance-1.stderr b/tests/ui/mismatched_types/fn-variance-1.stderr index 5794e606e..5794e606e 100644 --- a/src/test/ui/mismatched_types/fn-variance-1.stderr +++ b/tests/ui/mismatched_types/fn-variance-1.stderr diff --git a/src/test/ui/mismatched_types/for-loop-has-unit-body.rs b/tests/ui/mismatched_types/for-loop-has-unit-body.rs index a9433d7de..a9433d7de 100644 --- a/src/test/ui/mismatched_types/for-loop-has-unit-body.rs +++ b/tests/ui/mismatched_types/for-loop-has-unit-body.rs diff --git a/src/test/ui/mismatched_types/for-loop-has-unit-body.stderr b/tests/ui/mismatched_types/for-loop-has-unit-body.stderr index f36fe64bf..f36fe64bf 100644 --- a/src/test/ui/mismatched_types/for-loop-has-unit-body.stderr +++ b/tests/ui/mismatched_types/for-loop-has-unit-body.stderr diff --git a/tests/ui/mismatched_types/issue-106182.fixed b/tests/ui/mismatched_types/issue-106182.fixed new file mode 100644 index 000000000..b8ddebf6f --- /dev/null +++ b/tests/ui/mismatched_types/issue-106182.fixed @@ -0,0 +1,14 @@ +// run-rustfix + +struct _S(u32, Vec<i32>); + +fn _foo(x: &_S) { + match x { + _S(mut _y, _v) => { + //~^ ERROR mismatched types [E0308] + } + } +} + +fn main() { +} diff --git a/tests/ui/mismatched_types/issue-106182.rs b/tests/ui/mismatched_types/issue-106182.rs new file mode 100644 index 000000000..6eb6df13a --- /dev/null +++ b/tests/ui/mismatched_types/issue-106182.rs @@ -0,0 +1,14 @@ +// run-rustfix + +struct _S(u32, Vec<i32>); + +fn _foo(x: &_S) { + match x { + _S(& (mut _y), _v) => { + //~^ ERROR mismatched types [E0308] + } + } +} + +fn main() { +} diff --git a/tests/ui/mismatched_types/issue-106182.stderr b/tests/ui/mismatched_types/issue-106182.stderr new file mode 100644 index 000000000..ac3ab8e98 --- /dev/null +++ b/tests/ui/mismatched_types/issue-106182.stderr @@ -0,0 +1,18 @@ +error[E0308]: mismatched types + --> $DIR/issue-106182.rs:7:12 + | +LL | match x { + | - this expression has type `&_S` +LL | _S(& (mut _y), _v) => { + | ^^^^^^^^^^ expected `u32`, found reference + | + = note: expected type `u32` + found reference `&_` +help: consider removing `&` from the pattern + | +LL | _S(mut _y, _v) => { + | ~~~~~~ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/mismatched_types/issue-19109.rs b/tests/ui/mismatched_types/issue-19109.rs index eae6a8790..eae6a8790 100644 --- a/src/test/ui/mismatched_types/issue-19109.rs +++ b/tests/ui/mismatched_types/issue-19109.rs diff --git a/src/test/ui/mismatched_types/issue-19109.stderr b/tests/ui/mismatched_types/issue-19109.stderr index 5cef64bb1..5cef64bb1 100644 --- a/src/test/ui/mismatched_types/issue-19109.stderr +++ b/tests/ui/mismatched_types/issue-19109.stderr diff --git a/src/test/ui/mismatched_types/issue-26480.rs b/tests/ui/mismatched_types/issue-26480.rs index 8bd26cebc..8bd26cebc 100644 --- a/src/test/ui/mismatched_types/issue-26480.rs +++ b/tests/ui/mismatched_types/issue-26480.rs diff --git a/src/test/ui/mismatched_types/issue-26480.stderr b/tests/ui/mismatched_types/issue-26480.stderr index ae10a0067..ae10a0067 100644 --- a/src/test/ui/mismatched_types/issue-26480.stderr +++ b/tests/ui/mismatched_types/issue-26480.stderr diff --git a/src/test/ui/mismatched_types/issue-35030.rs b/tests/ui/mismatched_types/issue-35030.rs index 91ea7ea80..91ea7ea80 100644 --- a/src/test/ui/mismatched_types/issue-35030.rs +++ b/tests/ui/mismatched_types/issue-35030.rs diff --git a/tests/ui/mismatched_types/issue-35030.stderr b/tests/ui/mismatched_types/issue-35030.stderr new file mode 100644 index 000000000..de4e067fe --- /dev/null +++ b/tests/ui/mismatched_types/issue-35030.stderr @@ -0,0 +1,26 @@ +error[E0308]: mismatched types + --> $DIR/issue-35030.rs:9:14 + | +LL | impl<bool> Parser<bool> for bool { + | ---- this type parameter +LL | fn parse(text: &str) -> Option<bool> { +LL | Some(true) + | ---- ^^^^ expected type parameter `bool`, found `bool` + | | + | arguments to this enum variant are incorrect + | + = note: expected type parameter `bool` (type parameter `bool`) + found type `bool` (`bool`) +help: the type constructed contains `bool` due to the type of the argument passed + --> $DIR/issue-35030.rs:9:9 + | +LL | Some(true) + | ^^^^^----^ + | | + | this argument influences the type of `Some` +note: tuple variant defined here + --> $SRC_DIR/core/src/option.rs:LL:COL + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/mismatched_types/issue-36053-2.rs b/tests/ui/mismatched_types/issue-36053-2.rs index 17d2292ba..17d2292ba 100644 --- a/src/test/ui/mismatched_types/issue-36053-2.rs +++ b/tests/ui/mismatched_types/issue-36053-2.rs diff --git a/src/test/ui/mismatched_types/issue-36053-2.stderr b/tests/ui/mismatched_types/issue-36053-2.stderr index 906001ca1..a6764a1dc 100644 --- a/src/test/ui/mismatched_types/issue-36053-2.stderr +++ b/tests/ui/mismatched_types/issue-36053-2.stderr @@ -10,23 +10,22 @@ LL | once::<&str>("str").fuse().filter(|a: &str| true).count(); found closure signature `for<'a> fn(&'a str) -> _` note: required by a bound in `filter` --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL +help: consider borrowing the argument | -LL | P: FnMut(&Self::Item) -> bool, - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `filter` +LL | once::<&str>("str").fuse().filter(|a: &&str| true).count(); + | + -error[E0599]: the method `count` exists for struct `Filter<Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:7:39: 7:48]>`, but its trait bounds were not satisfied +error[E0599]: the method `count` exists for struct `Filter<Fuse<Once<&str>>, [closure@issue-36053-2.rs:7:39]>`, but its trait bounds were not satisfied --> $DIR/issue-36053-2.rs:7:55 | LL | once::<&str>("str").fuse().filter(|a: &str| true).count(); - | --------- ^^^^^ method cannot be called on `Filter<Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:7:39: 7:48]>` due to unsatisfied trait bounds + | --------- ^^^^^ method cannot be called due to unsatisfied trait bounds | | | doesn't satisfy `<_ as FnOnce<(&&str,)>>::Output = bool` | doesn't satisfy `_: FnMut<(&&str,)>` + --> $SRC_DIR/core/src/iter/adapters/filter.rs:LL:COL | - ::: $SRC_DIR/core/src/iter/adapters/filter.rs:LL:COL - | -LL | pub struct Filter<I, P> { - | ----------------------- doesn't satisfy `_: Iterator` + = note: doesn't satisfy `_: Iterator` | = note: the following trait bounds were not satisfied: `<[closure@$DIR/issue-36053-2.rs:7:39: 7:48] as FnOnce<(&&str,)>>::Output = bool` diff --git a/src/test/ui/mismatched_types/issue-38371-unfixable.rs b/tests/ui/mismatched_types/issue-38371-unfixable.rs index c4316bfdd..c4316bfdd 100644 --- a/src/test/ui/mismatched_types/issue-38371-unfixable.rs +++ b/tests/ui/mismatched_types/issue-38371-unfixable.rs diff --git a/src/test/ui/mismatched_types/issue-38371-unfixable.stderr b/tests/ui/mismatched_types/issue-38371-unfixable.stderr index 3c5e765ab..3c5e765ab 100644 --- a/src/test/ui/mismatched_types/issue-38371-unfixable.stderr +++ b/tests/ui/mismatched_types/issue-38371-unfixable.stderr diff --git a/src/test/ui/mismatched_types/issue-38371.fixed b/tests/ui/mismatched_types/issue-38371.fixed index 0e20835be..0e20835be 100644 --- a/src/test/ui/mismatched_types/issue-38371.fixed +++ b/tests/ui/mismatched_types/issue-38371.fixed diff --git a/src/test/ui/mismatched_types/issue-38371.rs b/tests/ui/mismatched_types/issue-38371.rs index fb9e4c173..fb9e4c173 100644 --- a/src/test/ui/mismatched_types/issue-38371.rs +++ b/tests/ui/mismatched_types/issue-38371.rs diff --git a/src/test/ui/mismatched_types/issue-38371.stderr b/tests/ui/mismatched_types/issue-38371.stderr index f43427f98..f43427f98 100644 --- a/src/test/ui/mismatched_types/issue-38371.stderr +++ b/tests/ui/mismatched_types/issue-38371.stderr diff --git a/src/test/ui/mismatched_types/issue-47706-trait.rs b/tests/ui/mismatched_types/issue-47706-trait.rs index 8fb4e0855..8fb4e0855 100644 --- a/src/test/ui/mismatched_types/issue-47706-trait.rs +++ b/tests/ui/mismatched_types/issue-47706-trait.rs diff --git a/src/test/ui/mismatched_types/issue-47706-trait.stderr b/tests/ui/mismatched_types/issue-47706-trait.stderr index d596b4a69..a5f38dd53 100644 --- a/src/test/ui/mismatched_types/issue-47706-trait.stderr +++ b/tests/ui/mismatched_types/issue-47706-trait.stderr @@ -10,9 +10,6 @@ LL | None::<()>.map(Self::f); | note: required by a bound in `Option::<T>::map` --> $SRC_DIR/core/src/option.rs:LL:COL - | -LL | F: ~const FnOnce(T) -> U, - | ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Option::<T>::map` error: aborting due to previous error diff --git a/src/test/ui/mismatched_types/issue-47706.rs b/tests/ui/mismatched_types/issue-47706.rs index f47c1e694..f47c1e694 100644 --- a/src/test/ui/mismatched_types/issue-47706.rs +++ b/tests/ui/mismatched_types/issue-47706.rs diff --git a/src/test/ui/mismatched_types/issue-47706.stderr b/tests/ui/mismatched_types/issue-47706.stderr index 8b8563684..d9d408844 100644 --- a/src/test/ui/mismatched_types/issue-47706.stderr +++ b/tests/ui/mismatched_types/issue-47706.stderr @@ -11,9 +11,6 @@ LL | self.foo.map(Foo::new) | note: required by a bound in `Option::<T>::map` --> $SRC_DIR/core/src/option.rs:LL:COL - | -LL | F: ~const FnOnce(T) -> U, - | ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Option::<T>::map` error[E0593]: function is expected to take 0 arguments, but it takes 1 argument --> $DIR/issue-47706.rs:27:9 diff --git a/src/test/ui/mismatched_types/issue-74918-missing-lifetime.rs b/tests/ui/mismatched_types/issue-74918-missing-lifetime.rs index c7842667d..c7842667d 100644 --- a/src/test/ui/mismatched_types/issue-74918-missing-lifetime.rs +++ b/tests/ui/mismatched_types/issue-74918-missing-lifetime.rs diff --git a/src/test/ui/mismatched_types/issue-74918-missing-lifetime.stderr b/tests/ui/mismatched_types/issue-74918-missing-lifetime.stderr index 94a9c9757..9ddea1629 100644 --- a/src/test/ui/mismatched_types/issue-74918-missing-lifetime.stderr +++ b/tests/ui/mismatched_types/issue-74918-missing-lifetime.stderr @@ -14,14 +14,12 @@ error: `impl` item signature doesn't match `trait` item signature | LL | fn next(&mut self) -> Option<IteratorChunk<T, S>> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(&'1 mut ChunkingIterator<T, S>) -> Option<IteratorChunk<'1, T, S>>` - | - ::: $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL - | -LL | fn next(&mut self) -> Option<Self::Item>; - | ----------------------------------------- expected `fn(&'1 mut ChunkingIterator<T, S>) -> Option<IteratorChunk<'static, T, S>>` + --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL | = note: expected `fn(&'1 mut ChunkingIterator<T, S>) -> Option<IteratorChunk<'static, T, S>>` - found `fn(&'1 mut ChunkingIterator<T, S>) -> Option<IteratorChunk<'1, T, S>>` + | + = note: expected signature `fn(&'1 mut ChunkingIterator<T, S>) -> Option<IteratorChunk<'static, T, S>>` + found signature `fn(&'1 mut ChunkingIterator<T, S>) -> Option<IteratorChunk<'1, T, S>>` = help: the lifetime requirements from the `impl` do not correspond to the requirements in the `trait` = help: verify the lifetime relationships in the `trait` and `impl` between the `self` argument, the other inputs and its output diff --git a/src/test/ui/mismatched_types/issue-75361-mismatched-impl.rs b/tests/ui/mismatched_types/issue-75361-mismatched-impl.rs index 441051447..441051447 100644 --- a/src/test/ui/mismatched_types/issue-75361-mismatched-impl.rs +++ b/tests/ui/mismatched_types/issue-75361-mismatched-impl.rs diff --git a/src/test/ui/mismatched_types/issue-75361-mismatched-impl.stderr b/tests/ui/mismatched_types/issue-75361-mismatched-impl.stderr index 2a2c23c94..88416ba4b 100644 --- a/src/test/ui/mismatched_types/issue-75361-mismatched-impl.stderr +++ b/tests/ui/mismatched_types/issue-75361-mismatched-impl.stderr @@ -7,8 +7,8 @@ LL | fn adjacent_edges(&self) -> Box<dyn MyTrait<Item = &Self::EdgeType>>; LL | fn adjacent_edges(&self) -> Box<dyn MyTrait<Item = &Self::EdgeType> + '_> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(&'1 T) -> Box<(dyn MyTrait<Item = &'1 T> + '1)>` | - = note: expected `fn(&'1 T) -> Box<(dyn MyTrait<Item = &'1 T> + 'static)>` - found `fn(&'1 T) -> Box<(dyn MyTrait<Item = &'1 T> + '1)>` + = note: expected signature `fn(&'1 T) -> Box<(dyn MyTrait<Item = &'1 T> + 'static)>` + found signature `fn(&'1 T) -> Box<(dyn MyTrait<Item = &'1 T> + '1)>` help: the lifetime requirements from the `impl` do not correspond to the requirements in the `trait` --> $DIR/issue-75361-mismatched-impl.rs:12:55 | diff --git a/src/test/ui/mismatched_types/issue-84976.rs b/tests/ui/mismatched_types/issue-84976.rs index db6fe0b45..db6fe0b45 100644 --- a/src/test/ui/mismatched_types/issue-84976.rs +++ b/tests/ui/mismatched_types/issue-84976.rs diff --git a/src/test/ui/mismatched_types/issue-84976.stderr b/tests/ui/mismatched_types/issue-84976.stderr index 9157566e3..9157566e3 100644 --- a/src/test/ui/mismatched_types/issue-84976.stderr +++ b/tests/ui/mismatched_types/issue-84976.stderr diff --git a/src/test/ui/mismatched_types/main.rs b/tests/ui/mismatched_types/main.rs index e2d09dc21..e2d09dc21 100644 --- a/src/test/ui/mismatched_types/main.rs +++ b/tests/ui/mismatched_types/main.rs diff --git a/src/test/ui/mismatched_types/main.stderr b/tests/ui/mismatched_types/main.stderr index a662741af..a662741af 100644 --- a/src/test/ui/mismatched_types/main.stderr +++ b/tests/ui/mismatched_types/main.stderr diff --git a/src/test/ui/mismatched_types/method-help-unsatisfied-bound.rs b/tests/ui/mismatched_types/method-help-unsatisfied-bound.rs index 6303c6e6a..6303c6e6a 100644 --- a/src/test/ui/mismatched_types/method-help-unsatisfied-bound.rs +++ b/tests/ui/mismatched_types/method-help-unsatisfied-bound.rs diff --git a/tests/ui/mismatched_types/method-help-unsatisfied-bound.stderr b/tests/ui/mismatched_types/method-help-unsatisfied-bound.stderr new file mode 100644 index 000000000..d3b752507 --- /dev/null +++ b/tests/ui/mismatched_types/method-help-unsatisfied-bound.stderr @@ -0,0 +1,18 @@ +error[E0277]: `Foo` doesn't implement `Debug` + --> $DIR/method-help-unsatisfied-bound.rs:5:7 + | +LL | a.unwrap(); + | ^^^^^^ `Foo` cannot be formatted using `{:?}` + | + = help: the trait `Debug` is not implemented for `Foo` + = note: add `#[derive(Debug)]` to `Foo` or manually `impl Debug for Foo` +note: required by a bound in `Result::<T, E>::unwrap` + --> $SRC_DIR/core/src/result.rs:LL:COL +help: consider annotating `Foo` with `#[derive(Debug)]` + | +LL | #[derive(Debug)] + | + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/mismatched_types/non_zero_assigned_something.rs b/tests/ui/mismatched_types/non_zero_assigned_something.rs index d2adbe01c..d2adbe01c 100644 --- a/src/test/ui/mismatched_types/non_zero_assigned_something.rs +++ b/tests/ui/mismatched_types/non_zero_assigned_something.rs diff --git a/src/test/ui/mismatched_types/non_zero_assigned_something.stderr b/tests/ui/mismatched_types/non_zero_assigned_something.stderr index d4b2c902f..d4b2c902f 100644 --- a/src/test/ui/mismatched_types/non_zero_assigned_something.stderr +++ b/tests/ui/mismatched_types/non_zero_assigned_something.stderr diff --git a/src/test/ui/mismatched_types/normalize-fn-sig.rs b/tests/ui/mismatched_types/normalize-fn-sig.rs index 1a2093c44..1a2093c44 100644 --- a/src/test/ui/mismatched_types/normalize-fn-sig.rs +++ b/tests/ui/mismatched_types/normalize-fn-sig.rs diff --git a/src/test/ui/mismatched_types/normalize-fn-sig.stderr b/tests/ui/mismatched_types/normalize-fn-sig.stderr index 6c55f29c5..6c55f29c5 100644 --- a/src/test/ui/mismatched_types/normalize-fn-sig.stderr +++ b/tests/ui/mismatched_types/normalize-fn-sig.stderr diff --git a/src/test/ui/mismatched_types/numeric-literal-cast.rs b/tests/ui/mismatched_types/numeric-literal-cast.rs index 69cfe262f..69cfe262f 100644 --- a/src/test/ui/mismatched_types/numeric-literal-cast.rs +++ b/tests/ui/mismatched_types/numeric-literal-cast.rs diff --git a/src/test/ui/mismatched_types/numeric-literal-cast.stderr b/tests/ui/mismatched_types/numeric-literal-cast.stderr index fcf3eccbc..fcf3eccbc 100644 --- a/src/test/ui/mismatched_types/numeric-literal-cast.stderr +++ b/tests/ui/mismatched_types/numeric-literal-cast.stderr diff --git a/src/test/ui/mismatched_types/overloaded-calls-bad.rs b/tests/ui/mismatched_types/overloaded-calls-bad.rs index 232cd2ba8..5b1804d82 100644 --- a/src/test/ui/mismatched_types/overloaded-calls-bad.rs +++ b/tests/ui/mismatched_types/overloaded-calls-bad.rs @@ -33,9 +33,9 @@ fn main() { let ans = s("what"); //~^ ERROR mismatched types let ans = s(); - //~^ ERROR this function takes 1 argument but 0 arguments were supplied + //~^ ERROR function takes 1 argument but 0 arguments were supplied let ans = s("burma", "shave"); - //~^ ERROR this function takes 1 argument but 2 arguments were supplied + //~^ ERROR function takes 1 argument but 2 arguments were supplied F(""); //~^ ERROR mismatched types diff --git a/src/test/ui/mismatched_types/overloaded-calls-bad.stderr b/tests/ui/mismatched_types/overloaded-calls-bad.stderr index 3a895acbd..3a895acbd 100644 --- a/src/test/ui/mismatched_types/overloaded-calls-bad.stderr +++ b/tests/ui/mismatched_types/overloaded-calls-bad.stderr diff --git a/src/test/ui/mismatched_types/recovered-block.rs b/tests/ui/mismatched_types/recovered-block.rs index b230b47d3..b230b47d3 100644 --- a/src/test/ui/mismatched_types/recovered-block.rs +++ b/tests/ui/mismatched_types/recovered-block.rs diff --git a/src/test/ui/mismatched_types/recovered-block.stderr b/tests/ui/mismatched_types/recovered-block.stderr index f275321ab..f275321ab 100644 --- a/src/test/ui/mismatched_types/recovered-block.stderr +++ b/tests/ui/mismatched_types/recovered-block.stderr diff --git a/src/test/ui/mismatched_types/ref-pat-suggestions.fixed b/tests/ui/mismatched_types/ref-pat-suggestions.fixed index d50acd1ac..d50acd1ac 100644 --- a/src/test/ui/mismatched_types/ref-pat-suggestions.fixed +++ b/tests/ui/mismatched_types/ref-pat-suggestions.fixed diff --git a/src/test/ui/mismatched_types/ref-pat-suggestions.rs b/tests/ui/mismatched_types/ref-pat-suggestions.rs index 1a77f6876..1a77f6876 100644 --- a/src/test/ui/mismatched_types/ref-pat-suggestions.rs +++ b/tests/ui/mismatched_types/ref-pat-suggestions.rs diff --git a/src/test/ui/mismatched_types/ref-pat-suggestions.stderr b/tests/ui/mismatched_types/ref-pat-suggestions.stderr index d9501a9bb..63eaa3930 100644 --- a/src/test/ui/mismatched_types/ref-pat-suggestions.stderr +++ b/tests/ui/mismatched_types/ref-pat-suggestions.stderr @@ -336,9 +336,8 @@ LL | let S(&mut _b) = S(0); | ^^^^^^^ help: consider removing `&mut` from the pattern | -LL - let S(&mut _b) = S(0); -LL + let S(_b) = S(0); - | +LL | let S(_b) = S(0); + | ~~ error[E0308]: mismatched types --> $DIR/ref-pat-suggestions.rs:31:14 diff --git a/src/test/ui/mismatched_types/show_module.rs b/tests/ui/mismatched_types/show_module.rs index 61550b887..61550b887 100644 --- a/src/test/ui/mismatched_types/show_module.rs +++ b/tests/ui/mismatched_types/show_module.rs diff --git a/src/test/ui/mismatched_types/show_module.stderr b/tests/ui/mismatched_types/show_module.stderr index 5e48e0955..5e48e0955 100644 --- a/src/test/ui/mismatched_types/show_module.stderr +++ b/tests/ui/mismatched_types/show_module.stderr diff --git a/src/test/ui/mismatched_types/similar_paths.rs b/tests/ui/mismatched_types/similar_paths.rs index 4b9157f39..4b9157f39 100644 --- a/src/test/ui/mismatched_types/similar_paths.rs +++ b/tests/ui/mismatched_types/similar_paths.rs diff --git a/src/test/ui/mismatched_types/similar_paths.stderr b/tests/ui/mismatched_types/similar_paths.stderr index e65ae58d4..46a383325 100644 --- a/src/test/ui/mismatched_types/similar_paths.stderr +++ b/tests/ui/mismatched_types/similar_paths.stderr @@ -9,9 +9,6 @@ LL | Some(42_u8) = note: enum `std::option::Option` and enum `Option` have similar names, but are actually distinct types note: enum `std::option::Option` is defined in crate `core` --> $SRC_DIR/core/src/option.rs:LL:COL - | -LL | pub enum Option<T> { - | ^^^^^^^^^^^^^^^^^^ note: enum `Option` is defined in the current crate --> $DIR/similar_paths.rs:1:1 | diff --git a/src/test/ui/mismatched_types/similar_paths_primitive.rs b/tests/ui/mismatched_types/similar_paths_primitive.rs index 8f5b7cce4..8f5b7cce4 100644 --- a/src/test/ui/mismatched_types/similar_paths_primitive.rs +++ b/tests/ui/mismatched_types/similar_paths_primitive.rs diff --git a/src/test/ui/mismatched_types/similar_paths_primitive.stderr b/tests/ui/mismatched_types/similar_paths_primitive.stderr index 8a2f73945..8a2f73945 100644 --- a/src/test/ui/mismatched_types/similar_paths_primitive.stderr +++ b/tests/ui/mismatched_types/similar_paths_primitive.stderr diff --git a/src/test/ui/mismatched_types/suggest-adding-or-removing-ref-for-binding-pattern.fixed b/tests/ui/mismatched_types/suggest-adding-or-removing-ref-for-binding-pattern.fixed index 56f93cfbf..56f93cfbf 100644 --- a/src/test/ui/mismatched_types/suggest-adding-or-removing-ref-for-binding-pattern.fixed +++ b/tests/ui/mismatched_types/suggest-adding-or-removing-ref-for-binding-pattern.fixed diff --git a/src/test/ui/mismatched_types/suggest-adding-or-removing-ref-for-binding-pattern.rs b/tests/ui/mismatched_types/suggest-adding-or-removing-ref-for-binding-pattern.rs index 0c33f99a4..0c33f99a4 100644 --- a/src/test/ui/mismatched_types/suggest-adding-or-removing-ref-for-binding-pattern.rs +++ b/tests/ui/mismatched_types/suggest-adding-or-removing-ref-for-binding-pattern.rs diff --git a/src/test/ui/mismatched_types/suggest-adding-or-removing-ref-for-binding-pattern.stderr b/tests/ui/mismatched_types/suggest-adding-or-removing-ref-for-binding-pattern.stderr index e8357f9a3..e8357f9a3 100644 --- a/src/test/ui/mismatched_types/suggest-adding-or-removing-ref-for-binding-pattern.stderr +++ b/tests/ui/mismatched_types/suggest-adding-or-removing-ref-for-binding-pattern.stderr diff --git a/src/test/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.fixed b/tests/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.fixed index f30feaed0..f30feaed0 100644 --- a/src/test/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.fixed +++ b/tests/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.fixed diff --git a/src/test/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.rs b/tests/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.rs index 2bd8146e2..2bd8146e2 100644 --- a/src/test/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.rs +++ b/tests/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.rs diff --git a/src/test/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.stderr b/tests/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.stderr index f58b9c3ec..f58b9c3ec 100644 --- a/src/test/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.stderr +++ b/tests/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.stderr diff --git a/src/test/ui/mismatched_types/suggest-removing-tulpe-struct-field.fixed b/tests/ui/mismatched_types/suggest-removing-tuple-struct-field.fixed index 63b65ab20..63b65ab20 100644 --- a/src/test/ui/mismatched_types/suggest-removing-tulpe-struct-field.fixed +++ b/tests/ui/mismatched_types/suggest-removing-tuple-struct-field.fixed diff --git a/src/test/ui/mismatched_types/suggest-removing-tulpe-struct-field.rs b/tests/ui/mismatched_types/suggest-removing-tuple-struct-field.rs index 2ab4e3955..2ab4e3955 100644 --- a/src/test/ui/mismatched_types/suggest-removing-tulpe-struct-field.rs +++ b/tests/ui/mismatched_types/suggest-removing-tuple-struct-field.rs diff --git a/tests/ui/mismatched_types/suggest-removing-tuple-struct-field.stderr b/tests/ui/mismatched_types/suggest-removing-tuple-struct-field.stderr new file mode 100644 index 000000000..35871afb5 --- /dev/null +++ b/tests/ui/mismatched_types/suggest-removing-tuple-struct-field.stderr @@ -0,0 +1,41 @@ +error[E0308]: mismatched types + --> $DIR/suggest-removing-tuple-struct-field.rs:11:13 + | +LL | some_fn(value.0); + | ------- ^^^^^^^ expected struct `MyWrapper`, found `u32` + | | + | arguments to this function are incorrect + | +note: function defined here + --> $DIR/suggest-removing-tuple-struct-field.rs:15:4 + | +LL | fn some_fn(wrapped: MyWrapper) { + | ^^^^^^^ ------------------ +help: consider removing the tuple struct field `0` + | +LL - some_fn(value.0); +LL + some_fn(value); + | + +error[E0308]: mismatched types + --> $DIR/suggest-removing-tuple-struct-field.rs:12:13 + | +LL | some_fn(my_wrapper!(123).0); + | ------- ^^^^^^^^^^^^^^^^^^ expected struct `MyWrapper`, found `u32` + | | + | arguments to this function are incorrect + | +note: function defined here + --> $DIR/suggest-removing-tuple-struct-field.rs:15:4 + | +LL | fn some_fn(wrapped: MyWrapper) { + | ^^^^^^^ ------------------ +help: consider removing the tuple struct field `0` + | +LL - some_fn(my_wrapper!(123).0); +LL + some_fn(my_wrapper!(123)); + | + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/mismatched_types/trait-bounds-cant-coerce.rs b/tests/ui/mismatched_types/trait-bounds-cant-coerce.rs index 882533992..882533992 100644 --- a/src/test/ui/mismatched_types/trait-bounds-cant-coerce.rs +++ b/tests/ui/mismatched_types/trait-bounds-cant-coerce.rs diff --git a/src/test/ui/mismatched_types/trait-bounds-cant-coerce.stderr b/tests/ui/mismatched_types/trait-bounds-cant-coerce.stderr index 80aef7fcb..80aef7fcb 100644 --- a/src/test/ui/mismatched_types/trait-bounds-cant-coerce.stderr +++ b/tests/ui/mismatched_types/trait-bounds-cant-coerce.stderr diff --git a/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.rs b/tests/ui/mismatched_types/trait-impl-fn-incompatibility.rs index ba206b860..ba206b860 100644 --- a/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.rs +++ b/tests/ui/mismatched_types/trait-impl-fn-incompatibility.rs diff --git a/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.stderr b/tests/ui/mismatched_types/trait-impl-fn-incompatibility.stderr index 6b2ba53da..6e7bf5eb4 100644 --- a/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.stderr +++ b/tests/ui/mismatched_types/trait-impl-fn-incompatibility.stderr @@ -12,8 +12,8 @@ note: type in trait | LL | fn foo(x: u16); | ^^^ - = note: expected fn pointer `fn(u16)` - found fn pointer `fn(i16)` + = note: expected signature `fn(u16)` + found signature `fn(i16)` error[E0053]: method `bar` has an incompatible type for trait --> $DIR/trait-impl-fn-incompatibility.rs:10:28 @@ -29,8 +29,8 @@ note: type in trait | LL | fn bar(&mut self, bar: &mut Bar); | ^^^^^^^^ - = note: expected fn pointer `fn(&mut Bar, &mut Bar)` - found fn pointer `fn(&mut Bar, &Bar)` + = note: expected signature `fn(&mut Bar, &mut Bar)` + found signature `fn(&mut Bar, &Bar)` error: aborting due to 2 previous errors diff --git a/src/test/ui/mismatched_types/unboxed-closures-vtable-mismatch.rs b/tests/ui/mismatched_types/unboxed-closures-vtable-mismatch.rs index 307104e47..307104e47 100644 --- a/src/test/ui/mismatched_types/unboxed-closures-vtable-mismatch.rs +++ b/tests/ui/mismatched_types/unboxed-closures-vtable-mismatch.rs diff --git a/src/test/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr b/tests/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr index 54b220065..54b220065 100644 --- a/src/test/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr +++ b/tests/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr diff --git a/src/test/ui/mismatched_types/wrap-suggestion-privacy.rs b/tests/ui/mismatched_types/wrap-suggestion-privacy.rs index 63cb1a129..63cb1a129 100644 --- a/src/test/ui/mismatched_types/wrap-suggestion-privacy.rs +++ b/tests/ui/mismatched_types/wrap-suggestion-privacy.rs diff --git a/src/test/ui/mismatched_types/wrap-suggestion-privacy.stderr b/tests/ui/mismatched_types/wrap-suggestion-privacy.stderr index e8eb8d263..fdd92cbfc 100644 --- a/src/test/ui/mismatched_types/wrap-suggestion-privacy.stderr +++ b/tests/ui/mismatched_types/wrap-suggestion-privacy.stderr @@ -42,7 +42,7 @@ error[E0308]: mismatched types --> $DIR/wrap-suggestion-privacy.rs:22:17 | LL | needs_ready(Some(0)); - | ----------- ^^^^^^^ expected struct `std::future::Ready`, found enum `Option` + | ----------- ^^^^^^^ expected struct `Ready`, found enum `Option` | | | arguments to this function are incorrect | |