Skip to content

Commit 8e3710e

Browse files
committed
Auto merge of #145728 - jhpratt:rollup-nwbw8de, r=jhpratt
Rollup of 16 pull requests Successful merges: - #137494 (libstd: init(): dup() subsequent /dev/nulls instead of opening them again) - #144541 (c-variadic: multiple ABIs in the same program for arm) - #144613 (aarch64-nintendo-switch-freestanding - Enable CPU features that are always available in a live system (crypto instructions, plus explicit NEON).) - #144780 (Add a method to dump MIR in the middle of MIR building) - #145137 (Consolidate panicking functions in `slice/index.rs`) - #145507 (Refactor attribute parsing to improve ergonomics and some diagnostics) - #145604 (Gate static closures behind a parser feature) - #145648 (Add two tidy dependency checks) - #145661 (update some s390x codegen tests) - #145672 (Instantiate higher-ranked binder with erased when checking `IntoIterator` predicate for query instability) - #145689 (Migrate `panic_unwind` to use `cfg_select!`) - #145700 (Handle `ReEarlyParam` in `type_name`.) - #145703 (Remove MIPS targets from CI LLVM platforms) - #145704 (ci: don't cleanup windows disk) - #145705 (remove an `as` cast in prefetch codegen) - #145712 (Update outdated link in bound region comments) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 6ba0ce4 + 7d2993d commit 8e3710e

File tree

109 files changed

+1510
-1442
lines changed

Some content is hidden

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

109 files changed

+1510
-1442
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,12 @@ jobs:
117117
with:
118118
fetch-depth: 2
119119

120-
# Free up disk space on Linux and Windows by removing preinstalled components that
120+
# Free up disk space on Linux by removing preinstalled components that
121121
# we do not need. We do this to enable some of the less resource
122122
# intensive jobs to run on free runners, which however also have
123123
# less disk space.
124124
- name: free up disk space
125-
run: src/ci/scripts/free-disk-space.sh
125+
run: src/ci/scripts/free-disk-space-linux.sh
126126
if: matrix.free_disk
127127

128128
# If we don't need to free up disk space then just report how much space we have
@@ -223,11 +223,6 @@ jobs:
223223
cd src/ci/citool
224224
CARGO_INCREMENTAL=0 CARGO_TARGET_DIR=../../../build/citool cargo build
225225
226-
- name: wait for Windows disk cleanup to finish
227-
if: ${{ matrix.free_disk && startsWith(matrix.os, 'windows-') }}
228-
run: |
229-
python3 src/ci/scripts/free-disk-space-windows-wait.py
230-
231226
- name: run the build
232227
run: |
233228
set +e

Cargo.lock

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3481,7 +3481,6 @@ dependencies = [
34813481
name = "rustc_attr_parsing"
34823482
version = "0.0.0"
34833483
dependencies = [
3484-
"itertools",
34853484
"rustc_abi",
34863485
"rustc_ast",
34873486
"rustc_ast_pretty",

compiler/rustc_ast_passes/src/feature_gate.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,7 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) {
524524
gate_all!(where_clause_attrs, "attributes in `where` clause are unstable");
525525
gate_all!(super_let, "`super let` is experimental");
526526
gate_all!(frontmatter, "frontmatters are experimental");
527+
gate_all!(coroutines, "coroutine syntax is experimental");
527528

528529
if !visitor.features.never_patterns() {
529530
if let Some(spans) = spans.get(&sym::never_patterns) {

compiler/rustc_attr_parsing/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ edition = "2024"
55

66
[dependencies]
77
# tidy-alphabetical-start
8-
itertools = "0.12"
98
rustc_abi = { path = "../rustc_abi" }
109
rustc_ast = { path = "../rustc_ast" }
1110
rustc_ast_pretty = { path = "../rustc_ast_pretty" }

compiler/rustc_attr_parsing/src/attributes/allow_unstable.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
use std::iter;
22

3-
use rustc_feature::{AttributeTemplate, template};
4-
use rustc_hir::attrs::AttributeKind;
5-
use rustc_hir::{MethodKind, Target};
6-
use rustc_span::{Span, Symbol, sym};
7-
8-
use super::{CombineAttributeParser, ConvertFn};
9-
use crate::context::MaybeWarn::{Allow, Warn};
10-
use crate::context::{AcceptContext, AllowedTargets, Stage};
11-
use crate::parser::ArgParser;
3+
use super::prelude::*;
124
use crate::session_diagnostics;
135

146
pub(crate) struct AllowInternalUnstableParser;

compiler/rustc_attr_parsing/src/attributes/body.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
//! Attributes that can be found in function body.
22
3-
use rustc_hir::Target;
4-
use rustc_hir::attrs::AttributeKind;
5-
use rustc_span::{Symbol, sym};
6-
7-
use super::{NoArgsAttributeParser, OnDuplicate};
8-
use crate::context::MaybeWarn::Allow;
9-
use crate::context::{AllowedTargets, Stage};
3+
use super::prelude::*;
104

115
pub(crate) struct CoroutineParser;
126

compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
1-
use rustc_feature::{AttributeTemplate, template};
2-
use rustc_hir::attrs::{AttributeKind, CoverageAttrKind, OptimizeAttr, UsedBy};
3-
use rustc_hir::{MethodKind, Target};
1+
use rustc_hir::attrs::{CoverageAttrKind, OptimizeAttr, UsedBy};
42
use rustc_session::parse::feature_err;
5-
use rustc_span::{Span, Symbol, sym};
6-
7-
use super::{
8-
AcceptMapping, AttributeOrder, AttributeParser, CombineAttributeParser, ConvertFn,
9-
NoArgsAttributeParser, OnDuplicate, SingleAttributeParser,
10-
};
11-
use crate::context::MaybeWarn::{Allow, Warn};
12-
use crate::context::{AcceptContext, AllowedTargets, FinalizeContext, Stage};
13-
use crate::parser::ArgParser;
3+
4+
use super::prelude::*;
145
use crate::session_diagnostics::{NakedFunctionIncompatibleAttribute, NullOnExport};
156

167
pub(crate) struct OptimizeParser;

compiler/rustc_attr_parsing/src/attributes/confusables.rs

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
1-
use rustc_feature::template;
2-
use rustc_hir::attrs::AttributeKind;
3-
use rustc_hir::{MethodKind, Target};
4-
use rustc_span::{Span, Symbol, sym};
5-
use thin_vec::ThinVec;
6-
7-
use super::{AcceptMapping, AttributeParser};
8-
use crate::context::MaybeWarn::Allow;
9-
use crate::context::{AllowedTargets, FinalizeContext, Stage};
10-
use crate::session_diagnostics;
1+
use super::prelude::*;
2+
use crate::session_diagnostics::EmptyConfusables;
3+
114
#[derive(Default)]
125
pub(crate) struct ConfusablesParser {
136
confusables: ThinVec<Symbol>,
@@ -25,7 +18,7 @@ impl<S: Stage> AttributeParser<S> for ConfusablesParser {
2518
};
2619

2720
if list.is_empty() {
28-
cx.emit_err(session_diagnostics::EmptyConfusables { span: cx.attr_span });
21+
cx.emit_err(EmptyConfusables { span: cx.attr_span });
2922
}
3023

3124
for param in list.mixed() {

compiler/rustc_attr_parsing/src/attributes/deprecation.rs

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
use rustc_feature::{AttributeTemplate, template};
2-
use rustc_hir::attrs::{AttributeKind, DeprecatedSince, Deprecation};
3-
use rustc_hir::{MethodKind, Target};
4-
use rustc_span::{Span, Symbol, sym};
1+
use rustc_hir::attrs::{DeprecatedSince, Deprecation};
52

3+
use super::prelude::*;
64
use super::util::parse_version;
7-
use super::{AttributeOrder, OnDuplicate, SingleAttributeParser};
8-
use crate::context::MaybeWarn::{Allow, Error};
9-
use crate::context::{AcceptContext, AllowedTargets, Stage};
10-
use crate::parser::ArgParser;
11-
use crate::session_diagnostics;
5+
use crate::session_diagnostics::{
6+
DeprecatedItemSuggestion, InvalidSince, MissingNote, MissingSince,
7+
};
8+
129
pub(crate) struct DeprecationParser;
1310

1411
fn get<S: Stage>(
@@ -102,7 +99,7 @@ impl<S: Stage> SingleAttributeParser<S> for DeprecationParser {
10299
}
103100
Some(name @ sym::suggestion) => {
104101
if !features.deprecated_suggestion() {
105-
cx.emit_err(session_diagnostics::DeprecatedItemSuggestion {
102+
cx.emit_err(DeprecatedItemSuggestion {
106103
span: param.span(),
107104
is_nightly: cx.sess().is_nightly_build(),
108105
details: (),
@@ -144,18 +141,18 @@ impl<S: Stage> SingleAttributeParser<S> for DeprecationParser {
144141
} else if let Some(version) = parse_version(since) {
145142
DeprecatedSince::RustcVersion(version)
146143
} else {
147-
cx.emit_err(session_diagnostics::InvalidSince { span: cx.attr_span });
144+
cx.emit_err(InvalidSince { span: cx.attr_span });
148145
DeprecatedSince::Err
149146
}
150147
} else if is_rustc {
151-
cx.emit_err(session_diagnostics::MissingSince { span: cx.attr_span });
148+
cx.emit_err(MissingSince { span: cx.attr_span });
152149
DeprecatedSince::Err
153150
} else {
154151
DeprecatedSince::Unspecified
155152
};
156153

157154
if is_rustc && note.is_none() {
158-
cx.emit_err(session_diagnostics::MissingNote { span: cx.attr_span });
155+
cx.emit_err(MissingNote { span: cx.attr_span });
159156
return None;
160157
}
161158

compiler/rustc_attr_parsing/src/attributes/dummy.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ use rustc_hir::attrs::AttributeKind;
33
use rustc_span::{Symbol, sym};
44

55
use crate::attributes::{AttributeOrder, OnDuplicate, SingleAttributeParser};
6-
use crate::context::{ALL_TARGETS, AcceptContext, AllowedTargets, Stage};
6+
use crate::context::{AcceptContext, Stage};
77
use crate::parser::ArgParser;
8+
use crate::target_checking::{ALL_TARGETS, AllowedTargets};
9+
810
pub(crate) struct DummyParser;
911
impl<S: Stage> SingleAttributeParser<S> for DummyParser {
1012
const PATH: &[Symbol] = &[sym::rustc_dummy];

0 commit comments

Comments
 (0)