]> git.lizzy.rs Git - rust.git/commitdiff
add `//~ ERROR` line to test for privacy respecting FRU (RFC 736).
authorFelix S. Klock II <pnkfelix@pnkfx.org>
Tue, 10 Feb 2015 16:32:39 +0000 (17:32 +0100)
committerFelix S. Klock II <pnkfelix@pnkfx.org>
Tue, 10 Feb 2015 16:32:39 +0000 (17:32 +0100)
src/test/compile-fail/functional-struct-update-respects-privacy.rs

index c1619a38a293cddf669c5da308502b2cb26ac980..51e23a689a1ad148266a61102aa82a54ec66191d 100644 (file)
@@ -36,7 +36,7 @@ fn drop(&mut self) {
 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!
 }