Skip to content

Commit 1918c3b

Browse files
committed
Add test for FnDef implied bounds
1 parent 126bfb6 commit 1918c3b

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/test/functions.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,26 @@ fn fn_defs() {
5959
"Unique"
6060
}
6161

62+
}
63+
}
64+
65+
#[test]
66+
fn fn_def_implied_bounds_from_env() {
67+
test! {
68+
program {
69+
trait Foo { }
6270

71+
struct Bar { }
72+
impl Foo for Bar { }
73+
74+
fn baz<T>() where T: Foo;
75+
}
76+
goal {
77+
if (FromEnv(baz<Bar>)) {
78+
Bar: Foo
79+
}
80+
} yields {
81+
"Unique"
82+
}
6383
}
6484
}

0 commit comments

Comments
 (0)