Rollup merge of #40556 - cramertj:stabilize-pub-restricted, r=petrochenkov

Stabilize pub(restricted)

Fix https://github.com/rust-lang/rust/issues/32409
This commit is contained in:
Corey Farwell 2017-03-20 23:44:59 -04:00 committed by GitHub
commit 17656ab328
28 changed files with 78 additions and 107 deletions

View file

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(pub_restricted)]
#![deny(unused)]
mod foo {

View file

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(pub_restricted)]
pub(crate) struct Crate;
#[derive(Default)]
pub struct Universe {

View file

@ -1,27 +0,0 @@
// Copyright 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.
// gate-test-pub_restricted
pub(crate) //~ ERROR experimental
mod foo {}
pub(self) //~ ERROR experimental
mod bar {}
struct S {
pub(self) x: i32, //~ ERROR experimental
}
impl S {
pub(self) fn f() {} //~ ERROR experimental
}
extern {
pub(self) fn f(); //~ ERROR experimental
}

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(rustc_attrs, pub_restricted)]
#![feature(rustc_attrs)]
#![allow(warnings)]
mod foo {

View file

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(pub_restricted)]
mod foo {
struct Priv;
mod bar {

View file

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(pub_restricted)]
#![deny(private_in_public)]
#![allow(warnings)]

View file

@ -10,7 +10,6 @@
// aux-build:pub_restricted.rs
#![feature(pub_restricted)]
#![deny(private_in_public)]
#![allow(warnings)]
extern crate pub_restricted;

View file

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(pub_restricted)]
mod foo {
type T = ();
struct S1(pub(foo) (), pub(T), pub(crate) (), pub(((), T)));

View file

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(pub_restricted)]
macro_rules! define_struct {
($t:ty) => {
struct S1(pub $t);

View file

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(pub_restricted)]
macro_rules! define_struct {
($t:ty) => {
struct S1(pub($t));

View file

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(pub_restricted)]
macro_rules! m {
($p: path) => (pub(in $p) struct Z;)
}

View file

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(pub_restricted)]
#![feature(untagged_unions)]
mod m {

View file

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(pub_restricted)]
#![feature(untagged_unions)]
mod m {

View file

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(pub_restricted)]
enum E {}
trait Tr {}