]> git.lizzy.rs Git - rust.git/blob - tests/ui/mismatched_types/recovered-block.rs
Rollup merge of #107700 - jyn514:tools-builder, r=Mark-Simulacrum
[rust.git] / tests / ui / mismatched_types / recovered-block.rs
1 use std::env;
2
3 pub struct Foo {
4     text: String
5 }
6
7 pub fn foo() -> Foo {
8     let args: Vec<String> = env::args().collect();
9     let text = args[1].clone();
10
11     pub Foo { text }
12 }
13 //~^^ ERROR missing `struct` for struct definition
14
15 pub fn bar() -> Foo {
16     fn
17     Foo { text: "".to_string() }
18 }
19 //~^^ ERROR expected one of `(` or `<`, found `{`
20
21 fn main() {}