mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
implement len and is_empty method in generic_params
This commit is contained in:
parent
a8b7acf22f
commit
69c4ac6304
5 changed files with 15 additions and 9 deletions
|
@ -1418,8 +1418,7 @@ impl Adt {
|
|||
}
|
||||
|
||||
pub fn layout(self, db: &dyn HirDatabase) -> Result<Layout, LayoutError> {
|
||||
let generic_params = &db.generic_params(self.into());
|
||||
if generic_params.iter().next().is_some() || generic_params.iter_lt().next().is_some() {
|
||||
if !db.generic_params(self.into()).is_empty() {
|
||||
return Err(LayoutError::HasPlaceholder);
|
||||
}
|
||||
let krate = self.krate(db).id;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue