Skip to content

Unsafe method calls permitted incorrectly #6331

Closed
@nikomatsakis

Description

@nikomatsakis

This may be fallout from recent borrow checker changes. Some examples:

Yields an ICE:

[06:53:54] <dbaupp> rusti: unsafe { (~[]).unsafe_get(1) } --> ICE!

Both of these work, one warns that the unsafe block is not needed:

[06:54:28] rusti: unsafe { ([1i,2]).unsafe_get(1) }
[06:55:08] rusti: (
[1i,2]).unsafe_get(1)
[06:55:09] 2

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