]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/unused/issue-90807-unused-paren-error.rs
Rollup merge of #106670 - albertlarsan68:check-docs-in-pr-ci, r=Mark-Simulacrum
[rust.git] / tests / ui / lint / unused / issue-90807-unused-paren-error.rs
1 // Make sure unused parens lint emit is emitted for loop and match.
2 // See https://github.com/rust-lang/rust/issues/90807
3 // and https://github.com/rust-lang/rust/pull/91956#discussion_r771647953
4 #![deny(unused_parens)]
5
6 fn main() {
7     for _ in (1..loop { break 2 }) {} //~ERROR
8     for _ in (1..match () { () => 2 }) {} //~ERROR
9 }