Auto merge of #58010 - Zoxc:parallel-passes, r=michaelwoerister

Move privacy checking later in the pipeline and make some passes run in parallel

r? @michaelwoerister
This commit is contained in:
bors 2019-02-07 09:49:08 +00:00
commit ad433894ab
15 changed files with 157 additions and 104 deletions

View file

@ -1,4 +1,4 @@
mod Foo {
mod foo {
struct Bar(u32);
pub fn bar() -> Bar { //~ ERROR E0446

View file

@ -1,8 +1,8 @@
error[E0446]: private type `Foo::Bar` in public interface
error[E0446]: private type `foo::Bar` in public interface
--> $DIR/E0446.rs:4:5
|
LL | struct Bar(u32);
| - `Foo::Bar` declared as private
| - `foo::Bar` declared as private
LL |
LL | / pub fn bar() -> Bar { //~ ERROR E0446
LL | | Bar(0)

View file

@ -1,4 +1,4 @@
mod Bar {
mod bar {
pub struct Foo {
pub a: isize,
b: isize,
@ -10,10 +10,10 @@ mod Bar {
);
}
fn pat_match(foo: Bar::Foo) {
let Bar::Foo{a:a, b:b} = foo; //~ ERROR E0451
fn pat_match(foo: bar::Foo) {
let bar::Foo{a, b} = foo; //~ ERROR E0451
}
fn main() {
let f = Bar::Foo{ a: 0, b: 0 }; //~ ERROR E0451
let f = bar::Foo{ a: 0, b: 0 }; //~ ERROR E0451
}

View file

@ -1,13 +1,13 @@
error[E0451]: field `b` of struct `Bar::Foo` is private
--> $DIR/E0451.rs:14:23
error[E0451]: field `b` of struct `bar::Foo` is private
--> $DIR/E0451.rs:14:21
|
LL | let Bar::Foo{a:a, b:b} = foo; //~ ERROR E0451
| ^^^ field `b` is private
LL | let bar::Foo{a, b} = foo; //~ ERROR E0451
| ^ field `b` is private
error[E0451]: field `b` of struct `Bar::Foo` is private
error[E0451]: field `b` of struct `bar::Foo` is private
--> $DIR/E0451.rs:18:29
|
LL | let f = Bar::Foo{ a: 0, b: 0 }; //~ ERROR E0451
LL | let f = bar::Foo{ a: 0, b: 0 }; //~ ERROR E0451
| ^^^^ field `b` is private
error: aborting due to 2 previous errors