Add a better diagnostic when attrib locations overlap

This commit is contained in:
Pierre Krieger 2016-06-06 09:25:17 +02:00
parent 164389d6c4
commit 3d4bd4767a

View File

@ -139,8 +139,9 @@ fn write_interface_struct(struct_name: &str, attributes: &[(u32, String, (String
if loc == loc2 || (loc < loc2 && loc + loc_len as u32 > loc2) ||
(loc2 < loc && loc2 + loc_len2 as u32 > loc)
{
panic!("The locations of attributes `{}` and `{}` overlap",
name, name2);
panic!("The locations of attributes `{}` (start={}, size={}) \
and `{}` (start={}, size={}) overlap",
name, loc, loc_len, name2, loc2, loc_len2);
}
}
}