From 9918693037dce8aa4bb6f08741b6812923486c18 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 19 Jun 2024 11:26:03 +0200 Subject: Merging upstream version 1.76.0+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/higher-ranked/higher-ranked-lifetime-error.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/ui/higher-ranked/higher-ranked-lifetime-error.rs (limited to 'tests/ui/higher-ranked/higher-ranked-lifetime-error.rs') diff --git a/tests/ui/higher-ranked/higher-ranked-lifetime-error.rs b/tests/ui/higher-ranked/higher-ranked-lifetime-error.rs new file mode 100644 index 000000000..aee5db836 --- /dev/null +++ b/tests/ui/higher-ranked/higher-ranked-lifetime-error.rs @@ -0,0 +1,14 @@ +fn assert_all(_f: F) +where + F: FnMut(&String) -> T, +{ +} + +fn id(x: &String) -> &String { + x +} + +fn main() { + assert_all::<_, &String>(id); + //~^ mismatched types +} -- cgit v1.2.3