Add an ARTIQ-specific cargo feature "rust-1.28".

This cargo feature only exists because (a) ARTIQ uses a fork of Rust,
(b) Rust has some ridiculous renaming going on in the alloc crate,
(c) smoltcp exists because of ARTIQ.

Such features will not be ordinarily provided by smoltcp.
v0.7.x
whitequark 2018-08-10 14:53:28 +00:00
parent a8f2725784
commit 2b7a25b1e2
2 changed files with 6 additions and 1 deletions

View File

@ -48,6 +48,9 @@ default = [
"socket-raw", "socket-icmp", "socket-udp", "socket-tcp"
]
# experimental; do not use; no guarantees provided that this feature will be kept
"rust-1.28" = []
[[example]]
name = "packet2pcap"
path = "utils/packet2pcap.rs"

View File

@ -4,8 +4,10 @@ use std::vec::Vec;
use std::collections::VecDeque;
#[cfg(feature = "alloc")]
use alloc::vec::Vec;
#[cfg(feature = "alloc")]
#[cfg(all(feature = "alloc", not(feature = "rust-1.28")))]
use alloc::collections::VecDeque;
#[cfg(all(feature = "alloc", feature = "rust-1.28"))]
use alloc::VecDeque;
use Result;
use phy::{self, Device, DeviceCapabilities};