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
357 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-07 02:40:15 +00:00
x: T,
}
impl<T> c1<T> {
2013-08-17 15:37:42 +00:00
pub fn f1(&self, _x: T) {}
2012-06-25 20:16:47 +00:00
}
fn c1<T>(x: T) -> c1<T> {
2012-09-05 22:58:43 +00:00
c1 {
x: x
}
}
impl<T> c1<T> {
2013-08-17 15:37:42 +00:00
pub fn f2(&self, _x: T) {}
2012-06-25 20:16:47 +00:00
}
pub fn main() {
c1::<isize>(3).f1(4);
c1::<isize>(3).f2(4);
2012-06-25 20:16:47 +00:00
}