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:
Chris Wong 2017-07-30 21:17:12 +12:00
parent cf403b3f6e
commit 4a733993c8

View file

@ -160,8 +160,8 @@ fn let_lexical_scope() {
#[test]
fn let_type_ascription() {
let s = html! {
@let x: u32 = 42 {
"I have " (x) " cupcakes!"
@let mut x: Box<Iterator<Item=u32>> = Box::new(vec![42].into_iter()) {
"I have " (x.next().unwrap()) " cupcakes!"
}
}.into_string();
assert_eq!(s, "I have 42 cupcakes!");