1 // Copyright (C) 2016-2022 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 // See https://github.com/rust-lang/rust/pull/46457
26 pub static TWENTY_THREE : u16 = 23;
28 pub struct Generic<T>(T);
33 pub struct Type(usize, isize);
39 pub struct Type {pub x : u32}
41 fn wrap<T> (x: T) -> ::Generic<::Generic<T>> {
42 ::Generic(::Generic(x))
52 let m1t = ::mod1::Type(23, 97);
54 let innert = super::Type(10101.5);
55 let innertg = wrap(innert);
56 let innestt = self::Type{x: 0xfff};
57 let innesttg = wrap(innestt);
61 let f2 = || println!("lambda f2");
63 // Prevent linker from discarding symbol
64 let ptr: *const u16 = &::TWENTY_THREE;
66 f2(); // set breakpoint here
71 self::super::super::f2();
77 println!("mod1::inner::innest::f2");
81 println!("mod1::inner::innest::f3");
86 println!("mod1::inner::f2");
96 mod1::inner::innest::f1();