Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
3d40189
Hermit: Don't cast `i32` to `i32`
mkroening Jun 30, 2026
87900d9
Hermit: Inline `InnerReadDir::new`
mkroening Jun 30, 2026
149dc77
Hermit: Avoid unsoundness around dirent64
mkroening Jun 30, 2026
736fa96
Hermit: Avoid cloning `InnerReadDir::root`
mkroening Jun 30, 2026
5b4b02e
avoid ICE in From/TryFrom cast diag
sjwang05 Jul 9, 2026
b165183
a bit optimize four-digit chunks in integer formatting
chirizxc Jul 11, 2026
25435a0
add SAFETY
chirizxc Jul 11, 2026
576d1bd
Hermit: Rework `getdents64` implementation
jounathaen Jun 26, 2026
0229444
Hermit: Filter out `.` and `..` from `getdents64`
mkroening Jul 1, 2026
551f8d4
Add intrinsic-test alias and set test sample rate
xonx4l Jul 25, 2026
9894451
skip intrinsic-test alias on LLVM 21
xonx4l Jul 25, 2026
6618eb6
review
chirizxc Jul 28, 2026
20ec372
Update library/core/src/fmt/num.rs
chirizxc Jul 28, 2026
c10ff54
review (x3)
chirizxc Jul 28, 2026
dedf120
fix tidy
chirizxc Jul 28, 2026
ab3e64f
test: add test suite for the 85681 issue
SzilvasiPeter Jul 28, 2026
66f3da0
Refactor `missing_items_err`: factor out function to find suggestion …
joshtriplett Jul 28, 2026
6640449
Refactor `missing_items_err`: factor out function to find suggestions
joshtriplett Jul 28, 2026
740230b
Remove unnecessary format
gkamathe Jul 29, 2026
917aa16
review
chirizxc Jul 29, 2026
af98396
review (x2)
chirizxc Jul 29, 2026
bf8708e
Add suggestions for `must_implement_one_of`
joshtriplett Jul 28, 2026
50d66b9
Work around Wine bug 60084 by calling WSAStartup at most once
tbu- Jul 29, 2026
51b4904
bootstrap: remove use-lld config alias
kn1g78 Jul 29, 2026
31918e4
Rename `rustc_codegen_gcc/errors.rs` into `rustc_codegen_gcc/diagnost…
GuillaumeGomez Jul 29, 2026
6229545
Rename `rustc_codegen_llvm/errors.rs` into `rustc_codegen_llvm/diagno…
GuillaumeGomez Jul 29, 2026
580253e
split module resolutions into local and external types, with external…
LorrensP-2158466 Jul 28, 2026
c430395
Add regression test for nested associated-type projection ICE
zakrad Jul 28, 2026
d3be642
Mark a doctest as requiring unwinding
fs-rachel Jul 29, 2026
dcb0002
remove intrinsic-test path
xonx4l Jul 29, 2026
3d0b63d
hermit/fs: Return `unsupported()` instead of `from_raw_os_error(22)`
mkroening Jun 22, 2026
6b2608e
rustc_resolve: Further reduce mutability in resolver
petrochenkov Jul 28, 2026
c9f7b96
rustc_resolve: Turn `RefOrMut` into an enum
petrochenkov Jul 28, 2026
8364216
core: implement bounded random sampling
joboet Jul 19, 2026
c257aef
review (x3)
chirizxc Jul 29, 2026
d800217
iter: specialize Take::count using advance_by
Rachit2323 Jul 29, 2026
953e83e
Use correct feature gates for `f16`/`f128` `From` impls
beetrees Jul 29, 2026
4c73a1d
Rollup merge of #159130 - chirizxc:num_fmt, r=clarfonthey
jhpratt Jul 29, 2026
7a768e1
Rollup merge of #159592 - joboet:range_distribution, r=JohnTitor
jhpratt Jul 29, 2026
d265755
Rollup merge of #159898 - xonx4l:intrinsic-test-sample-rate, r=Kobzol
jhpratt Jul 29, 2026
ba7b13e
Rollup merge of #158247 - hermit-os:hermit-fs-unsupported, r=clarfonthey
jhpratt Jul 29, 2026
a5cb15c
Rollup merge of #158649 - hermit-os:hermit-readdir, r=joboet
jhpratt Jul 29, 2026
9c5d11f
Rollup merge of #159049 - sjwang05:issue-158967, r=lcnr
jhpratt Jul 29, 2026
03bf64d
Rollup merge of #160053 - SzilvasiPeter:main, r=ShoyuVanilla
jhpratt Jul 29, 2026
905b20e
Rollup merge of #160087 - zakrad:regr-test-109864, r=oli-obk
jhpratt Jul 29, 2026
12a6d11
Rollup merge of #160090 - petrochenkov:cmonst, r=mu001999
jhpratt Jul 29, 2026
d36dd4e
Rollup merge of #160099 - LorrensP-2158466:split-module-resolutions, …
jhpratt Jul 29, 2026
4de31fd
Rollup merge of #160106 - joshtriplett:must-implement-one-of-suggesti…
jhpratt Jul 29, 2026
1c7dc8f
Rollup merge of #160117 - gkamathe:remove-unnecessary-format, r=mu001999
jhpratt Jul 29, 2026
0b2c1e9
Rollup merge of #160134 - tbu-:pr_wine_60084_wsastartup, r=ChrisDenton
jhpratt Jul 29, 2026
47f5240
Rollup merge of #160139 - Rachit2323:take-count-specialization, r=joboet
jhpratt Jul 29, 2026
a348943
Rollup merge of #160142 - kn1g78:remove-use-lld-config-alias, r=Kobzol
jhpratt Jul 29, 2026
8fd063a
Rollup merge of #160148 - GuillaumeGomez:rename-errors, r=JonathanBro…
jhpratt Jul 29, 2026
0d342bc
Rollup merge of #160151 - fs-rachel:unwind-in-alloc-doctest, r=clarfo…
jhpratt Jul 29, 2026
9790598
Rollup merge of #160166 - beetrees:f16-f128-from-feature-gates, r=tgr…
jhpratt Jul 29, 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
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_gcc/src/asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use rustc_target::asm::*;
use crate::builder::Builder;
use crate::callee::get_fn;
use crate::context::CodegenCx;
use crate::errors::{NulBytesInAsm, UnwindingInlineAsm};
use crate::diagnostics::{NulBytesInAsm, UnwindingInlineAsm};
use crate::type_of::LayoutGccExt;

// Rust asm! and GCC Extended Asm semantics differ substantially.
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_gcc/src/back/lto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ use rustc_log::tracing::info;
use tempfile::{TempDir, tempdir};

use crate::back::write::{codegen, save_temp_bitcode};
use crate::errors::LtoBitcodeFromRlib;
use crate::diagnostics::LtoBitcodeFromRlib;
use crate::{GccCodegenBackend, GccContext, LtoMode, to_gcc_opt_level};

struct LtoData {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_gcc/src/back/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use rustc_session::config::OutputType;
use rustc_target::spec::SplitDebuginfo;

use crate::base::add_pic_option;
use crate::errors::CopyBitcode;
use crate::diagnostics::CopyBitcode;
use crate::{GccContext, LtoMode};

pub(crate) fn codegen(
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_gcc/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ use rustc_target::spec::{HasTargetSpec, HasX86AbiOpt, Target, X86Abi};
use crate::abi::FnAbiGccExt;
use crate::common::{SignType, TypeReflection, type_is_pointer};
use crate::context::CodegenCx;
use crate::errors;
use crate::diagnostics;
use crate::intrinsic::llvm;
use crate::type_of::LayoutGccExt;

Expand Down Expand Up @@ -1803,7 +1803,7 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
_instance: Option<Instance<'tcx>>,
) {
// FIXME: implement support for explicit tail calls like rustc_codegen_llvm.
self.tcx.dcx().emit_fatal(errors::ExplicitTailCallsUnsupported);
self.tcx.dcx().emit_fatal(diagnostics::ExplicitTailCallsUnsupported);
}

fn zext(&mut self, value: RValue<'gcc>, dest_typ: Type<'gcc>) -> RValue<'gcc> {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_gcc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ mod context;
mod coverageinfo;
mod debuginfo;
mod declare;
mod errors;
mod diagnostics;
mod gcc_util;
mod int;
mod intrinsic;
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_llvm/src/attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use rustc_target::spec::{Arch, FramePointer, SanitizerSet, StackProbeType, Stack
use smallvec::SmallVec;

use crate::context::SimpleCx;
use crate::errors::{PackedStackBackchainNeedsSoftfloat, SanitizerMemtagRequiresMte};
use crate::diagnostics::{PackedStackBackchainNeedsSoftfloat, SanitizerMemtagRequiresMte};
use crate::llvm::AttributePlace::Function;
use crate::llvm::{
self, AllocKindFlags, Attribute, AttributeKind, AttributePlace, MemoryEffects, Value,
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_llvm/src/back/lto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use crate::back::write::{
self, CodegenDiagnosticsStage, DiagnosticHandlers, bitcode_section_name, codegen,
save_temp_bitcode,
};
use crate::errors::{LlvmError, LtoBitcodeFromRlib};
use crate::diagnostics::{LlvmError, LtoBitcodeFromRlib};
use crate::llvm::{self, build_string};
use crate::{LlvmCodegenBackend, ModuleLlvm};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::ptr::NonNull;

use rustc_data_structures::small_c_str::SmallCStr;

use crate::errors::LlvmError;
use crate::diagnostics::LlvmError;
use crate::llvm;

/// Responsible for safely creating and disposing llvm::TargetMachine via ffi functions.
Expand Down
12 changes: 6 additions & 6 deletions compiler/rustc_codegen_llvm/src/back/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use crate::back::profiling::{
use crate::builder::SBuilder;
use crate::builder::gpu_offload::scalar_width;
use crate::common::AsCCharPtr;
use crate::errors::{
use crate::diagnostics::{
CopyBitcode, FromLlvmDiag, FromLlvmOptimizationDiag, LlvmError, ParseTargetMachineConfig,
UnsupportedCompression, WithLlvmError, WriteBytecode,
};
Expand Down Expand Up @@ -819,7 +819,7 @@ pub(crate) unsafe fn llvm_optimize(
device_out_c.as_ptr(),
);
if !ok || !device_out.exists() {
dcx.emit_err(crate::errors::OffloadBundleImagesFailed);
dcx.emit_err(crate::diagnostics::OffloadBundleImagesFailed);
}
}
}
Expand All @@ -837,15 +837,15 @@ pub(crate) unsafe fn llvm_optimize(
{
let device_pathbuf = PathBuf::from(device_path);
if device_pathbuf.is_relative() {
dcx.emit_err(crate::errors::OffloadWithoutAbsPath);
dcx.emit_err(crate::diagnostics::OffloadWithoutAbsPath);
} else if device_pathbuf
.file_name()
.and_then(|n| n.to_str())
.is_some_and(|n| n != "device.bin")
{
dcx.emit_err(crate::errors::OffloadWrongFileName);
dcx.emit_err(crate::diagnostics::OffloadWrongFileName);
} else if !device_pathbuf.exists() {
dcx.emit_err(crate::errors::OffloadNonexistingPath);
dcx.emit_err(crate::diagnostics::OffloadNonexistingPath);
}
let host_path = cgcx.output_filenames.path(OutputType::Object);
let host_dir = host_path.parent().unwrap();
Expand All @@ -859,7 +859,7 @@ pub(crate) unsafe fn llvm_optimize(
let ok =
unsafe { llvm::LLVMRustOffloadEmbedBufferInModule(llmod2, device_bin_c.as_ptr()) };
if !ok {
dcx.emit_err(crate::errors::OffloadEmbedFailed);
dcx.emit_err(crate::diagnostics::OffloadEmbedFailed);
}
write_output_file(
dcx,
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_llvm/src/consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use rustc_target::spec::Arch;
use tracing::{debug, instrument, trace};

use crate::common::CodegenCx;
use crate::errors::SymbolAlreadyDefined;
use crate::diagnostics::SymbolAlreadyDefined;
use crate::llvm::{self, Type, Value, const_ptr_auth};
use crate::type_of::LayoutLlvmExt;
use crate::{base, debuginfo};
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_llvm/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ pub(crate) unsafe fn create_module<'ll>(
.expect("got a non-UTF8 data-layout from LLVM");

if target_data_layout != llvm_data_layout {
tcx.dcx().emit_err(crate::errors::MismatchedDataLayout {
tcx.dcx().emit_err(crate::diagnostics::MismatchedDataLayout {
rustc_target: sess.opts.target_triple.to_string().as_str(),
rustc_layout: target_data_layout.as_str(),
llvm_target: sess.target.llvm_target.borrow(),
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_llvm/src/intrinsic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ use crate::builder::gpu_offload::{
};
use crate::context::CodegenCx;
use crate::declare::declare_raw_fn;
use crate::errors::{
use crate::diagnostics::{
AutoDiffWithoutEnable, AutoDiffWithoutLto, IntrinsicSignatureMismatch, IntrinsicWrongArch,
OffloadWithoutEnable, OffloadWithoutFatLTO, UnknownIntrinsic,
};
Expand Down
7 changes: 4 additions & 3 deletions compiler/rustc_codegen_llvm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ mod context;
mod coverageinfo;
mod debuginfo;
mod declare;
mod errors;
mod diagnostics;
mod intrinsic;
mod llvm;
mod llvm_util;
Expand Down Expand Up @@ -233,10 +233,11 @@ impl CodegenBackend for LlvmCodegenBackend {
match llvm::EnzymeWrapper::get_or_init(&sess.opts.sysroot) {
Ok(_) => {}
Err(llvm::EnzymeLibraryError::NotFound { err }) => {
sess.dcx().emit_fatal(crate::errors::AutoDiffComponentMissing { err });
sess.dcx().emit_fatal(crate::diagnostics::AutoDiffComponentMissing { err });
}
Err(llvm::EnzymeLibraryError::LoadFailed { err }) => {
sess.dcx().emit_fatal(crate::errors::AutoDiffComponentUnavailable { err });
sess.dcx()
.emit_fatal(crate::diagnostics::AutoDiffComponentUnavailable { err });
}
}
enable_autodiff_settings(&sess.opts.unstable_opts.autodiff);
Expand Down
5 changes: 3 additions & 2 deletions compiler/rustc_codegen_llvm/src/llvm_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use rustc_target::spec::{
use smallvec::{SmallVec, smallvec};

use crate::back::write::create_informational_target_machine;
use crate::{errors, llvm};
use crate::{diagnostics, llvm};

static INIT: Once = Once::new();

Expand Down Expand Up @@ -636,7 +636,8 @@ fn llvm_features_by_flags(sess: &Session, features: &mut Vec<String>) {
// -Zfixed-x18
if sess.opts.unstable_opts.fixed_x18 {
if sess.target.arch != Arch::AArch64 {
sess.dcx().emit_fatal(errors::FixedX18InvalidArch { arch: sess.target.arch.desc() });
sess.dcx()
.emit_fatal(diagnostics::FixedX18InvalidArch { arch: sess.target.arch.desc() });
} else {
features.push("+reserve-x18".into());
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_llvm/src/mono_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use tracing::debug;
use crate::abi::FnAbiLlvmExt;
use crate::builder::Builder;
use crate::context::CodegenCx;
use crate::errors::SymbolAlreadyDefined;
use crate::diagnostics::SymbolAlreadyDefined;
use crate::type_of::LayoutLlvmExt;
use crate::{base, llvm};

Expand Down
12 changes: 7 additions & 5 deletions compiler/rustc_hir_analysis/src/check/always_applicable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ use rustc_span::sym;
use rustc_trait_selection::regions::InferCtxtRegionExt;
use rustc_trait_selection::traits::{self, ObligationCtxt};

use crate::check::missing_items_must_implement_one_of_err;
use crate::diagnostics;
use crate::hir::def_id::{DefId, LocalDefId};

Expand Down Expand Up @@ -394,11 +395,12 @@ fn check_drop_xor_pin_drop<'tcx>(
match (drop_span, pin_drop_span) {
(None, None) => {
if tcx.features().pin_ergonomics() {
return Err(tcx.dcx().emit_err(crate::diagnostics::MissingOneOfTraitItem {
span: tcx.def_span(drop_impl_did),
note: None,
missing_items_msg: "drop`, `pin_drop".to_string(),
}));
return Err(missing_items_must_implement_one_of_err(
tcx,
drop_impl_did,
[sym::drop, sym::pin_drop].into_iter(),
None,
));
} else {
return Err(tcx
.dcx()
Expand Down
12 changes: 3 additions & 9 deletions compiler/rustc_hir_analysis/src/check/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1436,19 +1436,13 @@ fn check_impl_items_against_trait<'tcx>(
}

if !missing_items.is_empty() {
let full_impl_span = tcx.hir_span_with_body(tcx.local_def_id_to_hir_id(impl_id));
missing_items_err(tcx, impl_id, &missing_items, full_impl_span);
missing_items_err(tcx, impl_id, &missing_items);
}

if let Some(missing_items) = must_implement_one_of {
let attr_span = find_attr!(tcx, trait_ref.def_id, RustcMustImplementOneOf {attr_span, ..} => *attr_span);

missing_items_must_implement_one_of_err(
tcx,
tcx.def_span(impl_id),
missing_items,
attr_span,
);
let missing_items = missing_items.into_iter().map(|i| i.name);
missing_items_must_implement_one_of_err(tcx, impl_id, missing_items, attr_span);
}
}
}
Expand Down
70 changes: 50 additions & 20 deletions compiler/rustc_hir_analysis/src/check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ use tracing::debug;

use self::compare_impl_item::collect_return_position_impl_trait_in_trait_tys;
use self::region::region_scope_tree;
use crate::diagnostics::{
MissingTraitItemLabel, MissingTraitItemSuggestion, MissingTraitItemSuggestionNone,
};
use crate::{check_c_variadic_abi, diagnostics};

/// Adds query implementations to the [Providers] vtable, see [`rustc_middle::query`]
Expand Down Expand Up @@ -203,11 +206,30 @@ pub(super) fn maybe_check_static_with_link_section(tcx: TyCtxt<'_>, id: LocalDef
}
}

fn missing_items_err(
fn impl_suggestion_span(tcx: TyCtxt<'_>, impl_def_id: LocalDefId) -> Span {
let full_impl_span = tcx.hir_span_with_body(tcx.local_def_id_to_hir_id(impl_def_id));
if let Ok(snippet) = tcx.sess.source_map().span_to_snippet(full_impl_span)
&& snippet.ends_with("}")
{
// `Span` before impl block closing brace.
let hi = full_impl_span.hi() - BytePos(1);
// Point at the place right before the closing brace of the relevant `impl` to suggest
// adding the associated item at the end of its body.
full_impl_span.with_lo(hi).with_hi(hi)
} else {
full_impl_span.shrink_to_hi()
}
}

fn missing_items_suggestions(
tcx: TyCtxt<'_>,
impl_def_id: LocalDefId,
missing_items: &[ty::AssocItem],
full_impl_span: Span,
) -> (
String,
Vec<MissingTraitItemSuggestion>,
Vec<MissingTraitItemSuggestionNone>,
Vec<MissingTraitItemLabel>,
) {
let missing_items =
missing_items.iter().filter(|trait_item| !trait_item.is_impl_trait_in_trait());
Expand All @@ -218,17 +240,7 @@ fn missing_items_err(
.collect::<Vec<_>>()
.join("`, `");

let sugg_sp = if let Ok(snippet) = tcx.sess.source_map().span_to_snippet(full_impl_span)
&& snippet.ends_with("}")
{
// `Span` before impl block closing brace.
let hi = full_impl_span.hi() - BytePos(1);
// Point at the place right before the closing brace of the relevant `impl` to suggest
// adding the associated item at the end of its body.
full_impl_span.with_lo(hi).with_hi(hi)
} else {
full_impl_span.shrink_to_hi()
};
let sugg_sp = impl_suggestion_span(tcx, impl_def_id);

// Obtain the level of indentation ending in `sugg_sp`.
let padding = tcx.sess.source_map().indentation_before(sugg_sp).unwrap_or_else(String::new);
Expand Down Expand Up @@ -259,6 +271,13 @@ fn missing_items_err(
}
}

(missing_items_msg, missing_trait_item, missing_trait_item_none, missing_trait_item_label)
}

fn missing_items_err(tcx: TyCtxt<'_>, impl_def_id: LocalDefId, missing_items: &[ty::AssocItem]) {
let (missing_items_msg, missing_trait_item, missing_trait_item_none, missing_trait_item_label) =
missing_items_suggestions(tcx, impl_def_id, missing_items);

tcx.dcx().emit_err(diagnostics::MissingTraitItem {
span: tcx.span_of_impl(impl_def_id.to_def_id()).unwrap(),
missing_items_msg,
Expand All @@ -270,18 +289,29 @@ fn missing_items_err(

fn missing_items_must_implement_one_of_err(
tcx: TyCtxt<'_>,
impl_span: Span,
missing_items: &[Ident],
impl_def_id: LocalDefId,
missing_items: impl Iterator<Item = Symbol>,
annotation_span: Option<Span>,
) {
let missing_items_msg =
missing_items.iter().map(Ident::to_string).collect::<Vec<_>>().join("`, `");
) -> ErrorGuaranteed {
// Look up the associated items so we can use them to emit better errors.
let trait_def_id = tcx.impl_trait_id(impl_def_id);
let assoc_items = tcx.associated_items(trait_def_id);
let missing_items = missing_items
.flat_map(|s| assoc_items.filter_by_name_unhygienic_and_kind(s, ty::AssocTag::Fn))
.cloned()
.collect::<Vec<_>>();

let (missing_items_msg, missing_trait_item, missing_trait_item_none, missing_trait_item_label) =
missing_items_suggestions(tcx, impl_def_id, &missing_items);

tcx.dcx().emit_err(diagnostics::MissingOneOfTraitItem {
span: impl_span,
span: tcx.def_span(impl_def_id),
note: annotation_span,
missing_items_msg,
});
missing_trait_item_label,
missing_trait_item,
missing_trait_item_none,
})
}

fn default_body_is_unstable(
Expand Down
6 changes: 6 additions & 0 deletions compiler/rustc_hir_analysis/src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -966,6 +966,12 @@ pub(crate) struct MissingOneOfTraitItem {
pub span: Span,
#[note("required because of this annotation")]
pub note: Option<Span>,
#[subdiagnostic]
pub missing_trait_item_label: Vec<MissingTraitItemLabel>,
#[subdiagnostic]
pub missing_trait_item: Vec<MissingTraitItemSuggestion>,
#[subdiagnostic]
pub missing_trait_item_none: Vec<MissingTraitItemSuggestionNone>,
pub missing_items_msg: String,
}

Expand Down
Loading
Loading