mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-02 12:59:12 +00:00
Properly handle lifetimes when checking generic arguments len
And also, prepare for correct lowering of lifetime. We still don't handle most lifetimes correctly, but a bit more of the foundation to lifetime elision is now implemented.
This commit is contained in:
parent
3d00e247dd
commit
adcf699ea3
16 changed files with 858 additions and 226 deletions
|
|
@ -106,6 +106,14 @@ pub struct FnType {
|
|||
pub abi: Option<Symbol>,
|
||||
}
|
||||
|
||||
impl FnType {
|
||||
#[inline]
|
||||
pub fn split_params_and_ret(&self) -> (&[(Option<Name>, TypeRefId)], TypeRefId) {
|
||||
let (ret, params) = self.params.split_last().expect("should have at least return type");
|
||||
(params, ret.1)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, PartialEq, Eq, Hash, Debug)]
|
||||
pub struct ArrayType {
|
||||
pub ty: TypeRefId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue