We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dbf4e19 commit 76c1e04Copy full SHA for 76c1e04
src/librustc/middle/typeck/check/_match.rs
@@ -296,13 +296,13 @@ pub fn check_struct_pat_fields(pcx: &pat_ctxt,
296
// Index the class fields.
297
let mut field_map = HashMap::new();
298
for (i, class_field) in class_fields.iter().enumerate() {
299
- field_map.insert(class_field.ident, i);
+ field_map.insert(class_field.ident.name, i);
300
}
301
302
// Typecheck each field.
303
let mut found_fields = HashSet::new();
304
for field in fields.iter() {
305
- match field_map.find(&field.ident) {
+ match field_map.find(&field.ident.name) {
306
Some(&index) => {
307
let class_field = class_fields[index];
308
let field_type = ty::lookup_field_type(tcx,
0 commit comments