1 // Copyright (C) 2016-2017 Free Software Foundation, Inc.
3 // This program is free software; you can redistribute it and/or modify
4 // it under the terms of the GNU General Public License as published by
5 // the Free Software Foundation; either version 3 of the License, or
6 // (at your option) any later version.
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
13 // You should have received a copy of the GNU General Public License
14 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #![allow(unused_variables)]
18 #![allow(unused_assignments)]
24 pub struct Generic<T>(T);
29 pub struct Type(usize, isize);
35 pub struct Type {pub x : u32}
37 fn wrap<T> (x: T) -> ::Generic<::Generic<T>> {
38 ::Generic(::Generic(x))
48 let m1t = ::mod1::Type(23, 97);
50 let innert = super::Type(10101.5);
51 let innertg = wrap(innert);
52 let innestt = self::Type{x: 0xfff};
53 let innesttg = wrap(innestt);
57 let f2 = || println!("lambda f2");
59 f2(); // set breakpoint here
64 self::super::super::f2();
70 println!("mod1::inner::innest::f2");
74 println!("mod1::inner::innest::f3");
79 println!("mod1::inner::f2");
89 mod1::inner::innest::f1();