summaryrefslogtreecommitdiffstats
path: root/src/test/ui/mismatched_types/E0631.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/mismatched_types/E0631.stderr')
-rw-r--r--src/test/ui/mismatched_types/E0631.stderr73
1 files changed, 73 insertions, 0 deletions
diff --git a/src/test/ui/mismatched_types/E0631.stderr b/src/test/ui/mismatched_types/E0631.stderr
new file mode 100644
index 000000000..4d673d455
--- /dev/null
+++ b/src/test/ui/mismatched_types/E0631.stderr
@@ -0,0 +1,73 @@
+error[E0631]: type mismatch in closure arguments
+ --> $DIR/E0631.rs:7:5
+ |
+LL | foo(|_: isize| {});
+ | ^^^ ---------- found signature defined here
+ | |
+ | expected due to this
+ |
+ = note: expected closure signature `fn(usize) -> _`
+ found closure signature `fn(isize) -> _`
+note: required by a bound in `foo`
+ --> $DIR/E0631.rs:3:11
+ |
+LL | fn foo<F: Fn(usize)>(_: F) {}
+ | ^^^^^^^^^ required by this bound in `foo`
+
+error[E0631]: type mismatch in closure arguments
+ --> $DIR/E0631.rs:8:5
+ |
+LL | bar(|_: isize| {});
+ | ^^^ ---------- found signature defined here
+ | |
+ | expected due to this
+ |
+ = note: expected closure signature `fn(usize) -> _`
+ found closure signature `fn(isize) -> _`
+note: required by a bound in `bar`
+ --> $DIR/E0631.rs:4:11
+ |
+LL | fn bar<F: Fn<usize>>(_: F) {}
+ | ^^^^^^^^^ required by this bound in `bar`
+
+error[E0631]: type mismatch in function arguments
+ --> $DIR/E0631.rs:9:9
+ |
+LL | fn f(_: u64) {}
+ | ------------ found signature defined here
+...
+LL | foo(f);
+ | --- ^ expected due to this
+ | |
+ | required by a bound introduced by this call
+ |
+ = note: expected function signature `fn(usize) -> _`
+ found function signature `fn(u64) -> _`
+note: required by a bound in `foo`
+ --> $DIR/E0631.rs:3:11
+ |
+LL | fn foo<F: Fn(usize)>(_: F) {}
+ | ^^^^^^^^^ required by this bound in `foo`
+
+error[E0631]: type mismatch in function arguments
+ --> $DIR/E0631.rs:10:9
+ |
+LL | fn f(_: u64) {}
+ | ------------ found signature defined here
+...
+LL | bar(f);
+ | --- ^ expected due to this
+ | |
+ | required by a bound introduced by this call
+ |
+ = note: expected function signature `fn(usize) -> _`
+ found function signature `fn(u64) -> _`
+note: required by a bound in `bar`
+ --> $DIR/E0631.rs:4:11
+ |
+LL | fn bar<F: Fn<usize>>(_: F) {}
+ | ^^^^^^^^^ required by this bound in `bar`
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0631`.