Auto merge of #84684 - jackh726:rollup-qxc5cos, r=jackh726
Rollup of 11 pull requests Successful merges: - #84484 (Don't rebuild rustdoc and clippy after checking bootstrap) - #84530 (`test tidy` should ignore alternative `build` dir patterns) - #84531 (Ignore commented out lines when finding features) - #84540 (Build sanitizers for x86_64-unknown-linux-musl) - #84555 (Set `backtrace-on-ice` by default for compiler and codegen profiles) - #84585 (Add `x.py check src/librustdoc` as an alias for `x.py check src/tools/rustdoc`) - #84636 (rustdoc: change aliases attribute to data-aliases) - #84646 (Add some regression tests related to #82494) - #84661 (Remove extra word in `rustc_mir` docs) - #84663 (Remove `DropGuard` in `sys::windows::process` and use `StaticMutex` instead) - #84668 (Update books) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
d337cec9af
@ -97,7 +97,7 @@ macro_rules! span_mirbug_and_err {
|
|||||||
|
|
||||||
/// Type checks the given `mir` in the context of the inference
|
/// Type checks the given `mir` in the context of the inference
|
||||||
/// context `infcx`. Returns any region constraints that have yet to
|
/// context `infcx`. Returns any region constraints that have yet to
|
||||||
/// be proven. This result is includes liveness constraints that
|
/// be proven. This result includes liveness constraints that
|
||||||
/// ensure that regions appearing in the types of all local variables
|
/// ensure that regions appearing in the types of all local variables
|
||||||
/// are live at all points where that local variable may later be
|
/// are live at all points where that local variable may later be
|
||||||
/// used.
|
/// used.
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
use crate::sys::cvt;
|
use crate::sys::cvt;
|
||||||
use crate::sys::fs::{File, OpenOptions};
|
use crate::sys::fs::{File, OpenOptions};
|
||||||
use crate::sys::handle::Handle;
|
use crate::sys::handle::Handle;
|
||||||
use crate::sys::mutex::Mutex;
|
|
||||||
use crate::sys::pipe::{self, AnonPipe};
|
use crate::sys::pipe::{self, AnonPipe};
|
||||||
use crate::sys::stdio;
|
use crate::sys::stdio;
|
||||||
|
use crate::sys_common::mutex::StaticMutex;
|
||||||
use crate::sys_common::process::{CommandEnv, CommandEnvs};
|
use crate::sys_common::process::{CommandEnv, CommandEnvs};
|
||||||
use crate::sys_common::AsInner;
|
use crate::sys_common::AsInner;
|
||||||
|
|
||||||
@ -94,10 +94,6 @@ pub struct StdioPipes {
|
|||||||
pub stderr: Option<AnonPipe>,
|
pub stderr: Option<AnonPipe>,
|
||||||
}
|
}
|
||||||
|
|
||||||
struct DropGuard<'a> {
|
|
||||||
lock: &'a Mutex,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Command {
|
impl Command {
|
||||||
pub fn new(program: &OsStr) -> Command {
|
pub fn new(program: &OsStr) -> Command {
|
||||||
Command {
|
Command {
|
||||||
@ -209,8 +205,9 @@ pub fn spawn(
|
|||||||
//
|
//
|
||||||
// For more information, msdn also has an article about this race:
|
// For more information, msdn also has an article about this race:
|
||||||
// http://support.microsoft.com/kb/315939
|
// http://support.microsoft.com/kb/315939
|
||||||
static CREATE_PROCESS_LOCK: Mutex = Mutex::new();
|
static CREATE_PROCESS_LOCK: StaticMutex = StaticMutex::new();
|
||||||
let _guard = DropGuard::new(&CREATE_PROCESS_LOCK);
|
|
||||||
|
let _guard = unsafe { CREATE_PROCESS_LOCK.lock() };
|
||||||
|
|
||||||
let mut pipes = StdioPipes { stdin: None, stdout: None, stderr: None };
|
let mut pipes = StdioPipes { stdin: None, stdout: None, stderr: None };
|
||||||
let null = Stdio::Null;
|
let null = Stdio::Null;
|
||||||
@ -259,23 +256,6 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> DropGuard<'a> {
|
|
||||||
fn new(lock: &'a Mutex) -> DropGuard<'a> {
|
|
||||||
unsafe {
|
|
||||||
lock.lock();
|
|
||||||
DropGuard { lock }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<'a> Drop for DropGuard<'a> {
|
|
||||||
fn drop(&mut self) {
|
|
||||||
unsafe {
|
|
||||||
self.lock.unlock();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Stdio {
|
impl Stdio {
|
||||||
fn to_handle(&self, stdio_id: c::DWORD, pipe: &mut Option<AnonPipe>) -> io::Result<Handle> {
|
fn to_handle(&self, stdio_id: c::DWORD, pipe: &mut Option<AnonPipe>) -> io::Result<Handle> {
|
||||||
match *self {
|
match *self {
|
||||||
|
@ -7,6 +7,8 @@ merge_derives = false
|
|||||||
# tidy only checks files which are not ignored, each entry follows gitignore style
|
# tidy only checks files which are not ignored, each entry follows gitignore style
|
||||||
ignore = [
|
ignore = [
|
||||||
"/build/",
|
"/build/",
|
||||||
|
"/*-build/",
|
||||||
|
"/build-*/",
|
||||||
"/vendor/",
|
"/vendor/",
|
||||||
|
|
||||||
# tests for now are not formatted, as they are sometimes pretty-printing constrained
|
# tests for now are not formatted, as they are sometimes pretty-printing constrained
|
||||||
|
@ -280,7 +280,7 @@ fn run(self, builder: &Builder<'_>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
macro_rules! tool_check_step {
|
macro_rules! tool_check_step {
|
||||||
($name:ident, $path:expr, $source_type:expr) => {
|
($name:ident, $path:literal, $($alias:literal, )* $source_type:path) => {
|
||||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
||||||
pub struct $name {
|
pub struct $name {
|
||||||
pub target: TargetSelection,
|
pub target: TargetSelection,
|
||||||
@ -292,7 +292,7 @@ impl Step for $name {
|
|||||||
const DEFAULT: bool = true;
|
const DEFAULT: bool = true;
|
||||||
|
|
||||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||||
run.path($path)
|
run.paths(&[ $path, $($alias),* ])
|
||||||
}
|
}
|
||||||
|
|
||||||
fn make_run(run: RunConfig<'_>) {
|
fn make_run(run: RunConfig<'_>) {
|
||||||
@ -321,11 +321,9 @@ fn run(self, builder: &Builder<'_>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Enable internal lints for clippy and rustdoc
|
// Enable internal lints for clippy and rustdoc
|
||||||
// NOTE: this intentionally doesn't enable lints for any other tools,
|
// NOTE: this doesn't enable lints for any other tools unless they explicitly add `#![warn(rustc::internal)]`
|
||||||
// see https://github.com/rust-lang/rust/pull/80573#issuecomment-754010776
|
// See https://github.com/rust-lang/rust/pull/80573#issuecomment-754010776
|
||||||
if $path == "src/tools/rustdoc" || $path == "src/tools/clippy" {
|
cargo.rustflag("-Zunstable-options");
|
||||||
cargo.rustflag("-Zunstable-options");
|
|
||||||
}
|
|
||||||
|
|
||||||
builder.info(&format!(
|
builder.info(&format!(
|
||||||
"Checking stage{} {} artifacts ({} -> {})",
|
"Checking stage{} {} artifacts ({} -> {})",
|
||||||
@ -363,7 +361,7 @@ fn stamp(
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
tool_check_step!(Rustdoc, "src/tools/rustdoc", SourceType::InTree);
|
tool_check_step!(Rustdoc, "src/tools/rustdoc", "src/librustdoc", SourceType::InTree);
|
||||||
// Clippy is a hybrid. It is an external tool, but uses a git subtree instead
|
// Clippy is a hybrid. It is an external tool, but uses a git subtree instead
|
||||||
// of a submodule. Since the SourceType only drives the deny-warnings
|
// of a submodule. Since the SourceType only drives the deny-warnings
|
||||||
// behavior, treat it as in-tree so that any new warnings in clippy will be
|
// behavior, treat it as in-tree so that any new warnings in clippy will be
|
||||||
|
@ -11,3 +11,5 @@ assertions = true
|
|||||||
debug-logging = true
|
debug-logging = true
|
||||||
# This greatly increases the speed of rebuilds, especially when there are only minor changes. However, it makes the initial build slightly slower.
|
# This greatly increases the speed of rebuilds, especially when there are only minor changes. However, it makes the initial build slightly slower.
|
||||||
incremental = true
|
incremental = true
|
||||||
|
# Print backtrace on internal compiler errors during bootstrap
|
||||||
|
backtrace-on-ice = true
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
debug-logging = true
|
debug-logging = true
|
||||||
# This greatly increases the speed of rebuilds, especially when there are only minor changes. However, it makes the initial build slightly slower.
|
# This greatly increases the speed of rebuilds, especially when there are only minor changes. However, it makes the initial build slightly slower.
|
||||||
incremental = true
|
incremental = true
|
||||||
|
# Print backtrace on internal compiler errors during bootstrap
|
||||||
|
backtrace-on-ice = true
|
||||||
|
|
||||||
[llvm]
|
[llvm]
|
||||||
# Will download LLVM from CI if available on your platform.
|
# Will download LLVM from CI if available on your platform.
|
||||||
|
@ -38,6 +38,7 @@ ENV HOSTS=x86_64-unknown-linux-musl
|
|||||||
ENV RUST_CONFIGURE_ARGS \
|
ENV RUST_CONFIGURE_ARGS \
|
||||||
--musl-root-x86_64=/usr/local/x86_64-linux-musl \
|
--musl-root-x86_64=/usr/local/x86_64-linux-musl \
|
||||||
--enable-extended \
|
--enable-extended \
|
||||||
|
--enable-sanitizers \
|
||||||
--enable-profiler \
|
--enable-profiler \
|
||||||
--enable-lld \
|
--enable-lld \
|
||||||
--set target.x86_64-unknown-linux-musl.crt-static=false \
|
--set target.x86_64-unknown-linux-musl.crt-static=false \
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit b54090a99ec7c4b46a5203a9c927fdbc311bb1f5
|
Subproject commit 50dd06cb71beb27fdc0eebade5509cdcc1f821ed
|
@ -1 +1 @@
|
|||||||
Subproject commit e1abb17cd94cd5a8a374b48e1bc8134a2208ed48
|
Subproject commit d23f9da8469617e6c81121d9fd123443df70595d
|
@ -1 +1 @@
|
|||||||
Subproject commit c80f0b09fc15b9251825343be910c08531938ab2
|
Subproject commit e0a721f5202e6d9bec0aff99f10e44480c0da9e7
|
@ -1 +1 @@
|
|||||||
Subproject commit a9bd2bbf31e4f92b5d3d8e80b22839d0cc7a2022
|
Subproject commit e72b43a64925ce053dc7830e21c1a57ba00499bd
|
@ -1546,7 +1546,7 @@ fn render_default_items(
|
|||||||
let aliases = if aliases.is_empty() {
|
let aliases = if aliases.is_empty() {
|
||||||
String::new()
|
String::new()
|
||||||
} else {
|
} else {
|
||||||
format!(" aliases=\"{}\"", aliases.join(","))
|
format!(" data-aliases=\"{}\"", aliases.join(","))
|
||||||
};
|
};
|
||||||
if let Some(use_absolute) = use_absolute {
|
if let Some(use_absolute) = use_absolute {
|
||||||
write!(
|
write!(
|
||||||
|
@ -834,7 +834,7 @@ function hideThemeButtonState() {
|
|||||||
// (like "Send" and "Sync").
|
// (like "Send" and "Sync").
|
||||||
var inlined_types = new Set();
|
var inlined_types = new Set();
|
||||||
onEachLazy(synthetic_implementors.getElementsByClassName("impl"), function(el) {
|
onEachLazy(synthetic_implementors.getElementsByClassName("impl"), function(el) {
|
||||||
var aliases = el.getAttribute("aliases");
|
var aliases = el.getAttribute("data-aliases");
|
||||||
if (!aliases) {
|
if (!aliases) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#![feature(type_ascription)]
|
#![feature(type_ascription)]
|
||||||
#![feature(iter_intersperse)]
|
#![feature(iter_intersperse)]
|
||||||
#![recursion_limit = "256"]
|
#![recursion_limit = "256"]
|
||||||
#![deny(rustc::internal)]
|
#![warn(rustc::internal)]
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate lazy_static;
|
extern crate lazy_static;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#![feature(auto_traits)]
|
#![feature(auto_traits)]
|
||||||
|
|
||||||
// @has auto_aliases/trait.Bar.html '//h3[@aliases="auto_aliases::Foo"]' 'impl Bar for Foo'
|
// @has auto_aliases/trait.Bar.html '//h3[@data-aliases="auto_aliases::Foo"]' 'impl Bar for Foo'
|
||||||
pub struct Foo;
|
pub struct Foo;
|
||||||
|
|
||||||
pub auto trait Bar {}
|
pub auto trait Bar {}
|
||||||
|
22
src/test/ui/typeck/issue-75883.rs
Normal file
22
src/test/ui/typeck/issue-75883.rs
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
// Regression test for #75883.
|
||||||
|
|
||||||
|
pub struct UI {}
|
||||||
|
|
||||||
|
impl UI {
|
||||||
|
pub fn run() -> Result<_> {
|
||||||
|
//~^ ERROR: this enum takes 2 type arguments but only 1 type argument was supplied
|
||||||
|
//~| ERROR: the type placeholder `_` is not allowed within types on item signatures
|
||||||
|
let mut ui = UI {};
|
||||||
|
ui.interact();
|
||||||
|
|
||||||
|
unimplemented!();
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn interact(&mut self) -> Result<_> {
|
||||||
|
//~^ ERROR: this enum takes 2 type arguments but only 1 type argument was supplied
|
||||||
|
//~| ERROR: the type placeholder `_` is not allowed within types on item signatures
|
||||||
|
unimplemented!();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {}
|
52
src/test/ui/typeck/issue-75883.stderr
Normal file
52
src/test/ui/typeck/issue-75883.stderr
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
error[E0107]: this enum takes 2 type arguments but only 1 type argument was supplied
|
||||||
|
--> $DIR/issue-75883.rs:6:21
|
||||||
|
|
|
||||||
|
LL | pub fn run() -> Result<_> {
|
||||||
|
| ^^^^^^ - supplied 1 type argument
|
||||||
|
| |
|
||||||
|
| expected 2 type arguments
|
||||||
|
|
|
||||||
|
note: enum defined here, with 2 type parameters: `T`, `E`
|
||||||
|
--> $SRC_DIR/core/src/result.rs:LL:COL
|
||||||
|
|
|
||||||
|
LL | pub enum Result<T, E> {
|
||||||
|
| ^^^^^^ - -
|
||||||
|
help: add missing type argument
|
||||||
|
|
|
||||||
|
LL | pub fn run() -> Result<_, E> {
|
||||||
|
| ^^^
|
||||||
|
|
||||||
|
error[E0107]: this enum takes 2 type arguments but only 1 type argument was supplied
|
||||||
|
--> $DIR/issue-75883.rs:15:35
|
||||||
|
|
|
||||||
|
LL | pub fn interact(&mut self) -> Result<_> {
|
||||||
|
| ^^^^^^ - supplied 1 type argument
|
||||||
|
| |
|
||||||
|
| expected 2 type arguments
|
||||||
|
|
|
||||||
|
note: enum defined here, with 2 type parameters: `T`, `E`
|
||||||
|
--> $SRC_DIR/core/src/result.rs:LL:COL
|
||||||
|
|
|
||||||
|
LL | pub enum Result<T, E> {
|
||||||
|
| ^^^^^^ - -
|
||||||
|
help: add missing type argument
|
||||||
|
|
|
||||||
|
LL | pub fn interact(&mut self) -> Result<_, E> {
|
||||||
|
| ^^^
|
||||||
|
|
||||||
|
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
|
||||||
|
--> $DIR/issue-75883.rs:15:42
|
||||||
|
|
|
||||||
|
LL | pub fn interact(&mut self) -> Result<_> {
|
||||||
|
| ^ not allowed in type signatures
|
||||||
|
|
||||||
|
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
|
||||||
|
--> $DIR/issue-75883.rs:6:28
|
||||||
|
|
|
||||||
|
LL | pub fn run() -> Result<_> {
|
||||||
|
| ^ not allowed in type signatures
|
||||||
|
|
||||||
|
error: aborting due to 4 previous errors
|
||||||
|
|
||||||
|
Some errors have detailed explanations: E0107, E0121.
|
||||||
|
For more information about an error, try `rustc --explain E0107`.
|
13
src/test/ui/typeck/issue-80779.rs
Normal file
13
src/test/ui/typeck/issue-80779.rs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
// Regression test for #80779.
|
||||||
|
|
||||||
|
pub struct T<'a>(&'a str);
|
||||||
|
|
||||||
|
pub fn f<'a>(val: T<'a>) -> _ {
|
||||||
|
//~^ ERROR: the type placeholder `_` is not allowed within types on item signatures
|
||||||
|
g(val)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn g(_: T<'static>) -> _ {}
|
||||||
|
//~^ ERROR: the type placeholder `_` is not allowed within types on item signatures
|
||||||
|
|
||||||
|
fn main() {}
|
21
src/test/ui/typeck/issue-80779.stderr
Normal file
21
src/test/ui/typeck/issue-80779.stderr
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
|
||||||
|
--> $DIR/issue-80779.rs:10:28
|
||||||
|
|
|
||||||
|
LL | pub fn g(_: T<'static>) -> _ {}
|
||||||
|
| ^
|
||||||
|
| |
|
||||||
|
| not allowed in type signatures
|
||||||
|
| help: replace with the correct return type: `()`
|
||||||
|
|
||||||
|
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
|
||||||
|
--> $DIR/issue-80779.rs:5:29
|
||||||
|
|
|
||||||
|
LL | pub fn f<'a>(val: T<'a>) -> _ {
|
||||||
|
| ^
|
||||||
|
| |
|
||||||
|
| not allowed in type signatures
|
||||||
|
| help: replace with the correct return type: `()`
|
||||||
|
|
||||||
|
error: aborting due to 2 previous errors
|
||||||
|
|
||||||
|
For more information about this error, try `rustc --explain E0121`.
|
@ -17,7 +17,7 @@
|
|||||||
// warn on lints, that are included in `rust-lang/rust`s bootstrap
|
// warn on lints, that are included in `rust-lang/rust`s bootstrap
|
||||||
#![warn(rust_2018_idioms, unused_lifetimes)]
|
#![warn(rust_2018_idioms, unused_lifetimes)]
|
||||||
// warn on rustc internal lints
|
// warn on rustc internal lints
|
||||||
#![deny(rustc::internal)]
|
#![warn(rustc::internal)]
|
||||||
|
|
||||||
// FIXME: switch to something more ergonomic here, once available.
|
// FIXME: switch to something more ergonomic here, once available.
|
||||||
// (Currently there is no way to opt into sysroot crates without `extern crate`.)
|
// (Currently there is no way to opt into sysroot crates without `extern crate`.)
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
// warn on lints, that are included in `rust-lang/rust`s bootstrap
|
// warn on lints, that are included in `rust-lang/rust`s bootstrap
|
||||||
#![warn(rust_2018_idioms, unused_lifetimes)]
|
#![warn(rust_2018_idioms, unused_lifetimes)]
|
||||||
// warn on rustc internal lints
|
// warn on rustc internal lints
|
||||||
#![deny(rustc::internal)]
|
#![warn(rustc::internal)]
|
||||||
|
|
||||||
// FIXME: switch to something more ergonomic here, once available.
|
// FIXME: switch to something more ergonomic here, once available.
|
||||||
// (Currently there is no way to opt into sysroot crates without `extern crate`.)
|
// (Currently there is no way to opt into sysroot crates without `extern crate`.)
|
||||||
|
@ -423,6 +423,15 @@ macro_rules! err {
|
|||||||
continue;
|
continue;
|
||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lazy_static::lazy_static! {
|
||||||
|
static ref COMMENT_LINE: Regex = Regex::new(r"^\s*//").unwrap();
|
||||||
|
}
|
||||||
|
// exclude commented out lines
|
||||||
|
if COMMENT_LINE.is_match(line) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if let Some((ref name, ref mut f)) = becoming_feature {
|
if let Some((ref name, ref mut f)) = becoming_feature {
|
||||||
if f.tracking_issue.is_none() {
|
if f.tracking_issue.is_none() {
|
||||||
f.tracking_issue = find_attr_val(line, "issue").and_then(handle_issue_none);
|
f.tracking_issue = find_attr_val(line, "issue").and_then(handle_issue_none);
|
||||||
|
Loading…
Reference in New Issue
Block a user