mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Add type params to FnSignature
This commit is contained in:
parent
67e40e431a
commit
aa06893a14
9 changed files with 106 additions and 136 deletions
|
@ -388,6 +388,7 @@ pub use crate::code_model_impl::function::ScopeEntryWithSyntax;
|
|||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct FnSignature {
|
||||
pub(crate) name: Name,
|
||||
pub(crate) type_params: Arc<GenericParams>,
|
||||
pub(crate) args: Vec<TypeRef>,
|
||||
pub(crate) ret_type: TypeRef,
|
||||
/// True if the first param is `self`. This is relevant to decide whether this
|
||||
|
@ -413,6 +414,10 @@ impl FnSignature {
|
|||
pub fn has_self_param(&self) -> bool {
|
||||
self.has_self_param
|
||||
}
|
||||
|
||||
pub fn generics(&self) -> &GenericParams {
|
||||
&self.type_params
|
||||
}
|
||||
}
|
||||
|
||||
impl Function {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue