mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-27 16:06:03 +00:00
add //~ ERROR
line to test for privacy respecting FRU (RFC 736).
This commit is contained in:
parent
0a0aa11bb1
commit
3f5af9f34d
@ -36,7 +36,7 @@ mod foo {
|
||||
fn main() {
|
||||
let s_1 = foo::make_secrets(3, format!("ess one"));
|
||||
let s_2 = foo::S { b: format!("ess two"), ..s_1 }; // FRU ...
|
||||
|
||||
//~^ ERROR field `secret_uid` of struct `foo::S` is private
|
||||
println!("main forged an S named: {}", s_2.b);
|
||||
// at end of scope, ... both s_1 *and* s_2 get dropped. Boom!
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user