aboutsummaryrefslogtreecommitdiff
path: root/tests/ui/mismatched_types.stderr
diff options
context:
space:
mode:
authorAndrew Walbran <qwandor@google.com>2023-06-01 20:07:16 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-06-01 20:07:16 +0000
commitc89a47375198fa255d792180bb95dabb268c803f (patch)
treec152abda73624cb4a77225f0682f01b33a76be30 /tests/ui/mismatched_types.stderr
parenteef466dd058ab69a4edff26d5ba602918dc8b071 (diff)
parente423295327cdc6c1778fbaf3d37ab577ed7e01f6 (diff)
downloadlinkme-c89a47375198fa255d792180bb95dabb268c803f.tar.gz
Initial import am: 2970041c34 am: 59f583acb4 am: a1d0e5dd7b am: e423295327
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/linkme/+/2607228 Change-Id: I9c4761223455927c85e0408d7d7f40523cdb838f Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'tests/ui/mismatched_types.stderr')
-rw-r--r--tests/ui/mismatched_types.stderr31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/ui/mismatched_types.stderr b/tests/ui/mismatched_types.stderr
new file mode 100644
index 0000000..643d1a1
--- /dev/null
+++ b/tests/ui/mismatched_types.stderr
@@ -0,0 +1,31 @@
+error[E0308]: mismatched types
+ --> tests/ui/mismatched_types.rs:11:19
+ |
+10 | #[distributed_slice(BENCHMARKS)]
+ | -------------------------------- arguments to this function are incorrect
+11 | static BENCH_WTF: usize = 999;
+ | ^^^^^ expected fn pointer, found `usize`
+ |
+ = note: expected fn pointer `for<'a> fn(&'a mut Bencher)`
+ found type `usize`
+note: method defined here
+ --> src/distributed_slice.rs
+ |
+ | pub unsafe fn private_typecheck(self, element: T) {
+ | ^^^^^^^^^^^^^^^^^
+
+error[E0308]: mismatched types
+ --> tests/ui/mismatched_types.rs:14:1
+ |
+13 | #[distributed_slice(BENCHMARKS)]
+ | -------------------------------- arguments to this function are incorrect
+14 | fn wrong_bench_fn<'a>(_: &'a mut ()) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Bencher`, found `()`
+ |
+ = note: expected fn pointer `for<'a> fn(&'a mut Bencher)`
+ found fn pointer `for<'a> fn(&'a mut ())`
+note: method defined here
+ --> src/distributed_slice.rs
+ |
+ | pub unsafe fn private_typecheck(self, element: T) {
+ | ^^^^^^^^^^^^^^^^^