]> git.proxmox.com Git - rustc.git/blame - src/test/ui/chalkify/inherent_impl_min.rs
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / chalkify / inherent_impl_min.rs
CommitLineData
f9f354fc
XL
1// run-pass
2// compile-flags: -Z chalk
3
4trait Foo { }
5
6impl Foo for i32 { }
7
8struct S<T: Foo> {
9 x: T,
10}
11
12fn only_foo<T: Foo>(_x: &T) { }
13
14impl<T> S<T> {
15 // Test that we have the correct environment inside an inherent method.
16 fn dummy_foo(&self) {
17 only_foo(&self.x)
18 }
19}
20
21fn main() {
22 let s = S {
23 x: 5,
24 };
25
26 s.dummy_foo();
27}