diff options
| author | bors <bors@rust-lang.org> | 2025-07-07 02:03:03 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-07-07 02:03:03 +0000 |
| commit | 0d11be5aabe0cd49609fff5fce57c4691a22fe55 (patch) | |
| tree | 03e3b9aa605a15baee097a7d6566bf955f6aabd5 /compiler/rustc_lint | |
| parent | ca98d4d4b3114116203699c2734805547df86f9a (diff) | |
| parent | 2992997f6fd0dc188c73b4df52ddf8c626b0d5a6 (diff) | |
| download | rust-0d11be5aabe0cd49609fff5fce57c4691a22fe55.tar.gz rust-0d11be5aabe0cd49609fff5fce57c4691a22fe55.zip | |
Auto merge of #143556 - jhpratt:rollup-nid39y2, r=jhpratt
Rollup of 9 pull requests Successful merges: - rust-lang/rust#143206 (Align attr fixes) - rust-lang/rust#143236 (Stabilize `mixed_integer_ops_unsigned_sub`) - rust-lang/rust#143344 (Port `#[path]` to the new attribute parsing infrastructure ) - rust-lang/rust#143359 (Link to 2024 edition page for `!` fallback changes) - rust-lang/rust#143456 (mbe: Change `unused_macro_rules` to a `DenseBitSet`) - rust-lang/rust#143529 (Renamed retain_mut to retain on LinkedList as mentioned in the ACP) - rust-lang/rust#143535 (Remove duplicate word) - rust-lang/rust#143544 (compiler: rename BareFn to FnPtr) - rust-lang/rust#143552 (lib: more eagerly return `self.len()` from `ceil_char_boundary`) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_lint')
| -rw-r--r-- | compiler/rustc_lint/src/nonstandard_style.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_lint/src/types.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_lint/src/unused.rs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_lint/src/nonstandard_style.rs b/compiler/rustc_lint/src/nonstandard_style.rs index ad7686b3e5b..bc9badbb232 100644 --- a/compiler/rustc_lint/src/nonstandard_style.rs +++ b/compiler/rustc_lint/src/nonstandard_style.rs @@ -431,7 +431,7 @@ impl<'tcx> LateLintPass<'tcx> for NonSnakeCase { } fn check_ty(&mut self, cx: &LateContext<'_>, ty: &hir::Ty<'_, hir::AmbigArg>) { - if let hir::TyKind::BareFn(hir::BareFnTy { param_idents, .. }) = &ty.kind { + if let hir::TyKind::FnPtr(hir::FnPtrTy { param_idents, .. }) = &ty.kind { for param_ident in *param_idents { if let Some(param_ident) = param_ident { self.check_snake_case(cx, "variable", param_ident); diff --git a/compiler/rustc_lint/src/types.rs b/compiler/rustc_lint/src/types.rs index ea5485d8e5d..e41bc8f852e 100644 --- a/compiler/rustc_lint/src/types.rs +++ b/compiler/rustc_lint/src/types.rs @@ -1577,7 +1577,7 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> { impl<'tcx> hir::intravisit::Visitor<'_> for FnPtrFinder<'tcx> { fn visit_ty(&mut self, ty: &'_ hir::Ty<'_, AmbigArg>) { debug!(?ty); - if let hir::TyKind::BareFn(hir::BareFnTy { abi, .. }) = ty.kind + if let hir::TyKind::FnPtr(hir::FnPtrTy { abi, .. }) = ty.kind && !abi.is_rustic_abi() { self.spans.push(ty.span); diff --git a/compiler/rustc_lint/src/unused.rs b/compiler/rustc_lint/src/unused.rs index 0627f70507c..d3942a1c816 100644 --- a/compiler/rustc_lint/src/unused.rs +++ b/compiler/rustc_lint/src/unused.rs @@ -1312,7 +1312,7 @@ impl EarlyLintPass for UnusedParens { None => true, } } - ast::TyKind::BareFn(b) => { + ast::TyKind::FnPtr(b) => { !self.with_self_ty_parens || b.generic_params.is_empty() } _ => true, |
