Closed
Description
Crater picked up this issue in a number of crates:
- https://crater-reports.s3.amazonaws.com/beta-1.60-1/beta-2022-02-22/gh/zetok.tox/log.txt
- https://crater-reports.s3.amazonaws.com/beta-1.60-1/beta-2022-02-22/gh/yytian.bignum/log.txt
[INFO] [stdout]
[INFO] [stdout] error: the `#[test]` attribute may only be used on a non-associated function
[INFO] [stdout] --> src/toxcore/dht_node.rs:947:5
[INFO] [stdout] |
[INFO] [stdout] 947 | #[test]
[INFO] [stdout] | ^^^^^^^
[INFO] [stdout] 948 | / quickcheck! {
[INFO] [stdout] 949 | | fn dht_node_send_nodes(pns: Vec<PackedNode>) -> TestResult {
[INFO] [stdout] 950 | | if pns.is_empty() { return TestResult::discard() }
[INFO] [stdout] 951 | |
[INFO] [stdout] ... |
[INFO] [stdout] 984 | | }
[INFO] [stdout] 985 | | }
[INFO] [stdout] | |_____- expected a non-associated function, found an item macro invocation
[INFO] [stdout] |
[INFO] [stdout] = note: the `#[test]` macro causes a a function to be run on a test and has no effect on non-functions
[INFO] [stdout] help: replace with conditional compilation to make the item only exist when tests are being run
[INFO] [stdout] |
[INFO] [stdout] 947 | #[cfg(test)]
[INFO] [stdout] |