Skip to content

Commit

Permalink
Auto merge of #103857 - Manishearth:rollup-709fui6, r=Manishearth
Browse files Browse the repository at this point in the history
Rollup of 8 pull requests

Successful merges:

 - #103072 (compiletest: set the dylib path when gathering target cfg)
 - #103084 (Derive `Eq` and `Hash` for `ControlFlow`)
 - #103575 (Change #[suggestion_*] attributes to use style="...")
 - #103637 (Use stdio in UWP apps)
 - #103638 (Add `multivalue` target feature to WASM target)
 - #103781 (Detect unused files in `src/test/mir-opt` and error on them in tidy.)
 - #103837 (Migrate sidebar-links-color GUI test to functions)
 - #103839 (Print valid `--print` requests if request is invalid)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
  • Loading branch information
bors committed Nov 2, 2022
2 parents 11ebe65 + c2affd5 commit a876a4d
Show file tree
Hide file tree
Showing 44 changed files with 848 additions and 1,033 deletions.
9 changes: 9 additions & 0 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,7 @@ dependencies = [
"lazycell",
"libc",
"miow",
"miropt-test-tools",
"regex",
"rustfix",
"serde",
Expand Down Expand Up @@ -2268,6 +2269,13 @@ dependencies = [
"ui_test",
]

[[package]]
name = "miropt-test-tools"
version = "0.1.0"
dependencies = [
"regex",
]

[[package]]
name = "new_debug_unreachable"
version = "1.0.4"
Expand Down Expand Up @@ -4920,6 +4928,7 @@ version = "0.1.0"
dependencies = [
"cargo_metadata 0.14.0",
"lazy_static",
"miropt-test-tools",
"regex",
"walkdir",
]
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ members = [
"src/tools/error_index_generator",
"src/tools/linkchecker",
"src/tools/lint-docs",
"src/tools/miropt-test-tools",
"src/tools/rustbook",
"src/tools/unstable-book-gen",
"src/tools/tidy",
Expand Down
3 changes: 2 additions & 1 deletion compiler/rustc_ast_lowering/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,9 @@ pub struct RegisterConflict<'a> {
pub struct SubTupleBinding<'a> {
#[primary_span]
#[label]
#[suggestion_verbose(
#[suggestion(
ast_lowering_sub_tuple_binding_suggestion,
style = "verbose",
code = "..",
applicability = "maybe-incorrect"
)]
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_borrowck/src/session_diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub(crate) struct GenericDoesNotLiveLongEnough {
#[derive(LintDiagnostic)]
#[diag(borrowck_var_does_not_need_mut)]
pub(crate) struct VarNeedNotMut {
#[suggestion_short(applicability = "machine-applicable", code = "")]
#[suggestion(style = "short", applicability = "machine-applicable", code = "")]
pub span: Span,
}
#[derive(Diagnostic)]
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_codegen_ssa/src/target_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ const WASM_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
// tidy-alphabetical-start
("atomics", Some(sym::wasm_target_feature)),
("bulk-memory", Some(sym::wasm_target_feature)),
("multivalue", Some(sym::wasm_target_feature)),
("mutable-globals", Some(sym::wasm_target_feature)),
("nontrapping-fptoint", Some(sym::wasm_target_feature)),
("reference-types", Some(sym::wasm_target_feature)),
Expand Down
8 changes: 6 additions & 2 deletions compiler/rustc_hir_analysis/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ pub struct TypeofReservedKeywordUsed<'tcx> {
#[primary_span]
#[label]
pub span: Span,
#[suggestion_verbose(code = "{ty}")]
#[suggestion(style = "verbose", code = "{ty}")]
pub opt_sugg: Option<(Span, Applicability)>,
}

Expand Down Expand Up @@ -239,7 +239,11 @@ pub struct UnusedExternCrate {
#[derive(LintDiagnostic)]
#[diag(hir_analysis_extern_crate_not_idiomatic)]
pub struct ExternCrateNotIdiomatic {
#[suggestion_short(applicability = "machine-applicable", code = "{suggestion_code}")]
#[suggestion(
style = "short",
applicability = "machine-applicable",
code = "{suggestion_code}"
)]
pub span: Span,
pub msg_code: String,
pub suggestion_code: String,
Expand Down
3 changes: 2 additions & 1 deletion compiler/rustc_hir_typeck/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,9 @@ pub struct MissingParentheseInRange {
}

#[derive(Subdiagnostic)]
#[multipart_suggestion_verbose(
#[multipart_suggestion(
hir_analysis_add_missing_parentheses_in_range,
style = "verbose",
applicability = "maybe-incorrect"
)]
pub struct AddMissingParenthesesInRange {
Expand Down
15 changes: 10 additions & 5 deletions compiler/rustc_infer/src/errors/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,9 @@ pub struct InferenceBadError<'a> {

#[derive(Subdiagnostic)]
pub enum SourceKindSubdiag<'a> {
#[suggestion_verbose(
#[suggestion(
infer_source_kind_subdiag_let,
style = "verbose",
code = ": {type_name}",
applicability = "has-placeholders"
)]
Expand All @@ -135,8 +136,9 @@ pub enum SourceKindSubdiag<'a> {
parent_prefix: String,
parent_name: String,
},
#[suggestion_verbose(
#[suggestion(
infer_source_kind_subdiag_generic_suggestion,
style = "verbose",
code = "::<{args}>",
applicability = "has-placeholders"
)]
Expand All @@ -150,8 +152,9 @@ pub enum SourceKindSubdiag<'a> {

#[derive(Subdiagnostic)]
pub enum SourceKindMultiSuggestion<'a> {
#[multipart_suggestion_verbose(
#[multipart_suggestion(
infer_source_kind_fully_qualified,
style = "verbose",
applicability = "has-placeholders"
)]
FullyQualified {
Expand All @@ -163,8 +166,9 @@ pub enum SourceKindMultiSuggestion<'a> {
adjustment: &'a str,
successor_pos: &'a str,
},
#[multipart_suggestion_verbose(
#[multipart_suggestion(
infer_source_kind_closure_return,
style = "verbose",
applicability = "has-placeholders"
)]
ClosureReturn {
Expand Down Expand Up @@ -478,8 +482,9 @@ pub enum ImplicitStaticLifetimeSubdiag {
#[primary_span]
span: Span,
},
#[suggestion_verbose(
#[suggestion(
infer_implicit_static_lifetime_suggestion,
style = "verbose",
code = " + '_",
applicability = "maybe-incorrect"
)]
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_lint/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ pub struct UnknownToolInScopedLint {
pub struct BuiltinEllpisisInclusiveRangePatterns {
#[primary_span]
pub span: Span,
#[suggestion_short(code = "{replace}", applicability = "machine-applicable")]
#[suggestion(style = "short", code = "{replace}", applicability = "machine-applicable")]
pub suggestion: Span,
pub replace: String,
}
Expand Down
3 changes: 2 additions & 1 deletion compiler/rustc_lint/src/opaque_hidden_inferred_bound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,9 @@ struct OpaqueHiddenInferredBoundLint<'tcx> {
}

#[derive(Subdiagnostic)]
#[suggestion_verbose(
#[suggestion(
lint_opaque_hidden_inferred_bound_sugg,
style = "verbose",
applicability = "machine-applicable",
code = " + {trait_ref}"
)]
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_macros/src/diagnostics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ pub fn lint_diagnostic_derive(s: Structure<'_>) -> TokenStream {
/// }
///
/// #[derive(Subdiagnostic)]
/// #[suggestion_verbose(parser::raw_identifier)]
/// #[suggestion(style = "verbose",parser::raw_identifier)]
/// pub struct RawIdentifierSuggestion<'tcx> {
/// #[primary_span]
/// span: Span,
Expand Down
Loading

0 comments on commit a876a4d

Please sign in to comment.