Skip to content

Commit a876a4d

Browse files
committed
Auto merge of rust-lang#103857 - Manishearth:rollup-709fui6, r=Manishearth
Rollup of 8 pull requests Successful merges: - rust-lang#103072 (compiletest: set the dylib path when gathering target cfg) - rust-lang#103084 (Derive `Eq` and `Hash` for `ControlFlow`) - rust-lang#103575 (Change #[suggestion_*] attributes to use style="...") - rust-lang#103637 (Use stdio in UWP apps) - rust-lang#103638 (Add `multivalue` target feature to WASM target) - rust-lang#103781 (Detect unused files in `src/test/mir-opt` and error on them in tidy.) - rust-lang#103837 (Migrate sidebar-links-color GUI test to functions) - rust-lang#103839 (Print valid `--print` requests if request is invalid) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 11ebe65 + c2affd5 commit a876a4d

Some content is hidden

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

44 files changed

+848
-1033
lines changed

Cargo.lock

+9
Original file line numberDiff line numberDiff line change
@@ -816,6 +816,7 @@ dependencies = [
816816
"lazycell",
817817
"libc",
818818
"miow",
819+
"miropt-test-tools",
819820
"regex",
820821
"rustfix",
821822
"serde",
@@ -2268,6 +2269,13 @@ dependencies = [
22682269
"ui_test",
22692270
]
22702271

2272+
[[package]]
2273+
name = "miropt-test-tools"
2274+
version = "0.1.0"
2275+
dependencies = [
2276+
"regex",
2277+
]
2278+
22712279
[[package]]
22722280
name = "new_debug_unreachable"
22732281
version = "1.0.4"
@@ -4920,6 +4928,7 @@ version = "0.1.0"
49204928
dependencies = [
49214929
"cargo_metadata 0.14.0",
49224930
"lazy_static",
4931+
"miropt-test-tools",
49234932
"regex",
49244933
"walkdir",
49254934
]

Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ members = [
1111
"src/tools/error_index_generator",
1212
"src/tools/linkchecker",
1313
"src/tools/lint-docs",
14+
"src/tools/miropt-test-tools",
1415
"src/tools/rustbook",
1516
"src/tools/unstable-book-gen",
1617
"src/tools/tidy",

compiler/rustc_ast_lowering/src/errors.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,9 @@ pub struct RegisterConflict<'a> {
277277
pub struct SubTupleBinding<'a> {
278278
#[primary_span]
279279
#[label]
280-
#[suggestion_verbose(
280+
#[suggestion(
281281
ast_lowering_sub_tuple_binding_suggestion,
282+
style = "verbose",
282283
code = "..",
283284
applicability = "maybe-incorrect"
284285
)]

compiler/rustc_borrowck/src/session_diagnostics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pub(crate) struct GenericDoesNotLiveLongEnough {
4949
#[derive(LintDiagnostic)]
5050
#[diag(borrowck_var_does_not_need_mut)]
5151
pub(crate) struct VarNeedNotMut {
52-
#[suggestion_short(applicability = "machine-applicable", code = "")]
52+
#[suggestion(style = "short", applicability = "machine-applicable", code = "")]
5353
pub span: Span,
5454
}
5555
#[derive(Diagnostic)]

compiler/rustc_codegen_ssa/src/target_features.rs

+1
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ const WASM_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
267267
// tidy-alphabetical-start
268268
("atomics", Some(sym::wasm_target_feature)),
269269
("bulk-memory", Some(sym::wasm_target_feature)),
270+
("multivalue", Some(sym::wasm_target_feature)),
270271
("mutable-globals", Some(sym::wasm_target_feature)),
271272
("nontrapping-fptoint", Some(sym::wasm_target_feature)),
272273
("reference-types", Some(sym::wasm_target_feature)),

compiler/rustc_hir_analysis/src/errors.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ pub struct TypeofReservedKeywordUsed<'tcx> {
120120
#[primary_span]
121121
#[label]
122122
pub span: Span,
123-
#[suggestion_verbose(code = "{ty}")]
123+
#[suggestion(style = "verbose", code = "{ty}")]
124124
pub opt_sugg: Option<(Span, Applicability)>,
125125
}
126126

@@ -239,7 +239,11 @@ pub struct UnusedExternCrate {
239239
#[derive(LintDiagnostic)]
240240
#[diag(hir_analysis_extern_crate_not_idiomatic)]
241241
pub struct ExternCrateNotIdiomatic {
242-
#[suggestion_short(applicability = "machine-applicable", code = "{suggestion_code}")]
242+
#[suggestion(
243+
style = "short",
244+
applicability = "machine-applicable",
245+
code = "{suggestion_code}"
246+
)]
243247
pub span: Span,
244248
pub msg_code: String,
245249
pub suggestion_code: String,

compiler/rustc_hir_typeck/src/errors.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,9 @@ pub struct MissingParentheseInRange {
113113
}
114114

115115
#[derive(Subdiagnostic)]
116-
#[multipart_suggestion_verbose(
116+
#[multipart_suggestion(
117117
hir_analysis_add_missing_parentheses_in_range,
118+
style = "verbose",
118119
applicability = "maybe-incorrect"
119120
)]
120121
pub struct AddMissingParenthesesInRange {

compiler/rustc_infer/src/errors/mod.rs

+10-5
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,9 @@ pub struct InferenceBadError<'a> {
109109

110110
#[derive(Subdiagnostic)]
111111
pub enum SourceKindSubdiag<'a> {
112-
#[suggestion_verbose(
112+
#[suggestion(
113113
infer_source_kind_subdiag_let,
114+
style = "verbose",
114115
code = ": {type_name}",
115116
applicability = "has-placeholders"
116117
)]
@@ -135,8 +136,9 @@ pub enum SourceKindSubdiag<'a> {
135136
parent_prefix: String,
136137
parent_name: String,
137138
},
138-
#[suggestion_verbose(
139+
#[suggestion(
139140
infer_source_kind_subdiag_generic_suggestion,
141+
style = "verbose",
140142
code = "::<{args}>",
141143
applicability = "has-placeholders"
142144
)]
@@ -150,8 +152,9 @@ pub enum SourceKindSubdiag<'a> {
150152

151153
#[derive(Subdiagnostic)]
152154
pub enum SourceKindMultiSuggestion<'a> {
153-
#[multipart_suggestion_verbose(
155+
#[multipart_suggestion(
154156
infer_source_kind_fully_qualified,
157+
style = "verbose",
155158
applicability = "has-placeholders"
156159
)]
157160
FullyQualified {
@@ -163,8 +166,9 @@ pub enum SourceKindMultiSuggestion<'a> {
163166
adjustment: &'a str,
164167
successor_pos: &'a str,
165168
},
166-
#[multipart_suggestion_verbose(
169+
#[multipart_suggestion(
167170
infer_source_kind_closure_return,
171+
style = "verbose",
168172
applicability = "has-placeholders"
169173
)]
170174
ClosureReturn {
@@ -478,8 +482,9 @@ pub enum ImplicitStaticLifetimeSubdiag {
478482
#[primary_span]
479483
span: Span,
480484
},
481-
#[suggestion_verbose(
485+
#[suggestion(
482486
infer_implicit_static_lifetime_suggestion,
487+
style = "verbose",
483488
code = " + '_",
484489
applicability = "maybe-incorrect"
485490
)]

compiler/rustc_lint/src/errors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ pub struct UnknownToolInScopedLint {
8383
pub struct BuiltinEllpisisInclusiveRangePatterns {
8484
#[primary_span]
8585
pub span: Span,
86-
#[suggestion_short(code = "{replace}", applicability = "machine-applicable")]
86+
#[suggestion(style = "short", code = "{replace}", applicability = "machine-applicable")]
8787
pub suggestion: Span,
8888
pub replace: String,
8989
}

compiler/rustc_lint/src/opaque_hidden_inferred_bound.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,9 @@ struct OpaqueHiddenInferredBoundLint<'tcx> {
150150
}
151151

152152
#[derive(Subdiagnostic)]
153-
#[suggestion_verbose(
153+
#[suggestion(
154154
lint_opaque_hidden_inferred_bound_sugg,
155+
style = "verbose",
155156
applicability = "machine-applicable",
156157
code = " + {trait_ref}"
157158
)]

compiler/rustc_macros/src/diagnostics/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ pub fn lint_diagnostic_derive(s: Structure<'_>) -> TokenStream {
129129
/// }
130130
///
131131
/// #[derive(Subdiagnostic)]
132-
/// #[suggestion_verbose(parser::raw_identifier)]
132+
/// #[suggestion(style = "verbose",parser::raw_identifier)]
133133
/// pub struct RawIdentifierSuggestion<'tcx> {
134134
/// #[primary_span]
135135
/// span: Span,

0 commit comments

Comments
 (0)