Debian Codegraph @

tests/compile-fail/length_expr_parentheses.rs

raw symbols SCIP
1 // Copyright (c) 2015 Robert Clipsham <[email protected]>
2 //
3 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
6 // option. This file may not be copied, modified, or distributed
7 // except according to those terms.
8
9 // error-pattern: error: this file contains an unclosed delimiter
10
11 extern crate pnet_macros;
12 extern crate pnet_macros_support;
13 use pnet_macros::packet;
14
15 #[packet]
16 pub struct PacketWithPayload {
17 banana: u8,
18 #[length = "banana * (7 + 3"]
19 var_length: Vec<u8>,
20 #[payload]
21 payload: Vec<u8>,
22 }
23
24 fn main() {}