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:
commit
17656ab328
28 changed files with 78 additions and 107 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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)]
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
// aux-build:pub_restricted.rs
|
||||
|
||||
#![feature(pub_restricted)]
|
||||
#![deny(private_in_public)]
|
||||
#![allow(warnings)]
|
||||
extern crate pub_restricted;
|
||||
|
|
|
|||
|
|
@ -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)));
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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;)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue