Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
83ab57b
Merge commit 'd9aae8cc544c5f524a12b5f3b2f3c3745c34dd74' into sync-fro…
calebzulawski Jan 28, 2026
a4c0bf5
switch to v0 mangling by default on stable
davidtwco Feb 2, 2026
c3ef307
Merge `fabsfN` into `fabs::<F>`
N1ark Mar 15, 2026
a3741b2
simd_fmin/fmax: make semantics and name consistent with scalar intrin…
RalfJung Mar 18, 2026
e33d702
simd_fmin/fmax: make semantics and name consistent with scalar intrin…
RalfJung Mar 18, 2026
9a92532
Merge commit '493d427c7d3423f085f05179e36a35b4943b1379' into sync_cg_…
bjorn3 Mar 25, 2026
6aa386c
Merge branch 'sync_from_rust'
bjorn3 Mar 25, 2026
035bf6e
Update exclusion list in build_llvm_sysroot_for_triple
bjorn3 Mar 26, 2026
ea7f582
Use -Zbuild-dir-new-layout
bjorn3 Mar 26, 2026
c8f40f8
Rollup merge of #153834 - N1ark:generic-float-intrinsics, r=tgross35,…
GuillaumeGomez Mar 28, 2026
496728e
Rollup merge of #154043 - RalfJung:simd-min-max, r=Amanieu,calebzulaw…
GuillaumeGomez Mar 28, 2026
90b98b2
Use `Hcx`/`hcx` consistently for `StableHashingContext`.
nnethercote Mar 31, 2026
85e5a24
Use closures more consistently in `dep_graph.rs`.
nnethercote Mar 17, 2026
2db57c7
Sync from rust 48cc71ee88cd0f11217eced958b9930970da998b
bjorn3 Apr 1, 2026
adb7c3f
Rustup to rustc 1.96.0-nightly (48cc71ee8 2026-03-31)
bjorn3 Apr 1, 2026
29f9565
Move `rustc_middle::mir::mono` to `rustc_middle::mono`
nnethercote Mar 24, 2026
70ee124
Call rustc assembler with `-Zunstable-options`
Finchiedev Apr 10, 2026
c70f3d3
Merge pull request #1638 from Finchiedev/main
bjorn3 Apr 10, 2026
a52ff55
Merge commit '0557e3478104037c76c2e5be7ea21e56ebbaff6e' into sync-fro…
folkertdev Apr 11, 2026
81e7d7d
improve how `proptest` errors are displayed (#517)
folkertdev Apr 11, 2026
c2278ff
Sync from rust bf4fbfb7a18d74e7cd8eef93af7329c58fbb5344
bjorn3 Apr 12, 2026
d542d94
Rustup to rustc 1.97.0-nightly (bf4fbfb7a 2026-04-11)
bjorn3 Apr 12, 2026
8635445
Fix rustc test suite
bjorn3 Apr 12, 2026
a67de10
preseve SIMD element type information
folkertdev Apr 8, 2026
5b3abb9
Rollup merge of #153997 - nnethercote:closure-consistency, r=petroche…
JonathanBrouwer Apr 13, 2026
4fe5dea
Use `!null` pattern type in libcore
oli-obk May 17, 2025
9bc7e4c
Auto merge of #136006 - oli-obk:push-tzonluoyuwkq, r=wesleywiser
bors Apr 13, 2026
d79e13f
Rollup merge of #155005 - folkertdev:simd-element-type-llvm, r=nnethe…
jhpratt Apr 14, 2026
438d886
Lock stable_crate_ids once in create_crate_num
zetanumbers Apr 14, 2026
c418fe7
`CValue::zst()` - add missing "ZST" in docs
DanielEScherzer Apr 14, 2026
e51a166
Sync from rust a5c825cd824ee0ef9463021078a2f464b4cc1a0d
bjorn3 Apr 15, 2026
c08e62a
Rustup to rustc 1.97.0-nightly (a5c825cd8 2026-04-14)
bjorn3 Apr 15, 2026
ff5d860
Introduce helper functions for f16<->f32 casts when necessary
bjorn3 Apr 15, 2026
657259f
Refactor FnDecl and FnSig flags into packed structs
teor2345 Apr 8, 2026
644a946
Disable f16 portable-simd tests on x86_64-pc-windows-gnu
bjorn3 Apr 16, 2026
3bd3fff
float reduce_max/min: fix SNaN treatment (#515)
RalfJung Apr 16, 2026
0afeef0
fail loudly on unsized by-ref invariants (rust-lang/rustc_codegen_cra…
0xmuon Apr 16, 2026
0b5e617
Sync from rust 7af3402cda75aaead39f72516fd6cbb2f3ee0dbd
bjorn3 Apr 17, 2026
973ab0a
Rustup to rustc 1.97.0-nightly (7af3402cd 2026-04-16)
bjorn3 Apr 17, 2026
8591f0f
Tweak irrefutable let else warning output, add new suggestion
WeiTheShinobi Mar 24, 2026
3d2e593
fix all errors
adwinwhite Apr 15, 2026
f1054c7
Sync from rust e22c616e4e87914135c1db261a03e0437255335e
bjorn3 Apr 20, 2026
af2b606
Rustup to rustc 1.97.0-nightly (e22c616e4 2026-04-19)
bjorn3 Apr 20, 2026
720aed3
Fix rustc test suite
bjorn3 Apr 20, 2026
f7893ba
add `f16` types to the prelude (#521)
folkertdev Apr 20, 2026
10fba0b
Update to Cranelift 0.130
philipc Apr 21, 2026
04564d1
Update to object 0.39.1
philipc Apr 21, 2026
a0871ed
Fix __eh_frame for AArch64 on macOS
philipc Apr 21, 2026
e6e77ab
Temporarily allow releases when the bench job fails
bjorn3 Apr 23, 2026
203a324
Merge pull request #1634 from philipc/macho-arm64
bjorn3 Apr 23, 2026
9447da6
Add bound check hint to mask first_set (#523)
calebzulawski Apr 23, 2026
3c362ec
Update documentation for `wasm32-wali-linux-musl` after integrating n…
arjunr2 Apr 24, 2026
c20757f
Add specific target diffs
arjunr2 Apr 24, 2026
da0fe8d
Overhaul the code for running an incremental test revision
Zalathar Apr 24, 2026
569ad99
Only exclude the 155473 change for 1-byte bool-likes
scottmcm Apr 26, 2026
b7996bd
Existing code nits
BoxyUwU Feb 24, 2026
2a8e588
Add `--print=backend-has-mnemonic` and `needs-asm-mnemonic` directive
fneddy Apr 23, 2026
4d4058b
Add regression test for hkl const closures
oli-obk Apr 28, 2026
b465c56
Handle hkl const closures
oli-obk Apr 28, 2026
3b6080c
Rustup to rustc 1.97.0-nightly (52b6e2c20 2026-04-27)
bjorn3 Apr 28, 2026
0eda44b
Delete the 12 year old fixme
mejrs Apr 28, 2026
62ee4cd
remove review queue triagebot mentions
davidtwco Apr 28, 2026
45593d8
Merge commit '3b6080cb20924f0c4f94e47bbbbfcae8b07d82e5' into sync_cg_…
bjorn3 Apr 28, 2026
81d67b7
Rename `SharedContext::emit_dyn_lint*` into `emit_lint*`
GuillaumeGomez Apr 28, 2026
98f08d2
Merge branch 'rust-upstream-2026-04-28' into sync-from-rust-2026-04-28
folkertdev Apr 28, 2026
82ee1e0
use larger ulps for `log` because it uses 2 inexact operations
folkertdev Apr 12, 2026
b104260
bump toolchain to `nightly-2026-04-28`
folkertdev Apr 11, 2026
cc032ad
Merge pull request #525 from folkertdev/sync-from-rust-2026-04-28
calebzulawski Apr 28, 2026
aef93ca
Document that CFI diverges from Rust wrt. ABI-compatibility rules
Darksonn Apr 28, 2026
631e935
Merge commit 'cc032ad5ed5b69d606c4eabbc9c9ae1f412ef2fb' into sync-fro…
folkertdev Apr 28, 2026
1321a67
Rollup merge of #155923 - bjorn3:sync_cg_clif-2026-04-28, r=bjorn3
JonathanBrouwer Apr 28, 2026
eac6db9
Rollup merge of #155930 - folkertdev:sync-from-portable-simd-2026-04-…
JonathanBrouwer Apr 28, 2026
7f76b8b
Rollup merge of #155850 - scottmcm:tweak_niche_assignment, r=mati865
JonathanBrouwer Apr 28, 2026
1857d2e
Rollup merge of #151994 - davidtwco:v0-mangling-on-stable, r=wesleywiser
JonathanBrouwer Apr 28, 2026
8ee7836
Rollup merge of #154325 - WeiTheShinobi:tweak-let-else-output, r=davi…
JonathanBrouwer Apr 28, 2026
22967df
Rollup merge of #155273 - zetanumbers:create_crate_num_lock, r=jdonsz…
JonathanBrouwer Apr 28, 2026
8f15da4
Rollup merge of #155361 - Darksonn:abi-cfi, r=RalfJung
JonathanBrouwer Apr 28, 2026
c6912bf
Rollup merge of #155692 - fneddy:fix_naked-dead-code-elimination, r=f…
JonathanBrouwer Apr 28, 2026
57f2b15
Rollup merge of #155747 - arjunr2:main, r=davidtwco
JonathanBrouwer Apr 28, 2026
ebbddb3
Rollup merge of #155768 - Zalathar:incremental, r=jieyouxu
JonathanBrouwer Apr 28, 2026
f7f266b
Rollup merge of #155907 - oli-obk:push-nypowoyskzxp, r=Kivooeo
JonathanBrouwer Apr 28, 2026
bbfdaa9
Rollup merge of #155910 - BoxyUwU:borrowck_cleanup_5, r=lcnr
JonathanBrouwer Apr 28, 2026
766d9ca
Rollup merge of #155913 - mejrs:delete_the_fixme, r=nia-e
JonathanBrouwer Apr 28, 2026
6b48f6f
Rollup merge of #155920 - davidtwco:triagebot-remove-review-queue, r=…
JonathanBrouwer Apr 28, 2026
4dd31ca
Rollup merge of #155936 - GuillaumeGomez:small-cleanup, r=JonathanBro…
JonathanBrouwer Apr 28, 2026
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
3 changes: 2 additions & 1 deletion compiler/rustc_abi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2084,7 +2084,8 @@ impl Niche {
let distance_end_zero = max_value - v.end;
// FIXME: this ought to work for `bool` too, but that seems to be hitting a miscompilation
// <https://github.com/rust-lang/rust/pull/155473#issuecomment-4302036343>
if count == 1 && v != (WrappingRange { start: 0, end: 1 }) {
let is_bool = size.bytes() == 1 && v == WrappingRange { start: 0, end: 1 };
if count == 1 && !is_bool {
// We only need one, so just pick the one closest to zero.
// Not only does that obviously use zero if it's possible, but it also
// simplifies testing things like `Option<char>`, since looking for `-1`
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_attr_parsing/src/attributes/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,15 +224,15 @@ pub(crate) fn parse_name_value<S: Stage>(

match cx.sess.psess.check_config.expecteds.get(&name) {
Some(ExpectedValues::Some(values)) if !values.contains(&value.map(|(v, _)| v)) => cx
.emit_dyn_lint_with_sess(
.emit_lint_with_sess(
UNEXPECTED_CFGS,
move |dcx, level, sess| {
check_cfg::unexpected_cfg_value(sess, (name, name_span), value)
.into_diag(dcx, level)
},
span,
),
None if cx.sess.psess.check_config.exhaustive_names => cx.emit_dyn_lint_with_sess(
None if cx.sess.psess.check_config.exhaustive_names => cx.emit_lint_with_sess(
UNEXPECTED_CFGS,
move |dcx, level, sess| {
check_cfg::unexpected_cfg_name(sess, (name, name_span), value).into_diag(dcx, level)
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_attr_parsing/src/attributes/crate_level.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ impl<S: Stage> CombineAttributeParser<S> for CrateTypeParser {
None,
);
let span = n.value_span;
cx.emit_dyn_lint(
cx.emit_lint(
UNKNOWN_CRATE_TYPES,
move |dcx, level| {
UnknownCrateTypes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ impl<S: Stage> SingleAttributeParser<S> for DoNotRecommendParser {
fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser) -> Option<AttributeKind> {
let attr_span = cx.attr_span;
if !matches!(args, ArgParser::NoArgs) {
cx.emit_dyn_lint(
cx.emit_lint(
MALFORMED_DIAGNOSTIC_ATTRIBUTES,
|dcx, level| crate::errors::DoNotRecommendDoesNotExpectArgs.into_diag(dcx, level),
attr_span,
Expand All @@ -33,7 +33,7 @@ impl<S: Stage> SingleAttributeParser<S> for DoNotRecommendParser {

if !matches!(cx.target, Target::Impl { of_trait: true }) {
let target_span = cx.target_span;
cx.emit_dyn_lint(
cx.emit_lint(
MISPLACED_DIAGNOSTIC_ATTRIBUTES,
move |dcx, level| {
IncorrectDoNotRecommendLocation { target_span }.into_diag(dcx, level)
Expand Down
16 changes: 8 additions & 8 deletions compiler/rustc_attr_parsing/src/attributes/diagnostic/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ fn merge<T, S: Stage>(
(Some(_) | None, None) => {}
(Some((first_span, _)), Some((later_span, _))) => {
let first_span = *first_span;
cx.emit_dyn_lint(
cx.emit_lint(
MALFORMED_DIAGNOSTIC_ATTRIBUTES,
move |dcx, level| {
IgnoredDiagnosticOption { first_span, later_span, option_name }
Expand All @@ -167,14 +167,14 @@ fn parse_list<'p, S: Stage>(
// We're dealing with `#[diagnostic::attr()]`.
// This can be because that is what the user typed, but that's also what we'd see
// if the user used non-metaitem syntax. See `ArgParser::from_attr_args`.
cx.emit_dyn_lint(
cx.emit_lint(
MALFORMED_DIAGNOSTIC_ATTRIBUTES,
move |dcx, level| NonMetaItemDiagnosticAttribute.into_diag(dcx, level),
list.span,
);
}
ArgParser::NoArgs => {
cx.emit_dyn_lint(
cx.emit_lint(
MALFORMED_DIAGNOSTIC_ATTRIBUTES,
move |dcx, level| {
MissingOptionsForDiagnosticAttribute {
Expand All @@ -187,7 +187,7 @@ fn parse_list<'p, S: Stage>(
);
}
ArgParser::NameValue(_) => {
cx.emit_dyn_lint(
cx.emit_lint(
MALFORMED_DIAGNOSTIC_ATTRIBUTES,
move |dcx, level| {
MalFormedDiagnosticAttributeLint {
Expand Down Expand Up @@ -221,7 +221,7 @@ fn parse_directive_items<'p, S: Stage>(
let span = item.span();

macro malformed() {{
cx.emit_dyn_lint(
cx.emit_lint(
MALFORMED_DIAGNOSTIC_ATTRIBUTES,
move |dcx, level| {
MalFormedDiagnosticAttributeLint {
Expand Down Expand Up @@ -249,7 +249,7 @@ fn parse_directive_items<'p, S: Stage>(

macro duplicate($name: ident, $($first_span:tt)*) {{
let first_span = $($first_span)*;
cx.emit_dyn_lint(
cx.emit_lint(
MALFORMED_DIAGNOSTIC_ATTRIBUTES,
move |dcx, level| IgnoredDiagnosticOption {
first_span,
Expand Down Expand Up @@ -285,7 +285,7 @@ fn parse_directive_items<'p, S: Stage>(
| FormatWarning::PositionalArgument { span }
| FormatWarning::IndexedArgument { span }
| FormatWarning::DisallowedPlaceholder { span, .. }) = warning;
cx.emit_dyn_lint(
cx.emit_lint(
MALFORMED_DIAGNOSTIC_FORMAT_LITERALS,
move |dcx, level| warning.into_diag(dcx, level),
span,
Expand All @@ -295,7 +295,7 @@ fn parse_directive_items<'p, S: Stage>(
f
}
Err(e) => {
cx.emit_dyn_lint(
cx.emit_lint(
MALFORMED_DIAGNOSTIC_FORMAT_LITERALS,
move |dcx, level| {
WrappedParserError {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ impl<S: Stage> AttributeParser<S> for OnConstParser {
// so non-constness is still checked in check_attr.rs
if !matches!(cx.target, Target::Impl { of_trait: true }) {
let target_span = cx.target_span;
cx.emit_dyn_lint(
cx.emit_lint(
MISPLACED_DIAGNOSTIC_ATTRIBUTES,
move |dcx, level| {
DiagnosticOnConstOnlyForTraitImpls { target_span }.into_diag(dcx, level)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl OnMoveParser {
self.span = Some(span);

if !matches!(cx.target, Target::Enum | Target::Struct | Target::Union) {
cx.emit_dyn_lint(
cx.emit_lint(
MISPLACED_DIAGNOSTIC_ATTRIBUTES,
move |dcx, level| DiagnosticOnMoveOnlyForAdt.into_diag(dcx, level),
span,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ impl OnUnimplementedParser {
self.span = Some(span);

if !matches!(cx.target, Target::Trait) {
cx.emit_dyn_lint(
cx.emit_lint(
MISPLACED_DIAGNOSTIC_ATTRIBUTES,
move |dcx, level| DiagnosticOnUnimplementedOnlyForTraits.into_diag(dcx, level),
span,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl OnUnknownParser {

if !early && !matches!(cx.target, Target::Use) {
let target_span = cx.target_span;
cx.emit_dyn_lint(
cx.emit_lint(
MISPLACED_DIAGNOSTIC_ATTRIBUTES,
move |dcx, level| {
DiagnosticOnUnknownOnlyForImports { target_span }.into_diag(dcx, level)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ impl<S: Stage> AttributeParser<S> for OnUnmatchArgsParser {
this.span = Some(span);

if !matches!(cx.target, Target::MacroDef) {
cx.emit_dyn_lint(
cx.emit_lint(
MISPLACED_DIAGNOSTIC_ATTRIBUTES,
move |dcx, level| DiagnosticOnUnmatchArgsOnlyForMacros.into_diag(dcx, level),
span,
Expand Down
50 changes: 25 additions & 25 deletions compiler/rustc_attr_parsing/src/attributes/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ fn check_attr_not_crate_level<S: Stage>(
/// Checks that an attribute is used at the crate level. Returns `true` if valid.
fn check_attr_crate_level<S: Stage>(cx: &mut AcceptContext<'_, '_, S>, span: Span) -> bool {
if cx.shared.target != Target::Crate {
cx.emit_dyn_lint(
cx.emit_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
|dcx, level| AttrCrateLevelOnly.into_diag(dcx, level),
span,
Expand All @@ -84,7 +84,7 @@ fn expected_name_value<S: Stage>(
span: Span,
_name: Option<Symbol>,
) {
cx.emit_dyn_lint(
cx.emit_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
|dcx, level| ExpectedNameValue.into_diag(dcx, level),
span,
Expand All @@ -93,7 +93,7 @@ fn expected_name_value<S: Stage>(

// FIXME: remove this method once merged and use `cx.expected_no_args(span)` instead.
fn expected_no_args<S: Stage>(cx: &mut AcceptContext<'_, '_, S>, span: Span) {
cx.emit_dyn_lint(
cx.emit_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
|dcx, level| ExpectedNoArgs.into_diag(dcx, level),
span,
Expand All @@ -107,7 +107,7 @@ fn expected_string_literal<S: Stage>(
span: Span,
_actual_literal: Option<&MetaItemLit>,
) {
cx.emit_dyn_lint(
cx.emit_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
|dcx, level| MalformedDoc.into_diag(dcx, level),
span,
Expand Down Expand Up @@ -177,7 +177,7 @@ impl DocParser {

if let Some(used_span) = self.attribute.no_crate_inject {
let unused_span = path.span();
cx.emit_dyn_lint(
cx.emit_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
move |dcx, level| {
rustc_errors::lints::UnusedDuplicate {
Expand All @@ -203,7 +203,7 @@ impl DocParser {
// FIXME: remove this method once merged and uncomment the line below instead.
// cx.expected_list(cx.attr_span, args);
let span = cx.attr_span;
cx.emit_dyn_lint(
cx.emit_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
|dcx, level| MalformedDoc.into_diag(dcx, level),
span,
Expand All @@ -217,14 +217,14 @@ impl DocParser {
}
}
Some(name) => {
cx.emit_dyn_lint(
cx.emit_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
move |dcx, level| DocTestUnknown { name }.into_diag(dcx, level),
path.span(),
);
}
None => {
cx.emit_dyn_lint(
cx.emit_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
|dcx, level| DocTestLiteral.into_diag(dcx, level),
path.span(),
Expand Down Expand Up @@ -261,7 +261,7 @@ impl DocParser {
}

if let Some(first_definition) = self.attribute.aliases.get(&alias).copied() {
cx.emit_dyn_lint(
cx.emit_lint(
rustc_session::lint::builtin::UNUSED_ATTRIBUTES,
move |dcx, level| DocAliasDuplicated { first_definition }.into_diag(dcx, level),
span,
Expand Down Expand Up @@ -349,7 +349,7 @@ impl DocParser {
ArgParser::List(list) => {
for meta in list.mixed() {
let MetaItemOrLitParser::MetaItemParser(item) = meta else {
cx.emit_dyn_lint(
cx.emit_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
|dcx, level| DocAutoCfgExpectsHideOrShow.into_diag(dcx, level),
meta.span(),
Expand All @@ -360,7 +360,7 @@ impl DocParser {
Some(sym::hide) => (HideOrShow::Hide, sym::hide),
Some(sym::show) => (HideOrShow::Show, sym::show),
_ => {
cx.emit_dyn_lint(
cx.emit_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
|dcx, level| DocAutoCfgExpectsHideOrShow.into_diag(dcx, level),
item.span(),
Expand All @@ -369,7 +369,7 @@ impl DocParser {
}
};
let ArgParser::List(list) = item.args() else {
cx.emit_dyn_lint(
cx.emit_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
move |dcx, level| {
DocAutoCfgHideShowExpectsList { attr_name }.into_diag(dcx, level)
Expand All @@ -383,7 +383,7 @@ impl DocParser {

for item in list.mixed() {
let MetaItemOrLitParser::MetaItemParser(sub_item) = item else {
cx.emit_dyn_lint(
cx.emit_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
move |dcx, level| {
DocAutoCfgHideShowUnexpectedItem { attr_name }
Expand All @@ -399,7 +399,7 @@ impl DocParser {
// FIXME: remove this method once merged and uncomment the line
// below instead.
// cx.expected_identifier(sub_item.path().span());
cx.emit_dyn_lint(
cx.emit_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
|dcx, level| MalformedDoc.into_diag(dcx, level),
sub_item.path().span(),
Expand All @@ -426,7 +426,7 @@ impl DocParser {
}
}
_ => {
cx.emit_dyn_lint(
cx.emit_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
move |dcx, level| {
DocAutoCfgHideShowUnexpectedItem { attr_name }
Expand All @@ -444,7 +444,7 @@ impl DocParser {
ArgParser::NameValue(nv) => {
let MetaItemLit { kind: LitKind::Bool(bool_value), span, .. } = nv.value_as_lit()
else {
cx.emit_dyn_lint(
cx.emit_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
move |dcx, level| DocAutoCfgWrongLiteral.into_diag(dcx, level),
nv.value_span,
Expand Down Expand Up @@ -588,7 +588,7 @@ impl DocParser {
Some(sym::auto_cfg) => self.parse_auto_cfg(cx, path, args),
Some(sym::test) => {
let Some(list) = args.as_list() else {
cx.emit_dyn_lint(
cx.emit_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
|dcx, level| DocTestTakesList.into_diag(dcx, level),
args.span().unwrap_or(path.span()),
Expand All @@ -605,7 +605,7 @@ impl DocParser {
// FIXME: remove this method once merged and uncomment the line
// below instead.
// cx.unexpected_literal(lit.span);
cx.emit_dyn_lint(
cx.emit_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
|dcx, level| MalformedDoc.into_diag(dcx, level),
lit.span,
Expand All @@ -616,7 +616,7 @@ impl DocParser {
}
Some(sym::spotlight) => {
let span = path.span();
cx.emit_dyn_lint(
cx.emit_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
move |dcx, level| DocUnknownSpotlight { sugg_span: span }.into_diag(dcx, level),
span,
Expand All @@ -629,7 +629,7 @@ impl DocParser {
};
let value = nv.value_as_lit().symbol;
let span = path.span();
cx.emit_dyn_lint(
cx.emit_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
move |dcx, level| {
DocUnknownInclude {
Expand All @@ -644,7 +644,7 @@ impl DocParser {
}
Some(name @ (sym::passes | sym::no_default_passes)) => {
let span = path.span();
cx.emit_dyn_lint(
cx.emit_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
move |dcx, level| {
DocUnknownPasses { name, note_span: span }.into_diag(dcx, level)
Expand All @@ -654,14 +654,14 @@ impl DocParser {
}
Some(sym::plugins) => {
let span = path.span();
cx.emit_dyn_lint(
cx.emit_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
move |dcx, level| DocUnknownPlugins { label_span: span }.into_diag(dcx, level),
span,
);
}
Some(name) => {
cx.emit_dyn_lint(
cx.emit_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
move |dcx, level| DocUnknownAny { name }.into_diag(dcx, level),
path.span(),
Expand All @@ -671,7 +671,7 @@ impl DocParser {
let full_name =
path.segments().map(|s| s.as_str()).intersperse("::").collect::<String>();
let name = Symbol::intern(&full_name);
cx.emit_dyn_lint(
cx.emit_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
move |dcx, level| DocUnknownAny { name }.into_diag(dcx, level),
path.span(),
Expand All @@ -689,7 +689,7 @@ impl DocParser {
ArgParser::NoArgs => {
let suggestions = cx.adcx().suggestions();
let span = cx.attr_span;
cx.emit_dyn_lint(
cx.emit_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
move |dcx, level| {
IllFormedAttributeInput::new(&suggestions, None, None).into_diag(dcx, level)
Expand Down
Loading
Loading