Skip to content

Possibly change the ordering of integer-literal inference and method selection. #4704

Closed
@sanxiyn

Description

@sanxiyn
fn sub(i: int) { for i.times {} }
fn main() {}
test.rs:1:17: 1:31 error: type `int` does not implement any method in scope named `times`
test.rs:1 fn sub(i: int) { for i.times {} }
                           ^~~~~~~~~~~~~~
error: aborting due to previous error

This works in master(2372d2c) but is broken in incoming(42b462e).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions