mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 03:33:59 +00:00
20 lines
295 B
Rust
20 lines
295 B
Rust
//@ compile-flags: --crate-type lib
|
|
pub struct S {
|
|
pub val: string::MyString,
|
|
}
|
|
|
|
pub fn test(s: S) {
|
|
dbg!(s.cap) //~ ERROR: no field `cap` on type `S` [E0609]
|
|
}
|
|
|
|
pub(crate) mod string {
|
|
|
|
pub struct MyString {
|
|
buf: MyVec,
|
|
}
|
|
|
|
struct MyVec {
|
|
cap: usize,
|
|
}
|
|
}
|