From 20431706a863f92cb37dc512fef6e48d192aaf2c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:11:38 +0200 Subject: Merging upstream version 1.66.0+dfsg1. Signed-off-by: Daniel Baumann --- compiler/rustc_symbol_mangling/Cargo.toml | 1 - compiler/rustc_symbol_mangling/src/errors.rs | 6 +++--- compiler/rustc_symbol_mangling/src/test.rs | 8 ++++---- .../rustc_symbol_mangling/src/typeid/typeid_itanium_cxx_abi.rs | 2 +- compiler/rustc_symbol_mangling/src/v0.rs | 4 ++-- 5 files changed, 10 insertions(+), 11 deletions(-) (limited to 'compiler/rustc_symbol_mangling') diff --git a/compiler/rustc_symbol_mangling/Cargo.toml b/compiler/rustc_symbol_mangling/Cargo.toml index 3db052257..2a29ad6a9 100644 --- a/compiler/rustc_symbol_mangling/Cargo.toml +++ b/compiler/rustc_symbol_mangling/Cargo.toml @@ -4,7 +4,6 @@ version = "0.0.0" edition = "2021" [lib] -doctest = false [dependencies] bitflags = "1.2.1" diff --git a/compiler/rustc_symbol_mangling/src/errors.rs b/compiler/rustc_symbol_mangling/src/errors.rs index 664d2543f..f4d0751f7 100644 --- a/compiler/rustc_symbol_mangling/src/errors.rs +++ b/compiler/rustc_symbol_mangling/src/errors.rs @@ -1,11 +1,11 @@ //! Errors emitted by symbol_mangling. use rustc_errors::{DiagnosticArgValue, IntoDiagnosticArg}; -use rustc_macros::SessionDiagnostic; +use rustc_macros::Diagnostic; use rustc_span::Span; -#[derive(SessionDiagnostic)] -#[diag(symbol_mangling::test_output)] +#[derive(Diagnostic)] +#[diag(symbol_mangling_test_output)] pub struct TestOutput { #[primary_span] pub span: Span, diff --git a/compiler/rustc_symbol_mangling/src/test.rs b/compiler/rustc_symbol_mangling/src/test.rs index 9d89c9c52..150459ce0 100644 --- a/compiler/rustc_symbol_mangling/src/test.rs +++ b/compiler/rustc_symbol_mangling/src/test.rs @@ -26,19 +26,19 @@ pub fn report_symbol_names(tcx: TyCtxt<'_>) { let crate_items = tcx.hir_crate_items(()); for id in crate_items.items() { - symbol_names.process_attrs(id.def_id); + symbol_names.process_attrs(id.owner_id.def_id); } for id in crate_items.trait_items() { - symbol_names.process_attrs(id.def_id); + symbol_names.process_attrs(id.owner_id.def_id); } for id in crate_items.impl_items() { - symbol_names.process_attrs(id.def_id); + symbol_names.process_attrs(id.owner_id.def_id); } for id in crate_items.foreign_items() { - symbol_names.process_attrs(id.def_id); + symbol_names.process_attrs(id.owner_id.def_id); } }) } diff --git a/compiler/rustc_symbol_mangling/src/typeid/typeid_itanium_cxx_abi.rs b/compiler/rustc_symbol_mangling/src/typeid/typeid_itanium_cxx_abi.rs index aa65a72ab..6aa031c83 100644 --- a/compiler/rustc_symbol_mangling/src/typeid/typeid_itanium_cxx_abi.rs +++ b/compiler/rustc_symbol_mangling/src/typeid/typeid_itanium_cxx_abi.rs @@ -540,7 +540,7 @@ fn encode_ty<'tcx>( let mut s = String::new(); let def_id = adt_def.0.did; if options.contains(EncodeTyOptions::GENERALIZE_REPR_C) && adt_def.repr().c() { - // For for cross-language CFI support, the encoding must be compatible at the FFI + // For cross-language CFI support, the encoding must be compatible at the FFI // boundary. For instance: // // struct type1 {}; diff --git a/compiler/rustc_symbol_mangling/src/v0.rs b/compiler/rustc_symbol_mangling/src/v0.rs index 79d0ef69b..ecfe6861e 100644 --- a/compiler/rustc_symbol_mangling/src/v0.rs +++ b/compiler/rustc_symbol_mangling/src/v0.rs @@ -7,10 +7,10 @@ use rustc_hir::def_id::{CrateNum, DefId}; use rustc_hir::definitions::{DefPathData, DisambiguatedDefPathData}; use rustc_middle::ty::layout::IntegerExt; use rustc_middle::ty::print::{Print, Printer}; -use rustc_middle::ty::subst::{GenericArg, GenericArgKind, Subst}; use rustc_middle::ty::{ self, EarlyBinder, FloatTy, Instance, IntTy, Ty, TyCtxt, TypeVisitable, UintTy, }; +use rustc_middle::ty::{GenericArg, GenericArgKind}; use rustc_span::symbol::kw; use rustc_target::abi::Integer; use rustc_target::spec::abi::Abi; @@ -301,7 +301,7 @@ impl<'tcx> Printer<'tcx> for &mut SymbolMangler<'tcx> { // Encode impl generic params if the substitutions contain parameters (implying // polymorphization is enabled) and this isn't an inherent impl. - if impl_trait_ref.is_some() && substs.iter().any(|a| a.has_param_types_or_consts()) { + if impl_trait_ref.is_some() && substs.iter().any(|a| a.has_non_region_param()) { self = self.path_generic_args( |this| { this.path_append_ns( -- cgit v1.2.3