rust/tests/ui/issues/issue-2445.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
355 B
Rust
Raw Normal View History

// run-pass
#![allow(dead_code)]
#![allow(non_camel_case_types)]
// pretty-expanded FIXME #23616
struct c1<T> {
2012-09-06 21:40:15 -05:00
x: T,
}
impl<T> c1<T> {
2013-08-17 10:37:42 -05:00
pub fn f1(&self, _x: T) {}
2012-06-25 15:16:47 -05:00
}
fn c1<T>(x: T) -> c1<T> {
2012-09-05 17:58:43 -05:00
c1 {
x: x
}
}
impl<T> c1<T> {
2013-08-17 10:37:42 -05:00
pub fn f2(&self, _x: T) {}
2012-06-25 15:16:47 -05:00
}
pub fn main() {
c1::<isize>(3).f1(4);
c1::<isize>(3).f2(4);
2012-06-25 15:16:47 -05:00
}