]> git.lizzy.rs Git - rust.git/blob - src/test/ui/auxiliary/nested_item.rs
Merge commit 'cd4810de42c57b64b74dae09c530a4c3a41f87b9' into libgccjit-codegen
[rust.git] / src / test / ui / auxiliary / nested_item.rs
1 // original problem
2 pub fn foo<T>() -> isize {
3     {
4         static foo: isize = 2;
5         foo
6     }
7 }
8
9 // issue 8134
10 struct Foo;
11 impl Foo {
12     pub fn foo<T>(&self) {
13         static X: usize = 1;
14     }
15 }
16
17 // issue 8134
18 pub struct Parser<T>(T);
19 impl<T: std::iter::Iterator<Item=char>> Parser<T> {
20     fn in_doctype(&mut self) {
21         static DOCTYPEPattern: [char; 6] = ['O', 'C', 'T', 'Y', 'P', 'E'];
22     }
23 }
24
25 struct Bar;
26 impl Foo {
27     pub fn bar<T>(&self) {
28         static X: usize = 1;
29     }
30 }