Auto merge of #101949 - matthiaskrgr:rollup-xu5cqnd, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #101093 (Initial version of 1.64 release notes) - #101713 (change AccessLevels representation) - #101821 (Bump Unicode to version 15.0.0, regenerate tables) - #101826 (Enforce "joined()" and "joined_with_noop()" test) - #101835 (Allow using vendoring when running bootstrap from outside the source root) - #101942 (Revert "Copy stage0 binaries into stage0-sysroot") - #101943 (rustdoc: remove unused CSS `.non-exhaustive { margin-bottom }`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
5253b0a0a1
22 changed files with 600 additions and 376 deletions
|
|
@ -778,7 +778,8 @@ class RustBuild(object):
|
|||
elif color == "never":
|
||||
args.append("--color=never")
|
||||
|
||||
run(args, env=env, verbose=self.verbose)
|
||||
# Run this from the source directory so cargo finds .cargo/config
|
||||
run(args, env=env, verbose=self.verbose, cwd=self.rust_root)
|
||||
|
||||
def build_triple(self):
|
||||
"""Build triple as in LLVM
|
||||
|
|
|
|||
|
|
@ -1325,6 +1325,9 @@ impl<'a> Builder<'a> {
|
|||
) -> Cargo {
|
||||
let mut cargo = Command::new(&self.initial_cargo);
|
||||
let out_dir = self.stage_out(compiler, mode);
|
||||
// Run cargo from the source root so it can find .cargo/config.
|
||||
// This matters when using vendoring and the working directory is outside the repository.
|
||||
cargo.current_dir(&self.src);
|
||||
|
||||
// Codegen backends are not yet tracked by -Zbinary-dep-depinfo,
|
||||
// so we need to explicitly clear out if they've been updated.
|
||||
|
|
|
|||
|
|
@ -436,43 +436,6 @@ impl Step for StdLink {
|
|||
let libdir = builder.sysroot_libdir(target_compiler, target);
|
||||
let hostdir = builder.sysroot_libdir(target_compiler, compiler.host);
|
||||
add_to_sysroot(builder, &libdir, &hostdir, &libstd_stamp(builder, compiler, target));
|
||||
|
||||
if compiler.stage == 0 {
|
||||
// special handling for stage0, to make `rustup toolchain link` and `x dist --stage 0`
|
||||
// work for stage0-sysroot
|
||||
|
||||
// copy bin files from stage0/bin to stage0-sysroot/bin
|
||||
let sysroot = builder.out.join(&compiler.host.triple).join("stage0-sysroot");
|
||||
|
||||
let host = compiler.host.triple;
|
||||
let stage0_bin_dir = builder.out.join(&host).join("stage0/bin");
|
||||
let sysroot_bin_dir = sysroot.join("bin");
|
||||
t!(fs::create_dir_all(&sysroot_bin_dir));
|
||||
builder.cp_r(&stage0_bin_dir, &sysroot_bin_dir);
|
||||
|
||||
// copy all *.so files from stage0/lib to stage0-sysroot/lib
|
||||
let stage0_lib_dir = builder.out.join(&host).join("stage0/lib");
|
||||
if let Ok(files) = fs::read_dir(&stage0_lib_dir) {
|
||||
for file in files {
|
||||
let file = t!(file);
|
||||
let path = file.path();
|
||||
if path.is_file() && is_dylib(&file.file_name().into_string().unwrap()) {
|
||||
builder.copy(&path, &sysroot.join("lib").join(path.file_name().unwrap()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// copy codegen-backends from stage0
|
||||
let sysroot_codegen_backends = builder.sysroot_codegen_backends(compiler);
|
||||
t!(fs::create_dir_all(&sysroot_codegen_backends));
|
||||
let stage0_codegen_backends = builder
|
||||
.out
|
||||
.join(&host)
|
||||
.join("stage0/lib/rustlib")
|
||||
.join(&host)
|
||||
.join("codegen-backends");
|
||||
builder.cp_r(&stage0_codegen_backends, &sysroot_codegen_backends);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ use rustc_hir::intravisit::{self, Visitor};
|
|||
use rustc_hir::{HirId, Path, TraitCandidate};
|
||||
use rustc_interface::interface;
|
||||
use rustc_middle::hir::nested_filter;
|
||||
use rustc_middle::middle::privacy::AccessLevels;
|
||||
use rustc_middle::ty::{ParamEnv, Ty, TyCtxt};
|
||||
use rustc_resolve as resolve;
|
||||
use rustc_session::config::{self, CrateType, ErrorOutputType};
|
||||
|
|
@ -364,9 +363,7 @@ pub(crate) fn run_global_ctxt(
|
|||
.copied()
|
||||
.filter(|&trait_def_id| tcx.trait_is_auto(trait_def_id))
|
||||
.collect();
|
||||
let access_levels = AccessLevels {
|
||||
map: tcx.privacy_access_levels(()).map.iter().map(|(k, v)| (k.to_def_id(), *v)).collect(),
|
||||
};
|
||||
let access_levels = tcx.privacy_access_levels(()).map_id(Into::into);
|
||||
|
||||
let mut ctxt = DocContext {
|
||||
tcx,
|
||||
|
|
|
|||
|
|
@ -1562,10 +1562,6 @@ ul.all-items > li {
|
|||
list-style: none;
|
||||
}
|
||||
|
||||
.non-exhaustive {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
details.dir-entry {
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -230,7 +230,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
|
|||
} else {
|
||||
// All items need to be handled here in case someone wishes to link
|
||||
// to them with intra-doc links
|
||||
self.cx.cache.access_levels.map.insert(did, AccessLevel::Public);
|
||||
self.cx.cache.access_levels.set_access_level(did, AccessLevel::Public);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,10 +38,10 @@ impl<'a, 'tcx> LibEmbargoVisitor<'a, 'tcx> {
|
|||
fn update(&mut self, did: DefId, level: Option<AccessLevel>) -> Option<AccessLevel> {
|
||||
let is_hidden = self.tcx.is_doc_hidden(did);
|
||||
|
||||
let old_level = self.access_levels.map.get(&did).cloned();
|
||||
let old_level = self.access_levels.get_access_level(did);
|
||||
// Accessibility levels can only grow
|
||||
if level > old_level && !is_hidden {
|
||||
self.access_levels.map.insert(did, level.unwrap());
|
||||
self.access_levels.set_access_level(did, level.unwrap());
|
||||
level
|
||||
} else {
|
||||
old_level
|
||||
|
|
|
|||
|
|
@ -67,9 +67,7 @@ async fn joined() {
|
|||
let c = Big::new();
|
||||
|
||||
fut().await;
|
||||
noop();
|
||||
joiner = Joiner { a: Some(a), b: Some(b), c: Some(c) };
|
||||
noop();
|
||||
}
|
||||
|
||||
async fn joined_with_noop() {
|
||||
|
|
@ -97,7 +95,7 @@ async fn join_retval() -> Joiner {
|
|||
fn main() {
|
||||
assert_eq!(2, std::mem::size_of_val(&single()));
|
||||
assert_eq!(3, std::mem::size_of_val(&single_with_noop()));
|
||||
assert_eq!(3078, std::mem::size_of_val(&joined()));
|
||||
assert_eq!(3074, std::mem::size_of_val(&joined()));
|
||||
assert_eq!(3078, std::mem::size_of_val(&joined_with_noop()));
|
||||
assert_eq!(3074, std::mem::size_of_val(&join_retval()));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,49 +1,62 @@
|
|||
#![feature(rustc_attrs)]
|
||||
|
||||
#[rustc_access_level] mod outer { //~ ERROR None
|
||||
#[rustc_access_level] pub mod inner { //~ ERROR Some(Exported)
|
||||
#[rustc_access_level]
|
||||
extern "C" { //~ ERROR Some(Exported)
|
||||
#[rustc_access_level] static a: u8; //~ ERROR None
|
||||
#[rustc_access_level] pub fn b(); //~ ERROR Some(Exported)
|
||||
}
|
||||
#[rustc_access_level]
|
||||
pub trait Trait { //~ ERROR Some(Exported)
|
||||
#[rustc_access_level] const A: i32; //~ ERROR Some(Exported)
|
||||
#[rustc_access_level] type B; //~ ERROR Some(Exported)
|
||||
#[rustc_effective_visibility]
|
||||
mod outer { //~ ERROR Public: pub(self), Exported: pub(self), Reachable: pub(self), ReachableFromImplTrait: pub(self)
|
||||
#[rustc_effective_visibility]
|
||||
pub mod inner1 { //~ ERROR Public: pub(self), Exported: pub, Reachable: pub, ReachableFromImplTrait: pub
|
||||
|
||||
#[rustc_effective_visibility]
|
||||
extern "C" {} //~ ERROR Public: pub(self), Exported: pub, Reachable: pub, ReachableFromImplTrait: pub
|
||||
|
||||
#[rustc_effective_visibility]
|
||||
pub trait PubTrait { //~ ERROR Public: pub(self), Exported: pub, Reachable: pub, ReachableFromImplTrait: pub
|
||||
#[rustc_effective_visibility]
|
||||
const A: i32; //~ ERROR Public: pub(self), Exported: pub, Reachable: pub, ReachableFromImplTrait: pub
|
||||
#[rustc_effective_visibility]
|
||||
type B; //~ ERROR Public: pub(self), Exported: pub, Reachable: pub, ReachableFromImplTrait: pub
|
||||
}
|
||||
|
||||
#[rustc_access_level]
|
||||
pub struct Struct { //~ ERROR Some(Exported)
|
||||
#[rustc_access_level] a: u8, //~ ERROR None
|
||||
#[rustc_access_level] pub b: u8, //~ ERROR Some(Exported)
|
||||
#[rustc_effective_visibility]
|
||||
struct PrivStruct; //~ ERROR Public: pub(self), Exported: pub(self), Reachable: pub(self), ReachableFromImplTrait: pub(self)
|
||||
|
||||
#[rustc_effective_visibility]
|
||||
pub union PubUnion { //~ ERROR Public: pub(self), Exported: pub, Reachable: pub, ReachableFromImplTrait: pub
|
||||
#[rustc_effective_visibility]
|
||||
a: u8, //~ ERROR Public: pub(self), Exported: pub(self), Reachable: pub(self), ReachableFromImplTrait: pub(self)
|
||||
#[rustc_effective_visibility]
|
||||
pub b: u8, //~ ERROR Public: pub(self), Exported: pub, Reachable: pub, ReachableFromImplTrait: pub
|
||||
}
|
||||
|
||||
#[rustc_access_level]
|
||||
pub union Union { //~ ERROR Some(Exported)
|
||||
#[rustc_access_level] a: u8, //~ ERROR None
|
||||
#[rustc_access_level] pub b: u8, //~ ERROR Some(Exported)
|
||||
}
|
||||
|
||||
#[rustc_access_level]
|
||||
pub enum Enum { //~ ERROR Some(Exported)
|
||||
#[rustc_access_level] A( //~ ERROR Some(Exported)
|
||||
#[rustc_access_level] Struct, //~ ERROR Some(Exported)
|
||||
#[rustc_access_level] Union, //~ ERROR Some(Exported)
|
||||
#[rustc_effective_visibility]
|
||||
pub enum Enum { //~ ERROR Public: pub(self), Exported: pub, Reachable: pub, ReachableFromImplTrait: pub
|
||||
#[rustc_effective_visibility]
|
||||
A( //~ ERROR Public: pub(self), Exported: pub, Reachable: pub, ReachableFromImplTrait: pub
|
||||
#[rustc_effective_visibility]
|
||||
PubUnion, //~ ERROR Public: pub(self), Exported: pub, Reachable: pub, ReachableFromImplTrait: pub
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
#[rustc_access_level] macro_rules! none_macro { //~ ERROR None
|
||||
#[rustc_effective_visibility]
|
||||
macro_rules! none_macro { //~ Public: pub(self), Exported: pub(self), Reachable: pub(self), ReachableFromImplTrait: pub(self)
|
||||
() => {};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
#[rustc_access_level] macro_rules! public_macro { //~ ERROR Some(Public)
|
||||
#[rustc_effective_visibility]
|
||||
macro_rules! public_macro { //~ Public: pub, Exported: pub, Reachable: pub, ReachableFromImplTrait: pub
|
||||
() => {};
|
||||
}
|
||||
|
||||
#[rustc_effective_visibility]
|
||||
pub struct ReachableStruct { //~ ERROR Public: pub(self), Exported: pub(self), Reachable: pub, ReachableFromImplTrait: pub
|
||||
#[rustc_effective_visibility]
|
||||
pub a: u8, //~ ERROR Public: pub(self), Exported: pub(self), Reachable: pub, ReachableFromImplTrait: pub
|
||||
}
|
||||
}
|
||||
|
||||
pub use outer::inner;
|
||||
pub use outer::inner1;
|
||||
|
||||
pub fn foo() -> outer::ReachableStruct { outer::ReachableStruct {a: 0} }
|
||||
|
||||
fn main() {}
|
||||
|
|
|
|||
|
|
@ -1,125 +1,104 @@
|
|||
error: None
|
||||
--> $DIR/access_levels.rs:3:23
|
||||
error: Public: pub(self), Exported: pub(self), Reachable: pub(self), ReachableFromImplTrait: pub(self)
|
||||
--> $DIR/access_levels.rs:4:1
|
||||
|
|
||||
LL | #[rustc_access_level] mod outer {
|
||||
| ^^^^^^^^^
|
||||
LL | mod outer {
|
||||
| ^^^^^^^^^
|
||||
|
||||
error: Some(Exported)
|
||||
--> $DIR/access_levels.rs:4:27
|
||||
error: Public: pub(self), Exported: pub, Reachable: pub, ReachableFromImplTrait: pub
|
||||
--> $DIR/access_levels.rs:6:5
|
||||
|
|
||||
LL | #[rustc_access_level] pub mod inner {
|
||||
| ^^^^^^^^^^^^^
|
||||
LL | pub mod inner1 {
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
||||
error: Some(Exported)
|
||||
--> $DIR/access_levels.rs:6:9
|
||||
error: Public: pub(self), Exported: pub, Reachable: pub, ReachableFromImplTrait: pub
|
||||
--> $DIR/access_levels.rs:9:9
|
||||
|
|
||||
LL | / extern "C" {
|
||||
LL | | #[rustc_access_level] static a: u8;
|
||||
LL | | #[rustc_access_level] pub fn b();
|
||||
LL | | }
|
||||
| |_________^
|
||||
LL | extern "C" {}
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error: Some(Exported)
|
||||
--> $DIR/access_levels.rs:11:9
|
||||
error: Public: pub(self), Exported: pub, Reachable: pub, ReachableFromImplTrait: pub
|
||||
--> $DIR/access_levels.rs:12:9
|
||||
|
|
||||
LL | pub trait Trait {
|
||||
| ^^^^^^^^^^^^^^^
|
||||
LL | pub trait PubTrait {
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: Some(Exported)
|
||||
--> $DIR/access_levels.rs:17:9
|
||||
error: Public: pub(self), Exported: pub(self), Reachable: pub(self), ReachableFromImplTrait: pub(self)
|
||||
--> $DIR/access_levels.rs:20:9
|
||||
|
|
||||
LL | pub struct Struct {
|
||||
LL | struct PrivStruct;
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: None
|
||||
--> $DIR/access_levels.rs:18:35
|
||||
|
|
||||
LL | #[rustc_access_level] a: u8,
|
||||
| ^^^^^
|
||||
|
||||
error: Some(Exported)
|
||||
--> $DIR/access_levels.rs:19:35
|
||||
|
|
||||
LL | #[rustc_access_level] pub b: u8,
|
||||
| ^^^^^^^^^
|
||||
|
||||
error: Some(Exported)
|
||||
error: Public: pub(self), Exported: pub, Reachable: pub, ReachableFromImplTrait: pub
|
||||
--> $DIR/access_levels.rs:23:9
|
||||
|
|
||||
LL | pub union Union {
|
||||
| ^^^^^^^^^^^^^^^
|
||||
LL | pub union PubUnion {
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: None
|
||||
--> $DIR/access_levels.rs:24:35
|
||||
error: Public: pub(self), Exported: pub(self), Reachable: pub(self), ReachableFromImplTrait: pub(self)
|
||||
--> $DIR/access_levels.rs:25:13
|
||||
|
|
||||
LL | #[rustc_access_level] a: u8,
|
||||
| ^^^^^
|
||||
LL | a: u8,
|
||||
| ^^^^^
|
||||
|
||||
error: Some(Exported)
|
||||
--> $DIR/access_levels.rs:25:35
|
||||
error: Public: pub(self), Exported: pub, Reachable: pub, ReachableFromImplTrait: pub
|
||||
--> $DIR/access_levels.rs:27:13
|
||||
|
|
||||
LL | #[rustc_access_level] pub b: u8,
|
||||
| ^^^^^^^^^
|
||||
LL | pub b: u8,
|
||||
| ^^^^^^^^^
|
||||
|
||||
error: Some(Exported)
|
||||
--> $DIR/access_levels.rs:29:9
|
||||
error: Public: pub(self), Exported: pub, Reachable: pub, ReachableFromImplTrait: pub
|
||||
--> $DIR/access_levels.rs:31:9
|
||||
|
|
||||
LL | pub enum Enum {
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error: Some(Exported)
|
||||
--> $DIR/access_levels.rs:30:35
|
||||
error: Public: pub(self), Exported: pub, Reachable: pub, ReachableFromImplTrait: pub
|
||||
--> $DIR/access_levels.rs:33:13
|
||||
|
|
||||
LL | #[rustc_access_level] A(
|
||||
| ^
|
||||
LL | A(
|
||||
| ^
|
||||
|
||||
error: Some(Exported)
|
||||
--> $DIR/access_levels.rs:31:39
|
||||
error: Public: pub(self), Exported: pub, Reachable: pub, ReachableFromImplTrait: pub
|
||||
--> $DIR/access_levels.rs:35:17
|
||||
|
|
||||
LL | #[rustc_access_level] Struct,
|
||||
| ^^^^^^
|
||||
LL | PubUnion,
|
||||
| ^^^^^^^^
|
||||
|
||||
error: Some(Exported)
|
||||
--> $DIR/access_levels.rs:32:39
|
||||
error: Public: pub(self), Exported: pub(self), Reachable: pub(self), ReachableFromImplTrait: pub(self)
|
||||
--> $DIR/access_levels.rs:41:5
|
||||
|
|
||||
LL | #[rustc_access_level] Union,
|
||||
| ^^^^^
|
||||
LL | macro_rules! none_macro {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: None
|
||||
--> $DIR/access_levels.rs:37:27
|
||||
error: Public: pub, Exported: pub, Reachable: pub, ReachableFromImplTrait: pub
|
||||
--> $DIR/access_levels.rs:47:5
|
||||
|
|
||||
LL | #[rustc_access_level] macro_rules! none_macro {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | macro_rules! public_macro {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: Some(Public)
|
||||
--> $DIR/access_levels.rs:42:27
|
||||
error: Public: pub(self), Exported: pub(self), Reachable: pub, ReachableFromImplTrait: pub
|
||||
--> $DIR/access_levels.rs:52:5
|
||||
|
|
||||
LL | #[rustc_access_level] macro_rules! public_macro {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | pub struct ReachableStruct {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: Some(Exported)
|
||||
--> $DIR/access_levels.rs:12:35
|
||||
error: Public: pub(self), Exported: pub(self), Reachable: pub, ReachableFromImplTrait: pub
|
||||
--> $DIR/access_levels.rs:54:9
|
||||
|
|
||||
LL | #[rustc_access_level] const A: i32;
|
||||
| ^^^^^^^^^^^^
|
||||
LL | pub a: u8,
|
||||
| ^^^^^^^^^
|
||||
|
||||
error: Some(Exported)
|
||||
--> $DIR/access_levels.rs:13:35
|
||||
error: Public: pub(self), Exported: pub, Reachable: pub, ReachableFromImplTrait: pub
|
||||
--> $DIR/access_levels.rs:14:13
|
||||
|
|
||||
LL | #[rustc_access_level] type B;
|
||||
| ^^^^^^
|
||||
LL | const A: i32;
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
error: None
|
||||
--> $DIR/access_levels.rs:7:35
|
||||
error: Public: pub(self), Exported: pub, Reachable: pub, ReachableFromImplTrait: pub
|
||||
--> $DIR/access_levels.rs:16:13
|
||||
|
|
||||
LL | #[rustc_access_level] static a: u8;
|
||||
| ^^^^^^^^^^^^
|
||||
LL | type B;
|
||||
| ^^^^^^
|
||||
|
||||
error: Some(Exported)
|
||||
--> $DIR/access_levels.rs:8:35
|
||||
|
|
||||
LL | #[rustc_access_level] pub fn b();
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: aborting due to 20 previous errors
|
||||
error: aborting due to 17 previous errors
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue