Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit f243a2a

Browse files
committed
Auto merge of rust-lang#77917 - JohnTitor:rollup-e47h2qt, r=JohnTitor
Rollup of 14 pull requests Successful merges: - rust-lang#77239 (Enable building Cargo for aarch64-apple-darwin) - rust-lang#77569 (BTreeMap: type-specific variants of node_as_mut and cast_unchecked) - rust-lang#77719 (Remove unnecessary rustc_const_stable attributes.) - rust-lang#77722 (Remove unsafety from sys/unsupported and add deny(unsafe_op_in_unsafe_fn).) - rust-lang#77725 (Add regression issue template) - rust-lang#77776 ( Give an error when running `x.py test --stage 0 src/test/ui`) - rust-lang#77786 (Mention rustdoc in `x.py setup`) - rust-lang#77825 (`min_const_generics` diagnostics improvements) - rust-lang#77868 (Include `llvm-dis`, `llc` and `opt` in `llvm-tools-preview` component) - rust-lang#77884 (Use Option::unwrap_or instead of open-coding it) - rust-lang#77886 (Replace trivial bool matches with the `matches!` macro) - rust-lang#77892 (Replace absolute paths with relative ones) - rust-lang#77895 (Include aarch64-apple-darwin in the dist manifests) - rust-lang#77909 (bootstrap: set correct path for the build-manifest binary) Failed merges: - rust-lang#77902 (Include aarch64-pc-windows-msvc in the dist manifests) r? `@ghost`
2 parents adef9da + b4a3b56 commit f243a2a

File tree

107 files changed

+426
-359
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+426
-359
lines changed

.github/ISSUE_TEMPLATE/regression.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
name: Regression
3+
about: Report something that unexpectedly changed between Rust versions.
4+
labels: C-bug regression-untriaged
5+
---
6+
<!--
7+
Thank you for filing a regression report! 🐛 A regression is something that changed between versions of Rust but was not supposed to.
8+
9+
Please provide a short summary of the regression, along with any information you feel is relevant to replicate it.
10+
-->
11+
12+
### Code
13+
14+
I tried this code:
15+
16+
```rust
17+
<code>
18+
```
19+
20+
I expected to see this happen: *explanation*
21+
22+
Instead, this happened: *explanation*
23+
24+
### Version it worked on
25+
26+
<!--
27+
Provide the most recent version this worked on, for example:
28+
29+
It most recently worked on: Rust 1.47
30+
-->
31+
32+
It most recently worked on: <!-- version -->
33+
34+
### Version with regression
35+
36+
<!--
37+
Provide the version you are using that has the regression.
38+
-->
39+
40+
`rustc --version --verbose`:
41+
```
42+
<version>
43+
```
44+
45+
<!--
46+
Did the compiler crash? If so, please provide a backtrace.
47+
-->
48+
49+
### Backtrace
50+
<!--
51+
Include a backtrace in the code block by setting `RUST_BACKTRACE=1` in your
52+
environment. E.g. `RUST_BACKTRACE=1 cargo build`.
53+
-->
54+
<details><summary>Backtrace</summary>
55+
<p>
56+
57+
```
58+
<backtrace>
59+
```
60+
61+
</p>
62+
</details>
63+
64+
<!--
65+
If you know when this regression occurred, please add a line like below, replacing `{channel}` with one of stable, beta, or nightly.
66+
67+
@rustbot modify labels: +regression-from-stable-to-{channel} -regression-untriaged
68+
-->

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,14 +306,16 @@ jobs:
306306
- name: dist-aarch64-apple
307307
env:
308308
SCRIPT: "./x.py dist --stage 2"
309-
RUST_CONFIGURE_ARGS: "--build=x86_64-apple-darwin --host=aarch64-apple-darwin --target=aarch64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false --tools=rls,clippy,rustfmt,analysis,src"
309+
RUST_CONFIGURE_ARGS: "--build=x86_64-apple-darwin --host=aarch64-apple-darwin --target=aarch64-apple-darwin --enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false"
310310
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
311311
SELECT_XCODE: /Applications/Xcode_12_beta.app
312312
USE_XCODE_CLANG: 1
313313
MACOSX_DEPLOYMENT_TARGET: 11.0
314314
MACOSX_STD_DEPLOYMENT_TARGET: 11.0
315315
NO_LLVM_ASSERTIONS: 1
316316
NO_DEBUG_ASSERTIONS: 1
317+
DIST_REQUIRE_ALL_TOOLS: 1
318+
JEMALLOC_SYS_WITH_LG_PAGE: 14
317319
os: macos-latest
318320
- name: x86_64-msvc-1
319321
env:

Cargo.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2192,9 +2192,9 @@ checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de"
21922192

21932193
[[package]]
21942194
name = "openssl-src"
2195-
version = "111.10.2+1.1.1g"
2195+
version = "111.12.0+1.1.1h"
21962196
source = "registry+https://github.com/rust-lang/crates.io-index"
2197-
checksum = "a287fdb22e32b5b60624d4a5a7a02dbe82777f730ec0dbc42a0554326fef5a70"
2197+
checksum = "858a4132194f8570a7ee9eb8629e85b23cbc4565f2d4a162e87556e5956abf61"
21982198
dependencies = [
21992199
"cc",
22002200
]

compiler/rustc_ast_pretty/src/pp.rs

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -170,17 +170,11 @@ pub enum Token {
170170

171171
impl Token {
172172
crate fn is_eof(&self) -> bool {
173-
match *self {
174-
Token::Eof => true,
175-
_ => false,
176-
}
173+
matches!(self, Token::Eof)
177174
}
178175

179176
pub fn is_hardbreak_tok(&self) -> bool {
180-
match *self {
181-
Token::Break(BreakToken { offset: 0, blank_space: bs }) if bs == SIZE_INFINITY => true,
182-
_ => false,
183-
}
177+
matches!(self, Token::Break(BreakToken { offset: 0, blank_space: SIZE_INFINITY }))
184178
}
185179
}
186180

@@ -491,12 +485,9 @@ impl Printer {
491485
}
492486

493487
fn get_top(&mut self) -> PrintStackElem {
494-
match self.print_stack.last() {
495-
Some(el) => *el,
496-
None => {
497-
PrintStackElem { offset: 0, pbreak: PrintStackBreak::Broken(Breaks::Inconsistent) }
498-
}
499-
}
488+
*self.print_stack.last().unwrap_or({
489+
&PrintStackElem { offset: 0, pbreak: PrintStackBreak::Broken(Breaks::Inconsistent) }
490+
})
500491
}
501492

502493
fn print_begin(&mut self, b: BeginToken, l: isize) {

compiler/rustc_codegen_llvm/src/llvm_util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ unsafe fn configure_llvm(sess: &Session) {
122122

123123
llvm::LLVMInitializePasses();
124124

125-
::rustc_llvm::initialize_available_targets();
125+
rustc_llvm::initialize_available_targets();
126126

127127
llvm::LLVMRustSetLLVMOptions(llvm_args.len() as c_int, llvm_args.as_ptr());
128128
}

compiler/rustc_codegen_ssa/src/back/write.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1175,7 +1175,7 @@ fn start_executing_work<B: ExtraBackendMethods>(
11751175
// necessary. There's already optimizations in place to avoid sending work
11761176
// back to the coordinator if LTO isn't requested.
11771177
return thread::spawn(move || {
1178-
let max_workers = ::num_cpus::get();
1178+
let max_workers = num_cpus::get();
11791179
let mut worker_id_counter = 0;
11801180
let mut free_worker_ids = Vec::new();
11811181
let mut get_worker_id = |free_worker_ids: &mut Vec<usize>| {

compiler/rustc_codegen_ssa/src/base.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ pub fn codegen_crate<B: ExtraBackendMethods>(
695695
total_codegen_time.into_inner(),
696696
);
697697

698-
::rustc_incremental::assert_module_sources::assert_module_sources(tcx);
698+
rustc_incremental::assert_module_sources::assert_module_sources(tcx);
699699

700700
symbol_names_test::report_symbol_names(tcx);
701701

@@ -754,8 +754,8 @@ impl<B: ExtraBackendMethods> Drop for AbortCodegenOnDrop<B> {
754754
}
755755

756756
fn finalize_tcx(tcx: TyCtxt<'_>) {
757-
tcx.sess.time("assert_dep_graph", || ::rustc_incremental::assert_dep_graph(tcx));
758-
tcx.sess.time("serialize_dep_graph", || ::rustc_incremental::save_dep_graph(tcx));
757+
tcx.sess.time("assert_dep_graph", || rustc_incremental::assert_dep_graph(tcx));
758+
tcx.sess.time("serialize_dep_graph", || rustc_incremental::save_dep_graph(tcx));
759759

760760
// We assume that no queries are run past here. If there are new queries
761761
// after this point, they'll show up as "<unknown>" in self-profiling data.

compiler/rustc_codegen_ssa/src/traits/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ impl<'tcx, T> CodegenMethods<'tcx> for T where
8585
}
8686

8787
pub trait HasCodegen<'tcx>:
88-
Backend<'tcx> + ::std::ops::Deref<Target = <Self as HasCodegen<'tcx>>::CodegenCx>
88+
Backend<'tcx> + std::ops::Deref<Target = <Self as HasCodegen<'tcx>>::CodegenCx>
8989
{
9090
type CodegenCx: CodegenMethods<'tcx>
9191
+ BackendTypes<

compiler/rustc_data_structures/src/fingerprint.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ impl Fingerprint {
7171
}
7272
}
7373

74-
impl ::std::fmt::Display for Fingerprint {
75-
fn fmt(&self, formatter: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
74+
impl std::fmt::Display for Fingerprint {
75+
fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7676
write!(formatter, "{:x}-{:x}", self.0, self.1)
7777
}
7878
}

compiler/rustc_data_structures/src/obligation_forest/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ pub enum ProcessResult<O, E> {
129129
struct ObligationTreeId(usize);
130130

131131
type ObligationTreeIdGenerator =
132-
::std::iter::Map<::std::ops::RangeFrom<usize>, fn(usize) -> ObligationTreeId>;
132+
std::iter::Map<std::ops::RangeFrom<usize>, fn(usize) -> ObligationTreeId>;
133133

134134
pub struct ObligationForest<O: ForestObligation> {
135135
/// The list of obligations. In between calls to `process_obligations`,

0 commit comments

Comments
 (0)