rust/tests/ui/parser/brace-in-let-chain.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

59 lines
819 B
Rust
Raw Normal View History

2023-11-09 20:46:45 -06:00
// issue #117766
#![feature(let_chains)]
fn main() {
if let () = ()
&& let () = () { //~ERROR: found a `{` in the middle of a let-chain
&& let () = ()
{
}
}
2023-11-10 14:13:53 -06:00
fn quux() {
while let () = ()
&& let () = () { //~ERROR: found a `{` in the middle of a let-chain
&& let () = ()
{
}
}
fn foobar() {
while false {}
{
&& let () = ()
}
fn fubar() {
while false {
{
&& let () = ()
}
}
2023-11-09 22:04:55 -06:00
fn qux() {
let foo = false;
match foo {
_ if foo => {
&& let () = ()
_ => {}
}
}
2023-11-09 20:46:45 -06:00
fn foo() {
{
&& let () = ()
}
fn bar() {
if false {}
{
&& let () = ()
}
fn baz() {
if false {
{
&& let () = ()
}
} //~ERROR: this file contains an unclosed delimiter