diff options
| author | bors <bors@rust-lang.org> | 2025-08-13 19:23:12 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-08-13 19:23:12 +0000 |
| commit | 3672a55b7cfd0a12e7097197b6242872473ffaa7 (patch) | |
| tree | 3e7a90f0636c0a4646eeee7514d2708b6bd69938 /compiler/rustc_lint | |
| parent | f5b8a11fecf23cb669f6d1feae81aafc2930aeb9 (diff) | |
| parent | bb46a20df47aff847b728177a6432285d30c6922 (diff) | |
| download | rust-3672a55b7cfd0a12e7097197b6242872473ffaa7.tar.gz rust-3672a55b7cfd0a12e7097197b6242872473ffaa7.zip | |
Auto merge of #145366 - GuillaumeGomez:rollup-v0a6v3u, r=GuillaumeGomez
Rollup of 9 pull requests Successful merges: - rust-lang/rust#144761 (aarch64: Make `outline-atomics` a known target feature) - rust-lang/rust#144949 (More `Printer` cleanups) - rust-lang/rust#144955 (search graph: lazily update parent goals) - rust-lang/rust#144962 (Add aarch64_be-unknown-none-softfloat target) - rust-lang/rust#145153 (Handle macros with multiple kinds, and improve errors) - rust-lang/rust#145241 ([AVR] Changed data_layout) - rust-lang/rust#145341 (Install libgccjit into the compiler's sysroot when cg_gcc is enabled) - rust-lang/rust#145349 (Correctly handle when there are no unstable items in the documented crate) - rust-lang/rust#145356 (Add another example for escaped `#` character in doctest in rustdoc book) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_lint')
| -rw-r--r-- | compiler/rustc_lint/src/context.rs | 16 | ||||
| -rw-r--r-- | compiler/rustc_lint/src/non_local_def.rs | 4 |
2 files changed, 10 insertions, 10 deletions
diff --git a/compiler/rustc_lint/src/context.rs b/compiler/rustc_lint/src/context.rs index 11181d10af5..d9163d94710 100644 --- a/compiler/rustc_lint/src/context.rs +++ b/compiler/rustc_lint/src/context.rs @@ -745,12 +745,12 @@ impl<'tcx> LateContext<'tcx> { /// } /// ``` pub fn get_def_path(&self, def_id: DefId) -> Vec<Symbol> { - struct AbsolutePathPrinter<'tcx> { + struct LintPathPrinter<'tcx> { tcx: TyCtxt<'tcx>, path: Vec<Symbol>, } - impl<'tcx> Printer<'tcx> for AbsolutePathPrinter<'tcx> { + impl<'tcx> Printer<'tcx> for LintPathPrinter<'tcx> { fn tcx(&self) -> TyCtxt<'tcx> { self.tcx } @@ -774,12 +774,12 @@ impl<'tcx> LateContext<'tcx> { unreachable!(); // because `path_generic_args` ignores the `GenericArgs` } - fn path_crate(&mut self, cnum: CrateNum) -> Result<(), PrintError> { + fn print_crate_name(&mut self, cnum: CrateNum) -> Result<(), PrintError> { self.path = vec![self.tcx.crate_name(cnum)]; Ok(()) } - fn path_qualified( + fn print_path_with_qualified( &mut self, self_ty: Ty<'tcx>, trait_ref: Option<ty::TraitRef<'tcx>>, @@ -800,7 +800,7 @@ impl<'tcx> LateContext<'tcx> { }) } - fn path_append_impl( + fn print_path_with_impl( &mut self, print_prefix: impl FnOnce(&mut Self) -> Result<(), PrintError>, self_ty: Ty<'tcx>, @@ -825,7 +825,7 @@ impl<'tcx> LateContext<'tcx> { Ok(()) } - fn path_append( + fn print_path_with_simple( &mut self, print_prefix: impl FnOnce(&mut Self) -> Result<(), PrintError>, disambiguated_data: &DisambiguatedDefPathData, @@ -844,7 +844,7 @@ impl<'tcx> LateContext<'tcx> { Ok(()) } - fn path_generic_args( + fn print_path_with_generic_args( &mut self, print_prefix: impl FnOnce(&mut Self) -> Result<(), PrintError>, _args: &[GenericArg<'tcx>], @@ -853,7 +853,7 @@ impl<'tcx> LateContext<'tcx> { } } - let mut p = AbsolutePathPrinter { tcx: self.tcx, path: vec![] }; + let mut p = LintPathPrinter { tcx: self.tcx, path: vec![] }; p.print_def_path(def_id, &[]).unwrap(); p.path } diff --git a/compiler/rustc_lint/src/non_local_def.rs b/compiler/rustc_lint/src/non_local_def.rs index 2dd3425e66c..dca22b986ff 100644 --- a/compiler/rustc_lint/src/non_local_def.rs +++ b/compiler/rustc_lint/src/non_local_def.rs @@ -5,7 +5,7 @@ use rustc_hir::{Body, HirId, Item, ItemKind, Node, Path, TyKind}; use rustc_middle::ty::TyCtxt; use rustc_session::{declare_lint, impl_lint_pass}; use rustc_span::def_id::{DefId, LOCAL_CRATE}; -use rustc_span::{ExpnKind, MacroKind, Span, kw, sym}; +use rustc_span::{ExpnKind, Span, kw, sym}; use crate::lints::{NonLocalDefinitionsCargoUpdateNote, NonLocalDefinitionsDiag}; use crate::{LateContext, LateLintPass, LintContext, fluent_generated as fluent}; @@ -240,7 +240,7 @@ impl<'tcx> LateLintPass<'tcx> for NonLocalDefinitions { }, ) } - ItemKind::Macro(_, _macro, MacroKind::Bang) + ItemKind::Macro(_, _macro, _kinds) if cx.tcx.has_attr(item.owner_id.def_id, sym::macro_export) => { cx.emit_span_lint( |
