Skip to content

test: add ()=()=()=... to weird-exprs.rs #78948

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

Merged
merged 2 commits into from
Nov 15, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/test/ui/weird-exprs.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// run-pass

#![feature(generators)]
#![feature(destructuring_assignment)]

#![allow(non_camel_case_types)]
#![allow(dead_code)]
Expand Down Expand Up @@ -159,6 +160,11 @@ fn match_nested_if() {
assert!(val);
}

fn empty_tuple_assignment() {
Copy link
Member

@jyn514 jyn514 Nov 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should match the naming convention of the file it's in ;)

Suggested change
fn empty_tuple_assignment() {
fn monkey_barrel() {

image

let val = ()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=();
assert_eq!(val, ());
}

pub fn main() {
strange();
funny();
Expand All @@ -177,4 +183,5 @@ pub fn main() {
r#match();
i_yield();
match_nested_if();
empty_tuple_assignment();
}