Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
51b51b51d7931da85280382a81c4dd80c73ca754
rust/tests/ui/parser/issues/issue-75599.rs

25 lines
317 B
Rust
Raw Normal View History

[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives
2024-02-16 20:02:50 +00:00
//@ check-pass
Don't emit "is not a logical operator" error outside of associative expressions Avoid showing this error where it doesn't make sense by not assuming "and" and "or" were intended to mean "&&" and "||" until after we decide to continue parsing input as an associative expression. Note that the decision of whether or not to continue parsing input as an associative expression doesn't actually depend on this assumption. Fixes #75599
2020-08-17 19:15:51 -07:00
#![allow(non_upper_case_globals)]
const or: usize = 1;
const and: usize = 2;
mod or {
pub const X: usize = 3;
}
mod and {
pub const X: usize = 4;
}
fn main() {
match 0 {
0 => {}
or => {}
and => {}
or::X => {}
and::X => {}
_ => {}
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 3042ms Template: 5ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API