summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/enum-variant-arg-mismatch.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/suggestions/enum-variant-arg-mismatch.rs')
-rw-r--r--tests/ui/suggestions/enum-variant-arg-mismatch.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/suggestions/enum-variant-arg-mismatch.rs b/tests/ui/suggestions/enum-variant-arg-mismatch.rs
new file mode 100644
index 000000000..8de5bae92
--- /dev/null
+++ b/tests/ui/suggestions/enum-variant-arg-mismatch.rs
@@ -0,0 +1,10 @@
+pub enum Sexpr<'a> {
+ Ident(&'a str),
+}
+
+fn map<'a, F: Fn(String) -> Sexpr<'a>>(f: F) {}
+
+fn main() {
+ map(Sexpr::Ident);
+ //~^ ERROR type mismatch in function arguments
+}