Merge pull request #19363 from euclio/varargs-detail

display varargs in completion detail
This commit is contained in:
Lukas Wirth 2025-03-16 13:43:11 +00:00 committed by GitHub
commit 8b5816b4f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 58 additions and 1 deletions

View file

@ -2363,6 +2363,10 @@ impl Function {
db.function_data(self.id).is_async()
}
pub fn is_varargs(self, db: &dyn HirDatabase) -> bool {
db.function_data(self.id).is_varargs()
}
pub fn extern_block(self, db: &dyn HirDatabase) -> Option<ExternBlock> {
match self.id.lookup(db.upcast()).container {
ItemContainerId::ExternBlockId(id) => Some(ExternBlock { id }),