Make let expression type ascription test a bit more elaborate
An overly strict parser would choke on the `=` in `Iterator<Item=u32>`, so this case is worth keeping as a regression test.
This commit is contained in:
parent
cf403b3f6e
commit
4a733993c8
1 changed files with 2 additions and 2 deletions
|
@ -160,8 +160,8 @@ fn let_lexical_scope() {
|
||||||
#[test]
|
#[test]
|
||||||
fn let_type_ascription() {
|
fn let_type_ascription() {
|
||||||
let s = html! {
|
let s = html! {
|
||||||
@let x: u32 = 42 {
|
@let mut x: Box<Iterator<Item=u32>> = Box::new(vec![42].into_iter()) {
|
||||||
"I have " (x) " cupcakes!"
|
"I have " (x.next().unwrap()) " cupcakes!"
|
||||||
}
|
}
|
||||||
}.into_string();
|
}.into_string();
|
||||||
assert_eq!(s, "I have 42 cupcakes!");
|
assert_eq!(s, "I have 42 cupcakes!");
|
||||||
|
|
Loading…
Add table
Reference in a new issue