]>
Commit | Line | Data |
---|---|---|
5099ac24 FG |
1 | // compile-flags: --crate-type lib |
2 | pub struct S { | |
3 | pub val: string::MyString, | |
4 | } | |
5 | ||
6 | pub fn test(s: S) { | |
7 | dbg!(s.cap) //~ ERROR: no field `cap` on type `S` [E0609] | |
8 | } | |
9 | ||
10 | pub(crate) mod string { | |
11 | ||
12 | pub struct MyString { | |
13 | buf: MyVec, | |
14 | } | |
15 | ||
16 | struct MyVec { | |
17 | cap: usize, | |
18 | } | |
19 | } |