]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-2445-b.rs
Require Drop impls to have the same constness on its bounds as the bounds on the...
[rust.git] / src / test / ui / issues / issue-2445-b.rs
1 // run-pass
2 #![allow(dead_code)]
3 #![allow(non_camel_case_types)]
4
5 // pretty-expanded FIXME #23616
6
7 struct c1<T> {
8     x: T,
9 }
10
11 impl<T> c1<T> {
12     pub fn f1(&self, _x: isize) {
13     }
14 }
15
16 fn c1<T>(x: T) -> c1<T> {
17     c1 {
18         x: x
19     }
20 }
21
22 impl<T> c1<T> {
23     pub fn f2(&self, _x: isize) {
24     }
25 }
26
27
28 pub fn main() {
29     c1::<isize>(3).f1(4);
30     c1::<isize>(3).f2(4);
31 }