about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-03-10 01:25:43 +0000
committerbors <bors@rust-lang.org>2021-03-10 01:25:43 +0000
commit861872bc453bde79b83ff99d443d035225f10e87 (patch)
treefd570f707b6a801d7f1e7fd6b72fc983184daa04 /src
parent3a5d45f68cadc8fff4fbb557780f92b403b19c19 (diff)
parent9dc82face341121e3464a59665bc7c5b394cacc0 (diff)
downloadrust-861872bc453bde79b83ff99d443d035225f10e87.tar.gz
rust-861872bc453bde79b83ff99d443d035225f10e87.zip
Auto merge of #82953 - JohnTitor:rollup-8rtk5g2, r=JohnTitor
Rollup of 10 pull requests

Successful merges:

 - #77511 (Add StatementKind::CopyNonOverlapping)
 - #79208 (Stabilize `unsafe_op_in_unsafe_fn` lint)
 - #82411 (Fixes to ExitStatus and its docs)
 - #82733 (Add powerpc-unknown-openbsd target)
 - #82802 (Build rustdoc for run-make tests, not just run-make-fulldeps)
 - #82849 (Add Option::get_or_default)
 - #82908 (:arrow_up: rust-analyzer)
 - #82937 (Update README.md to use the correct cmake version number)
 - #82938 (Bump tracing-tree dependency)
 - #82942 (Don't hardcode the `v1` prelude in diagnostics, to allow for new preludes.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/test.rs2
-rw-r--r--src/doc/rustc/src/platform-support.md1
-rw-r--r--src/librustdoc/Cargo.toml2
-rw-r--r--src/test/ui/feature-gates/feature-gate-unsafe_block_in_unsafe_fn.rs6
-rw-r--r--src/test/ui/feature-gates/feature-gate-unsafe_block_in_unsafe_fn.stderr30
-rw-r--r--src/test/ui/unsafe/rfc-2585-unsafe_op_in_unsafe_fn.rs1
-rw-r--r--src/test/ui/unsafe/rfc-2585-unsafe_op_in_unsafe_fn.stderr32
-rw-r--r--src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs9
m---------src/tools/rust-analyzer32
9 files changed, 43 insertions, 72 deletions
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index 03ae684e23f..5d836c6bb62 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -1076,7 +1076,7 @@ note: if you're sure you want to do this, please open an issue as to why. In the
 
         // Avoid depending on rustdoc when we don't need it.
         if mode == "rustdoc"
-            || (mode == "run-make" && suite.ends_with("fulldeps"))
+            || mode == "run-make"
             || (mode == "ui" && is_rustdoc)
             || mode == "js-doc-test"
             || mode == "rustdoc-json"
diff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md
index 611117788da..ee17fcac45c 100644
--- a/src/doc/rustc/src/platform-support.md
+++ b/src/doc/rustc/src/platform-support.md
@@ -198,6 +198,7 @@ target | std | host | notes
 `powerpc-unknown-linux-gnuspe` | ✓ |  | PowerPC SPE Linux
 `powerpc-unknown-linux-musl` | ? |  |
 `powerpc-unknown-netbsd` | ✓ | ✓ |
+`powerpc-unknown-openbsd` | ? |  |
 `powerpc-wrs-vxworks` | ? |  |
 `powerpc-wrs-vxworks-spe` | ? |  |
 `powerpc64-unknown-freebsd` | ✓ | ✓ | PPC64 FreeBSD (ELFv1 and ELFv2)
diff --git a/src/librustdoc/Cargo.toml b/src/librustdoc/Cargo.toml
index 9084a1713cb..2d0722396fc 100644
--- a/src/librustdoc/Cargo.toml
+++ b/src/librustdoc/Cargo.toml
@@ -20,7 +20,7 @@ itertools = "0.9"
 regex = "1"
 rustdoc-json-types = { path = "../rustdoc-json-types" }
 tracing = "0.1"
-tracing-tree = "0.1.6"
+tracing-tree = "0.1.9"
 
 [dependencies.tracing-subscriber]
 version = "0.2.13"
diff --git a/src/test/ui/feature-gates/feature-gate-unsafe_block_in_unsafe_fn.rs b/src/test/ui/feature-gates/feature-gate-unsafe_block_in_unsafe_fn.rs
deleted file mode 100644
index 61e512a12a1..00000000000
--- a/src/test/ui/feature-gates/feature-gate-unsafe_block_in_unsafe_fn.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-#![deny(unsafe_op_in_unsafe_fn)]
-//~^ ERROR the `unsafe_op_in_unsafe_fn` lint is unstable
-//~| ERROR the `unsafe_op_in_unsafe_fn` lint is unstable
-//~| ERROR the `unsafe_op_in_unsafe_fn` lint is unstable
-
-fn main() {}
diff --git a/src/test/ui/feature-gates/feature-gate-unsafe_block_in_unsafe_fn.stderr b/src/test/ui/feature-gates/feature-gate-unsafe_block_in_unsafe_fn.stderr
deleted file mode 100644
index c5cad4a98d9..00000000000
--- a/src/test/ui/feature-gates/feature-gate-unsafe_block_in_unsafe_fn.stderr
+++ /dev/null
@@ -1,30 +0,0 @@
-error[E0658]: the `unsafe_op_in_unsafe_fn` lint is unstable
-  --> $DIR/feature-gate-unsafe_block_in_unsafe_fn.rs:1:1
-   |
-LL | #![deny(unsafe_op_in_unsafe_fn)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #71668 <https://github.com/rust-lang/rust/issues/71668> for more information
-   = help: add `#![feature(unsafe_block_in_unsafe_fn)]` to the crate attributes to enable
-
-error[E0658]: the `unsafe_op_in_unsafe_fn` lint is unstable
-  --> $DIR/feature-gate-unsafe_block_in_unsafe_fn.rs:1:1
-   |
-LL | #![deny(unsafe_op_in_unsafe_fn)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #71668 <https://github.com/rust-lang/rust/issues/71668> for more information
-   = help: add `#![feature(unsafe_block_in_unsafe_fn)]` to the crate attributes to enable
-
-error[E0658]: the `unsafe_op_in_unsafe_fn` lint is unstable
-  --> $DIR/feature-gate-unsafe_block_in_unsafe_fn.rs:1:1
-   |
-LL | #![deny(unsafe_op_in_unsafe_fn)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #71668 <https://github.com/rust-lang/rust/issues/71668> for more information
-   = help: add `#![feature(unsafe_block_in_unsafe_fn)]` to the crate attributes to enable
-
-error: aborting due to 3 previous errors
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/unsafe/rfc-2585-unsafe_op_in_unsafe_fn.rs b/src/test/ui/unsafe/rfc-2585-unsafe_op_in_unsafe_fn.rs
index 9eec7e0e8fe..c8400a6fc4d 100644
--- a/src/test/ui/unsafe/rfc-2585-unsafe_op_in_unsafe_fn.rs
+++ b/src/test/ui/unsafe/rfc-2585-unsafe_op_in_unsafe_fn.rs
@@ -1,4 +1,3 @@
-#![feature(unsafe_block_in_unsafe_fn)]
 #![deny(unsafe_op_in_unsafe_fn)]
 #![deny(unused_unsafe)]
 
diff --git a/src/test/ui/unsafe/rfc-2585-unsafe_op_in_unsafe_fn.stderr b/src/test/ui/unsafe/rfc-2585-unsafe_op_in_unsafe_fn.stderr
index 278a036c9f1..3157783acb6 100644
--- a/src/test/ui/unsafe/rfc-2585-unsafe_op_in_unsafe_fn.stderr
+++ b/src/test/ui/unsafe/rfc-2585-unsafe_op_in_unsafe_fn.stderr
@@ -1,18 +1,18 @@
 error: call to unsafe function is unsafe and requires unsafe block (error E0133)
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:10:5
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:9:5
    |
 LL |     unsf();
    |     ^^^^^^ call to unsafe function
    |
 note: the lint level is defined here
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:2:9
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:1:9
    |
 LL | #![deny(unsafe_op_in_unsafe_fn)]
    |         ^^^^^^^^^^^^^^^^^^^^^^
    = note: consult the function's documentation for information on how to avoid undefined behavior
 
 error: dereference of raw pointer is unsafe and requires unsafe block (error E0133)
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:12:5
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:11:5
    |
 LL |     *PTR;
    |     ^^^^ dereference of raw pointer
@@ -20,7 +20,7 @@ LL |     *PTR;
    = note: raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
 
 error: use of mutable static is unsafe and requires unsafe block (error E0133)
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:14:5
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:13:5
    |
 LL |     VOID = ();
    |     ^^^^^^^^^ use of mutable static
@@ -28,25 +28,25 @@ LL |     VOID = ();
    = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
 
 error: unnecessary `unsafe` block
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:17:5
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:16:5
    |
 LL |     unsafe {}
    |     ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:3:9
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:2:9
    |
 LL | #![deny(unused_unsafe)]
    |         ^^^^^^^^^^^^^
 
 error: call to unsafe function is unsafe and requires unsafe block (error E0133)
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:25:5
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:24:5
    |
 LL |     unsf();
    |     ^^^^^^ call to unsafe function
    |
 note: the lint level is defined here
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:23:8
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:22:8
    |
 LL | #[deny(warnings)]
    |        ^^^^^^^^
@@ -54,7 +54,7 @@ LL | #[deny(warnings)]
    = note: consult the function's documentation for information on how to avoid undefined behavior
 
 error: dereference of raw pointer is unsafe and requires unsafe block (error E0133)
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:27:5
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:26:5
    |
 LL |     *PTR;
    |     ^^^^ dereference of raw pointer
@@ -62,7 +62,7 @@ LL |     *PTR;
    = note: raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
 
 error: use of mutable static is unsafe and requires unsafe block (error E0133)
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:29:5
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:28:5
    |
 LL |     VOID = ();
    |     ^^^^^^^^^ use of mutable static
@@ -70,13 +70,13 @@ LL |     VOID = ();
    = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
 
 error: unnecessary `unsafe` block
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:31:5
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:30:5
    |
 LL |     unsafe {}
    |     ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:45:14
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:44:14
    |
 LL |     unsafe { unsafe { unsf() } }
    |     ------   ^^^^^^ unnecessary `unsafe` block
@@ -84,7 +84,7 @@ LL |     unsafe { unsafe { unsf() } }
    |     because it's nested under this `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:56:5
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:55:5
    |
 LL | unsafe fn allow_level() {
    | ----------------------- because it's nested under this `unsafe` fn
@@ -93,7 +93,7 @@ LL |     unsafe { unsf() }
    |     ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:68:9
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:67:9
    |
 LL | unsafe fn nested_allow_level() {
    | ------------------------------ because it's nested under this `unsafe` fn
@@ -102,7 +102,7 @@ LL |         unsafe { unsf() }
    |         ^^^^^^ unnecessary `unsafe` block
 
 error[E0133]: call to unsafe function is unsafe and requires unsafe block
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:74:5
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:73:5
    |
 LL |     unsf();
    |     ^^^^^^ call to unsafe function
@@ -110,7 +110,7 @@ LL |     unsf();
    = note: consult the function's documentation for information on how to avoid undefined behavior
 
 error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:78:9
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:77:9
    |
 LL |         unsf();
    |         ^^^^^^ call to unsafe function
diff --git a/src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs b/src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs
index 2cb9588e13f..1391f7505e2 100644
--- a/src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs
+++ b/src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs
@@ -210,7 +210,7 @@ fn check_statement(tcx: TyCtxt<'tcx>, body: &Body<'tcx>, def_id: DefId, statemen
         StatementKind::Assign(box (place, rval)) => {
             check_place(tcx, *place, span, body)?;
             check_rvalue(tcx, body, def_id, rval, span)
-        },
+        }
 
         StatementKind::FakeRead(_, place) |
         // just an assignment
@@ -218,6 +218,13 @@ fn check_statement(tcx: TyCtxt<'tcx>, body: &Body<'tcx>, def_id: DefId, statemen
 
         StatementKind::LlvmInlineAsm { .. } => Err((span, "cannot use inline assembly in const fn".into())),
 
+        StatementKind::CopyNonOverlapping(box rustc_middle::mir::CopyNonOverlapping{
+          dst, src, count,
+        }) => {
+          check_operand(tcx, dst, span, body)?;
+          check_operand(tcx, src, span, body)?;
+          check_operand(tcx, count, span, body)
+        }
         // These are all NOPs
         StatementKind::StorageLive(_)
         | StatementKind::StorageDead(_)
diff --git a/src/tools/rust-analyzer b/src/tools/rust-analyzer
-Subproject 5df3ee8274fdb7cdeb2b0871b4efea8cbf4724a
+Subproject d54e1157b66017e4aae38328cd213286e39ca13