Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
4a92cf6
Derive `Eq` and `Hash` for `ControlFlow`
inquisitivecrystal Oct 15, 2022
368c4a3
Add style= parameter to suggestion attributes
Xiretza Oct 20, 2022
29334b9
rustfmt diagnostic derive tests
Xiretza Oct 20, 2022
20f2958
Add "tool-only" suggestion style
Xiretza Oct 20, 2022
cd621be
Convert all #[suggestion_*] attributes to #[suggestion(style = "...")]
Xiretza Oct 22, 2022
2eeb780
Remove #[suggestion_*] attributes
Xiretza Oct 22, 2022
dad28ad
Add `multivalue` target feature to WASM target
ia0 Oct 27, 2022
5857c30
Use stdio in UWP apps
ChrisDenton Oct 27, 2022
f8a0cc2
compiletest: set the dylib path when gathering target cfg
cuviper Oct 14, 2022
17395b4
Detect unused files in `src/test/mir-opt` and error on them in tidy.
JakobDegen Oct 31, 2022
b20d969
Print valid `--print` requests if request is invalid
Noratrieb Nov 1, 2022
2024f70
Migrate sidebar-links-color GUI test to functions
GuillaumeGomez Nov 1, 2022
a1dfefa
Remove unneeded "rustdoc-preferred-dark-theme" setting
GuillaumeGomez Nov 1, 2022
3aae004
Rollup merge of #103072 - cuviper:compiletest-path, r=Mark-Simulacrum
Manishearth Nov 2, 2022
d4bd794
Rollup merge of #103084 - inquisitivecrystal:control-flow, r=scottmcm
Manishearth Nov 2, 2022
69e7055
Rollup merge of #103575 - Xiretza:suggestions-style-attr, r=davidtwco
Manishearth Nov 2, 2022
65d63ca
Rollup merge of #103637 - ChrisDenton:stdio-uwp, r=thomcc
Manishearth Nov 2, 2022
2cfab1f
Rollup merge of #103638 - ia0:multivalue, r=nagisa
Manishearth Nov 2, 2022
e2a6d28
Rollup merge of #103781 - JakobDegen:mir-opt-tidy, r=jyn514
Manishearth Nov 2, 2022
617f246
Rollup merge of #103837 - GuillaumeGomez:migrate-sidebar-links-color-…
Manishearth Nov 2, 2022
c2affd5
Rollup merge of #103839 - Nilstrieb:print-list, r=compiler-errors
Manishearth Nov 2, 2022
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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