2023-12-02 23:46:45 +08:00
|
|
|
fn bar() -> String {
|
|
|
|
|
#[cfg]
|
|
|
|
|
[1, 2, 3].iter() //~ ERROR expected `;`, found `#`
|
|
|
|
|
#[feature]
|
|
|
|
|
attr::fn bar() -> String { //~ ERROR expected identifier, found keyword `fn`
|
2024-04-20 15:52:22 +02:00
|
|
|
//~^ ERROR expected one of `(`, `.`, `::`, `;`, `?`, `}`, or an operator, found `{`
|
2023-12-02 23:46:45 +08:00
|
|
|
//~| ERROR expected `;`, found `bar`
|
2024-04-20 15:52:22 +02:00
|
|
|
//~| ERROR `->` used for field access or method call
|
2023-12-02 23:46:45 +08:00
|
|
|
#[attr]
|
|
|
|
|
[1, 2, 3].iter().map().collect::<String>()
|
|
|
|
|
#[attr]
|
|
|
|
|
|
|
|
|
|
}()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() { }
|