about summary refs log tree commit diff
path: root/compiler/rustc_ast/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-07-07 02:03:03 +0000
committerbors <bors@rust-lang.org>2025-07-07 02:03:03 +0000
commit0d11be5aabe0cd49609fff5fce57c4691a22fe55 (patch)
tree03e3b9aa605a15baee097a7d6566bf955f6aabd5 /compiler/rustc_ast/src
parentca98d4d4b3114116203699c2734805547df86f9a (diff)
parent2992997f6fd0dc188c73b4df52ddf8c626b0d5a6 (diff)
downloadrust-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_ast/src')
-rw-r--r--compiler/rustc_ast/src/ast.rs6
-rw-r--r--compiler/rustc_ast/src/util/classify.rs2
-rw-r--r--compiler/rustc_ast/src/visit.rs4
3 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_ast/src/ast.rs b/compiler/rustc_ast/src/ast.rs
index 491a9bbda79..3c576316f62 100644
--- a/compiler/rustc_ast/src/ast.rs
+++ b/compiler/rustc_ast/src/ast.rs
@@ -2422,7 +2422,7 @@ impl Ty {
 }
 
 #[derive(Clone, Encodable, Decodable, Debug)]
-pub struct BareFnTy {
+pub struct FnPtrTy {
     pub safety: Safety,
     pub ext: Extern,
     pub generic_params: ThinVec<GenericParam>,
@@ -2455,8 +2455,8 @@ pub enum TyKind {
     ///
     /// Desugars into `Pin<&'a T>` or `Pin<&'a mut T>`.
     PinnedRef(Option<Lifetime>, MutTy),
-    /// A bare function (e.g., `fn(usize) -> bool`).
-    BareFn(P<BareFnTy>),
+    /// A function pointer type (e.g., `fn(usize) -> bool`).
+    FnPtr(P<FnPtrTy>),
     /// An unsafe existential lifetime binder (e.g., `unsafe<'a> &'a ()`).
     UnsafeBinder(P<UnsafeBinderTy>),
     /// The never type (`!`).
diff --git a/compiler/rustc_ast/src/util/classify.rs b/compiler/rustc_ast/src/util/classify.rs
index 989ebe14bf8..f7daec4b064 100644
--- a/compiler/rustc_ast/src/util/classify.rs
+++ b/compiler/rustc_ast/src/util/classify.rs
@@ -265,7 +265,7 @@ fn type_trailing_braced_mac_call(mut ty: &ast::Ty) -> Option<&ast::MacCall> {
                 ty = &binder.inner_ty;
             }
 
-            ast::TyKind::BareFn(fn_ty) => match &fn_ty.decl.output {
+            ast::TyKind::FnPtr(fn_ty) => match &fn_ty.decl.output {
                 ast::FnRetTy::Default(_) => break None,
                 ast::FnRetTy::Ty(ret) => ty = ret,
             },
diff --git a/compiler/rustc_ast/src/visit.rs b/compiler/rustc_ast/src/visit.rs
index f8ecff69a76..37fcc0d2167 100644
--- a/compiler/rustc_ast/src/visit.rs
+++ b/compiler/rustc_ast/src/visit.rs
@@ -1059,8 +1059,8 @@ macro_rules! common_visitor_and_walkers {
                 TyKind::Tup(tuple_element_types) => {
                     walk_list!(vis, visit_ty, tuple_element_types);
                 }
-                TyKind::BareFn(function_declaration) => {
-                    let BareFnTy { safety, ext: _, generic_params, decl, decl_span } =
+                TyKind::FnPtr(function_declaration) => {
+                    let FnPtrTy { safety, ext: _, generic_params, decl, decl_span } =
                         &$($mut)? **function_declaration;
                     try_visit!(visit_safety(vis, safety));
                     try_visit!(visit_generic_params(vis, generic_params));