Add a test for #2907

This commit is contained in:
Seiichi Uchida 2018-08-31 18:10:47 +09:00
parent d88139893f
commit 1b8f0ff1b6
2 changed files with 48 additions and 0 deletions

View File

@ -93,3 +93,29 @@ impl Foo {
.map(|(k, deps)| (k.clone(), deps.iter().cloned().filter(|d| dirties.contains(&d)).collect()))
}
}
// #2907
fn foo() {
let x = foo
.bar?? ? // comment
.baz;
let x = foo
.bar? ??
// comment
.baz;
let x = foo
.bar? ? ? // comment
// comment
.baz;
let x = foo
.bar? ?? // comment
// comment
? ??
// comment
? ??
// comment
???
// comment
? ? ?
.baz;
}

View File

@ -116,3 +116,25 @@ impl Foo {
})
}
}
// #2907
fn foo() {
let x = foo
.bar??? // comment
.baz;
let x = foo
.bar???
// comment
.baz;
let x = foo
.bar??? // comment
// comment
.baz;
let x = foo
.bar??????????????? // comment
// comment
// comment
// comment
// comment
.baz;
}