diff options
| author | Jubilee Young <workingjubilee@gmail.com> | 2025-07-06 12:59:42 -0700 |
|---|---|---|
| committer | Jubilee Young <workingjubilee@gmail.com> | 2025-07-06 15:03:08 -0700 |
| commit | 0a4f87a144616f35da510b82acc288aceebd5b9b (patch) | |
| tree | 9bd9dce4ec6515eb5b9097d529c7bcbc4001b4fa /compiler/rustc_ast/src/ast.rs | |
| parent | 3c95364c4afc3f15749f5a511d599af086f5456e (diff) | |
| download | rust-0a4f87a144616f35da510b82acc288aceebd5b9b.tar.gz rust-0a4f87a144616f35da510b82acc288aceebd5b9b.zip | |
compiler: rename {ast,hir}::BareFn* to FnPtr*
Fix some comments and related types and locals where it is obvious, e.g. - bare_fn -> fn_ptr - LifetimeBinderKind::BareFnType -> LifetimeBinderKind::FnPtrType Co-authored-by: León Orell Valerian Liehr <me@fmease.dev>
Diffstat (limited to 'compiler/rustc_ast/src/ast.rs')
| -rw-r--r-- | compiler/rustc_ast/src/ast.rs | 6 |
1 files changed, 3 insertions, 3 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 (`!`). |
