From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- .../regions-fn-subtyping-return-static-fail.stderr | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/ui/regions/regions-fn-subtyping-return-static-fail.stderr (limited to 'tests/ui/regions/regions-fn-subtyping-return-static-fail.stderr') diff --git a/tests/ui/regions/regions-fn-subtyping-return-static-fail.stderr b/tests/ui/regions/regions-fn-subtyping-return-static-fail.stderr new file mode 100644 index 000000000..8d82ff958 --- /dev/null +++ b/tests/ui/regions/regions-fn-subtyping-return-static-fail.stderr @@ -0,0 +1,19 @@ +error[E0308]: mismatched types + --> $DIR/regions-fn-subtyping-return-static-fail.rs:48:12 + | +LL | want_G(baz); + | ------ ^^^ one type is more general than the other + | | + | arguments to this function are incorrect + | + = note: expected fn pointer `for<'cx> fn(&'cx S) -> &'static S` + found fn item `for<'a> fn(&'a S) -> &'a S {baz}` +note: function defined here + --> $DIR/regions-fn-subtyping-return-static-fail.rs:20:4 + | +LL | fn want_G(f: G) {} + | ^^^^^^ ---- + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0308`. -- cgit v1.2.3