Auto merge of #31777 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #31721, #31737, #31741, #31750, #31763, #31764, #31765, #31775 - Failed merges:
This commit is contained in:
commit
d3ffad7a38
9 changed files with 47 additions and 32 deletions
14
src/test/compile-fail/issue-31769.rs
Normal file
14
src/test/compile-fail/issue-31769.rs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
// Copyright 2012-2016 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
fn main() {
|
||||
#[inline] struct Foo; //~ ERROR attribute should be applied to function
|
||||
#[repr(C)] fn foo() {} //~ ERROR attribute should be applied to struct or enum
|
||||
}
|
||||
|
|
@ -63,25 +63,25 @@ fn this_crate() {
|
|||
let c = a::C(2, 3); //~ ERROR: cannot invoke tuple struct constructor
|
||||
let d = a::D(4);
|
||||
|
||||
let a::A(()) = a; //~ ERROR: field #1 of struct `a::A` is private
|
||||
let a::A(()) = a; //~ ERROR: field #0 of struct `a::A` is private
|
||||
let a::A(_) = a;
|
||||
match a { a::A(()) => {} } //~ ERROR: field #1 of struct `a::A` is private
|
||||
match a { a::A(()) => {} } //~ ERROR: field #0 of struct `a::A` is private
|
||||
match a { a::A(_) => {} }
|
||||
|
||||
let a::B(_) = b;
|
||||
let a::B(_b) = b; //~ ERROR: field #1 of struct `a::B` is private
|
||||
let a::B(_b) = b; //~ ERROR: field #0 of struct `a::B` is private
|
||||
match b { a::B(_) => {} }
|
||||
match b { a::B(_b) => {} } //~ ERROR: field #1 of struct `a::B` is private
|
||||
match b { a::B(1) => {} a::B(_) => {} } //~ ERROR: field #1 of struct `a::B` is private
|
||||
match b { a::B(_b) => {} } //~ ERROR: field #0 of struct `a::B` is private
|
||||
match b { a::B(1) => {} a::B(_) => {} } //~ ERROR: field #0 of struct `a::B` is private
|
||||
|
||||
let a::C(_, _) = c;
|
||||
let a::C(_a, _) = c;
|
||||
let a::C(_, _b) = c; //~ ERROR: field #2 of struct `a::C` is private
|
||||
let a::C(_a, _b) = c; //~ ERROR: field #2 of struct `a::C` is private
|
||||
let a::C(_, _b) = c; //~ ERROR: field #1 of struct `a::C` is private
|
||||
let a::C(_a, _b) = c; //~ ERROR: field #1 of struct `a::C` is private
|
||||
match c { a::C(_, _) => {} }
|
||||
match c { a::C(_a, _) => {} }
|
||||
match c { a::C(_, _b) => {} } //~ ERROR: field #2 of struct `a::C` is private
|
||||
match c { a::C(_a, _b) => {} } //~ ERROR: field #2 of struct `a::C` is private
|
||||
match c { a::C(_, _b) => {} } //~ ERROR: field #1 of struct `a::C` is private
|
||||
match c { a::C(_a, _b) => {} } //~ ERROR: field #1 of struct `a::C` is private
|
||||
|
||||
let a::D(_) = d;
|
||||
let a::D(_d) = d;
|
||||
|
|
@ -101,30 +101,30 @@ fn xcrate() {
|
|||
let c = other::C(2, 3); //~ ERROR: cannot invoke tuple struct constructor
|
||||
let d = other::D(4);
|
||||
|
||||
let other::A(()) = a; //~ ERROR: field #1 of struct `other::A` is private
|
||||
let other::A(()) = a; //~ ERROR: field #0 of struct `other::A` is private
|
||||
let other::A(_) = a;
|
||||
match a { other::A(()) => {} }
|
||||
//~^ ERROR: field #1 of struct `other::A` is private
|
||||
//~^ ERROR: field #0 of struct `other::A` is private
|
||||
match a { other::A(_) => {} }
|
||||
|
||||
let other::B(_) = b;
|
||||
let other::B(_b) = b; //~ ERROR: field #1 of struct `other::B` is private
|
||||
let other::B(_b) = b; //~ ERROR: field #0 of struct `other::B` is private
|
||||
match b { other::B(_) => {} }
|
||||
match b { other::B(_b) => {} }
|
||||
//~^ ERROR: field #1 of struct `other::B` is private
|
||||
//~^ ERROR: field #0 of struct `other::B` is private
|
||||
match b { other::B(1) => {} other::B(_) => {} }
|
||||
//~^ ERROR: field #1 of struct `other::B` is private
|
||||
//~^ ERROR: field #0 of struct `other::B` is private
|
||||
|
||||
let other::C(_, _) = c;
|
||||
let other::C(_a, _) = c;
|
||||
let other::C(_, _b) = c; //~ ERROR: field #2 of struct `other::C` is private
|
||||
let other::C(_a, _b) = c; //~ ERROR: field #2 of struct `other::C` is private
|
||||
let other::C(_, _b) = c; //~ ERROR: field #1 of struct `other::C` is private
|
||||
let other::C(_a, _b) = c; //~ ERROR: field #1 of struct `other::C` is private
|
||||
match c { other::C(_, _) => {} }
|
||||
match c { other::C(_a, _) => {} }
|
||||
match c { other::C(_, _b) => {} }
|
||||
//~^ ERROR: field #2 of struct `other::C` is private
|
||||
//~^ ERROR: field #1 of struct `other::C` is private
|
||||
match c { other::C(_a, _b) => {} }
|
||||
//~^ ERROR: field #2 of struct `other::C` is private
|
||||
//~^ ERROR: field #1 of struct `other::C` is private
|
||||
|
||||
let other::D(_) = d;
|
||||
let other::D(_d) = d;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue