Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
05b7b46
fix: break inside async closure has incorrect span for enclosing closure
linyihai May 13, 2024
22d0b1e
delegation: Implement glob delegation
petrochenkov Mar 15, 2024
df1d616
safe transmute: support non-ZST, variantful, uninhabited enums
jswrenn Jun 14, 2024
ab0e727
Suggest standalone doctest for non-local impl defs
Urgau Jun 13, 2024
94c2821
Also simplify macro_rules doctest code
Urgau Jun 13, 2024
6f5b0ef
Add badboy and BlackHoleFox as Mac Catalyst maintainers
madsmtm Jun 17, 2024
b7c2376
Sync fuchsia test runner with clang test runner
erickt May 31, 2024
0f8c3f7
tail expression behind terminating scope
dingxiangfei2009 Apr 12, 2024
475b63f
Add `/rustc-ice*/ to `.gitignore`
tgross35 Jun 18, 2024
7321e79
Replace `move||` with `move ||` in `compiler/` and `library/`
Vonr Jun 18, 2024
bfe6a26
hir_typeck: be more conservative in making "note caller chooses ty pa…
jieyouxu Jun 18, 2024
939026c
tests: update tests for more conservative return ty mismatch note
jieyouxu Jun 16, 2024
f8ce1cf
Rollup merge of #124135 - petrochenkov:deleglob, r=fmease
jieyouxu Jun 19, 2024
c9a9d5c
Rollup merge of #125078 - linyihai:issue-124496, r=compiler-errors
jieyouxu Jun 19, 2024
8eb2e5f
Rollup merge of #125293 - dingxiangfei2009:tail-expr-temp-lifetime, r…
jieyouxu Jun 19, 2024
081cc5c
Rollup merge of #126422 - Urgau:doctest-impl-non-local-def, r=fmease
jieyouxu Jun 19, 2024
0e46111
Rollup merge of #126493 - jswrenn:fix-126460, r=compiler-errors
jieyouxu Jun 19, 2024
3c61378
Rollup merge of #126504 - erickt:bump-fuchsia, r=tmandry
jieyouxu Jun 19, 2024
bf841c4
Rollup merge of #126558 - jieyouxu:caller-chooses-ty, r=fmease
jieyouxu Jun 19, 2024
87ca073
Rollup merge of #126586 - madsmtm:mac-catalyst-maintainers, r=Nilstrieb
jieyouxu Jun 19, 2024
a2436a8
Rollup merge of #126615 - tgross35:gitignore-ice, r=compiler-errors
jieyouxu Jun 19, 2024
7450ab7
Rollup merge of #126632 - Vonr:fix/moving-closure-formatting-v2, r=Ni…
jieyouxu Jun 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Also simplify macro_rules doctest code
  • Loading branch information
Urgau committed Jun 15, 2024
commit 94c282197d7081370d3fd538c66976fb41554cf6
13 changes: 5 additions & 8 deletions compiler/rustc_lint/src/lints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1368,8 +1368,7 @@ pub enum NonLocalDefinitionsDiag {
depth: u32,
body_kind_descr: &'static str,
body_name: String,
help: Option<()>,
doctest_help: Option<()>,
doctest: bool,
cargo_update: Option<NonLocalDefinitionsCargoUpdateNote>,
},
}
Expand Down Expand Up @@ -1448,20 +1447,18 @@ impl<'a> LintDiagnostic<'a, ()> for NonLocalDefinitionsDiag {
depth,
body_kind_descr,
body_name,
help,
doctest_help,
doctest,
cargo_update,
} => {
diag.primary_message(fluent::lint_non_local_definitions_macro_rules);
diag.arg("depth", depth);
diag.arg("body_kind_descr", body_kind_descr);
diag.arg("body_name", body_name);

if let Some(()) = help {
diag.help(fluent::lint_help);
}
if let Some(()) = doctest_help {
if doctest {
diag.help(fluent::lint_help_doctest);
} else {
diag.help(fluent::lint_help);
}

diag.note(fluent::lint_non_local);
Expand Down
3 changes: 1 addition & 2 deletions compiler/rustc_lint/src/non_local_def.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,7 @@ impl<'tcx> LateLintPass<'tcx> for NonLocalDefinitions {
.map(|s| s.to_ident_string())
.unwrap_or_else(|| "<unnameable>".to_string()),
cargo_update: cargo_update(),
help: (!is_at_toplevel_doctest()).then_some(()),
doctest_help: is_at_toplevel_doctest().then_some(()),
doctest: is_at_toplevel_doctest(),
},
)
}
Expand Down