Rollup merge of #36044 - mikhail-m1:master, r=jonathandturner

update error E0450 to new format

Fixes #35925 as part of #35233.

I've solve the bonus, and I wonder if any simpler way to do this. But may be possible simplify if let expressions?

r? @jonathandturner
This commit is contained in:
Jonathan Turner 2016-08-27 12:43:31 -07:00 committed by GitHub
commit d00a89a9ff
2 changed files with 32 additions and 9 deletions

View file

@ -9,9 +9,13 @@
// except according to those terms.
mod Bar {
pub struct Foo(isize);
pub struct Foo( bool, pub i32, f32, bool);
//~^ NOTE private field declared here
//~| NOTE private field declared here
//~| NOTE private field declared here
}
fn main() {
let f = Bar::Foo(0); //~ ERROR E0450
let f = Bar::Foo(false,1,0.1, true); //~ ERROR E0450
//~^ NOTE cannot construct with a private field
}