Skip to content

Some compile errors within const block of associated constants are not evaluated #71403

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

Closed
DoumanAsh opened this issue Apr 21, 2020 · 1 comment
Labels
C-bug Category: This is a bug.

Comments

@DoumanAsh
Copy link

Basically, if you put potential error into const block of associated constant, it doesn't gets evaluated.
Good example is arithmetic_overflow.
By default it triggers compilation error, but not when it is within const block of associated constant

Rust playgound sample:
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=6ae8ce6871821d8fce58cc05dbdd5984

Doubt it is expected behavior?

Instead, this happened: explanation

Happens in both latest stable and nightly

@DoumanAsh DoumanAsh added the C-bug Category: This is a bug. label Apr 21, 2020
@jonas-schievink
Copy link
Contributor

Duplicate of #71282

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants