Skip to content

Fix run-pass/coerce-reborrow-imm-vec-arg.rs #7304

Closed
@emberian

Description

@emberian

I get

 rustc coerce-reborrow-imm-vec-arg.rs
coerce-reborrow-imm-vec-arg.rs:18:8: 18:9 error: cannot borrow const vec content as immutable
coerce-reborrow-imm-vec-arg.rs:18     sum(y)
                                          ^
coerce-reborrow-imm-vec-arg.rs:18:8: 18:9 error: unsafe borrow of aliasable, const value
coerce-reborrow-imm-vec-arg.rs:18     sum(y)
                                          ^
error: aborting due to 2 previous errors

Which I think is correct behavior. @nikomatsakis?

The test otherwise runs fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions