Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsafe method calls permitted incorrectly #6331

Closed
nikomatsakis opened this issue May 8, 2013 · 2 comments
Closed

Unsafe method calls permitted incorrectly #6331

nikomatsakis opened this issue May 8, 2013 · 2 comments

Comments

@nikomatsakis
Copy link
Contributor

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

@nikomatsakis
Copy link
Contributor Author

ICE may be related to #5062

@nikomatsakis
Copy link
Contributor Author

Dup of #3080, I guess.

flip1995 pushed a commit to flip1995/rust that referenced this issue Dec 6, 2020
Disable unnecessary_cast for cfg-dependant types

changelog: Disable unnecessary_cast for cfg-dependant types

Fix  rust-lang#6331
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant