-
Notifications
You must be signed in to change notification settings - Fork 14k
Closed
Description
Code: static val: Vec<u64> = vec!(1, 2, 3);
Errors:
<std macros>:4:25: 4:47 error: static items are not allowed to have destructors
<std macros>:4 let mut _temp = ::std::vec::Vec::new();
^~~~~~~~~~~~~~~~~~~~~~
<std macros>:1:1: 9:2 note: in expansion of vec!
euler/primes.rs:1:26: 1:40 note: expansion site
<std macros>:5:11: 5:16 error: static items are not allowed to have destructors
<std macros>:5 $(_temp.push($e);)*
^~~~~
<std macros>:1:1: 9:2 note: in expansion of vec!
euler/primes.rs:1:26: 1:40 note: expansion site
<std macros>:5:11: 5:16 error: static items are not allowed to have destructors
<std macros>:5 $(_temp.push($e);)*
^~~~~
<std macros>:1:1: 9:2 note: in expansion of vec!
euler/primes.rs:1:26: 1:40 note: expansion site
<std macros>:5:11: 5:16 error: static items are not allowed to have destructors
<std macros>:5 $(_temp.push($e);)*
^~~~~
<std macros>:1:1: 9:2 note: in expansion of vec!
euler/primes.rs:1:26: 1:40 note: expansion site
<std macros>:6:9: 6:14 error: static items are not allowed to have destructors
<std macros>:6 _temp
^~~~~
<std macros>:1:1: 9:2 note: in expansion of vec!
euler/primes.rs:1:26: 1:40 note: expansion site
error: aborting due to 5 previous errors
Metadata
Metadata
Assignees
Labels
No labels