We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
not<true>(); should actually be written as not::<true>();, i.e. a turbofish operator. It seems though that this survives the parsing phase.
not<true>();
not::<true>();
I tried this code:
fn not<const A: bool>() { let _ = if A { "A" } else { "B" } ; } fn main() { not<true>(); }
No response
TRS-E14 cgen $ gccrs main.rs main.rs:2:16: error: Cannot find path ‘A’ in this scope [E0433] 2 | let _ = if A | ^
TRS-E14 cgen :( $ rustc main.rs error: comparison operators cannot be chained --> main.rs:10:8 | 10 | not<true>(); | ^ ^ |
b87fd67
The text was updated successfully, but these errors were encountered:
I've reduced the testcase to this, which only errors with rustc
rustc
#[cfg(foo)] fn foo() { not<true>(); } fn main() {}
It does look like rustc has a parse-time check for chained comparisons, while we only catch it incidentally at typechecking
Sorry, something went wrong.
No branches or pull requests
Summary
not<true>();
should actually be written asnot::<true>();
, i.e. a turbofish operator. It seems though that this survives the parsing phase.Reproducer
I tried this code:
Does the code make use of any (1.49) nightly feature ?
Godbolt link
No response
Actual behavior
Expected behavior
GCC Version
b87fd67
The text was updated successfully, but these errors were encountered: