check uniqueness of nested fields
This commit is contained in:
parent
879a1e5713
commit
36d7e7fd3f
12 changed files with 1842 additions and 97 deletions
|
@ -401,7 +401,7 @@ impl<'tcx> AdtDef<'tcx> {
|
|||
}
|
||||
|
||||
/// Returns an iterator over all fields contained
|
||||
/// by this ADT.
|
||||
/// by this ADT (nested unnamed fields are not expanded).
|
||||
#[inline]
|
||||
pub fn all_fields(self) -> impl Iterator<Item = &'tcx FieldDef> + Clone {
|
||||
self.variants().iter().flat_map(|v| v.fields.iter())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue