Skip to content

Confusing error when using do instead of for #2817

Closed
@brson

Description

@brson

Range should have been called with for

./uuid.rs:90:41: 99:9 error: mismatched types: expected `bool` but found `()` (bool vs ())
./uuid.rs:90         do uint::range(0u, 100000u) |_i| {
./uuid.rs:91             let uuid = uuid();
./uuid.rs:92             assert uuid == from_str(to_str(uuid));
./uuid.rs:93
./uuid.rs:94             let uuid = uuid_random();
./uuid.rs:95             assert uuid == from_str(to_str(uuid));

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-type-systemArea: Type systemE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions