-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Description
As the title says, the parenthesised part sometimes prints backwards. At least, I've found one case where it does - when one of the operands is a reference provided by an iterator:
Test code:
fn main() {
let i: [int, ..5] = [0, ..5];
let n = &i[0];
// Error prints correctly
1 + n;
// Error prints backwards
for v in i.iter() {
1 + v;
}
}
Result:
test.rs:8:6: 8:7 error: mismatched types: expected `<generic integer #3>`
but found `&int` (expected integral variable but found &-ptr)
test.rs:8 1 + n;
^
test.rs:12:7: 12:8 error: mismatched types: expected `<generic integer #4>`
but found `&int` (expected &-ptr but found integral variable)
test.rs:12 1 + v;
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.