]> git.proxmox.com Git - rustc.git/blob - tests/ui/symbol-names/issue-53912.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / symbol-names / issue-53912.rs
1 // build-pass
2
3 // This test is the same code as in ui/symbol-names/issue-60925.rs but this checks that the
4 // reproduction compiles successfully and doesn't segfault, whereas that test just checks that the
5 // symbol mangling fix produces the correct result.
6
7 fn dummy() {}
8
9 mod llvm {
10 pub(crate) struct Foo;
11 }
12 mod foo {
13 pub(crate) struct Foo<T>(T);
14
15 impl Foo<::llvm::Foo> {
16 pub(crate) fn foo() {
17 for _ in 0..0 {
18 for _ in &[::dummy()] {
19 ::dummy();
20 ::dummy();
21 ::dummy();
22 }
23 }
24 }
25 }
26
27 pub(crate) fn foo() {
28 Foo::foo();
29 Foo::foo();
30 }
31 }
32
33 pub fn foo() {
34 foo::foo();
35 }
36
37 fn main() {}