Skip to content

const_eval interprets comparison-result as integer #25307

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
oli-obk opened this issue May 11, 2015 · 2 comments
Closed

const_eval interprets comparison-result as integer #25307

oli-obk opened this issue May 11, 2015 · 2 comments
Labels
A-syntaxext Area: Syntax extensions

Comments

@oli-obk
Copy link
Contributor

oli-obk commented May 11, 2015

TEST2 is a constant int with the value 1

    const X: i32 = 3;
    const TEST3: bool = X < 5;
    const TEST2: bool = TEST3;

TEST5 is also a constant int with the value 1

    const Y: f64 = 3.14;
    const TEST4: bool = Y < 5.1;
    const TEST5: bool = TEST4;

I don't think one can notice this outside of compiler plugins (I found it in https://github.com/oli-obk/rust-sa/blob/master/src/lib.rs#L26-34)

@oli-obk oli-obk changed the title const_eval interprets comparison-result of integers as integer const_eval interprets comparison-result as integer May 11, 2015
@oli-obk
Copy link
Contributor Author

oli-obk commented May 11, 2015

cc #23897

oli-obk pushed a commit to oli-obk/rust-sa that referenced this issue May 11, 2015
@steveklabnik steveklabnik added the A-syntaxext Area: Syntax extensions label May 13, 2015
@oli-obk
Copy link
Contributor Author

oli-obk commented Jan 18, 2016

has been fixed in #29797

@oli-obk oli-obk closed this as completed Jan 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-syntaxext Area: Syntax extensions
Projects
None yet
Development

No branches or pull requests

2 participants