Debian Codegraph @

third_party/rust/pin-project-lite/tests/ui/pin_project/unsupported.rs

raw
1 // SPDX-License-Identifier: Apache-2.0 OR MIT
2
3 use pin_project_lite::pin_project;
4
5 pin_project! {
6 struct Struct1 {} //~ ERROR no rules expected the token `}`
7 }
8
9 pin_project! {
10 struct Struct2(); //~ ERROR no rules expected the token `(`
11 }
12
13 pin_project! {
14 struct Struct3; //~ ERROR no rules expected the token `;`
15 }
16
17 pin_project! {
18 enum Enum { //~ ERROR no rules expected the token `enum`
19 A(u8)
20 }
21 }
22
23 pin_project! {
24 union Union { //~ ERROR no rules expected the token `union`
25 x: u8,
26 }
27 }
28
29 fn main() {}