Update to 2017-04-04
This commit is contained in:
parent
0ad4c19f7e
commit
3b2fb2b879
@ -172,3 +172,4 @@
|
||||
-Mapping("aef18be1bc4e03617177c5e9df1164ce3df49ba2","32820c149b4b92aafc5f8d2e48a4265c5d865a1d")
|
||||
-Mapping("c59cb71d976ceabf00c7da0224a795fab530601e","32820c149b4b92aafc5f8d2e48a4265c5d865a1d")
|
||||
-Mapping("3f4408347d2109803edbf53c89c8bce575de4b67","32820c149b4b92aafc5f8d2e48a4265c5d865a1d")
|
||||
-Mapping("5309a3e31d88def1f3ea966162ed4f81f161d500","6edab01499c2af1b04e5914a64f0e66ae50253c3")
|
||||
|
1710
patches/6edab01499c2af1b04e5914a64f0e66ae50253c3.patch
Normal file
1710
patches/6edab01499c2af1b04e5914a64f0e66ae50253c3.patch
Normal file
File diff suppressed because it is too large
Load Diff
26
src/lib.rs
26
src/lib.rs
@ -3,27 +3,43 @@
|
||||
//! the [std documentation](https://doc.rust-lang.org/nightly/std/io/index.html)
|
||||
//! for a full description of the functionality.
|
||||
#![allow(stable_features,unused_features)]
|
||||
#![feature(question_mark,const_fn,collections,alloc,unicode,copy_from_slice,str_char,try_from)]
|
||||
#![feature(question_mark,const_fn,collections,alloc,unicode,copy_from_slice,str_char,try_from,str_internals)]
|
||||
#![no_std]
|
||||
|
||||
#[cfg_attr(feature="collections",macro_use)]
|
||||
#[cfg(feature="collections")] extern crate collections;
|
||||
#[cfg(feature="alloc")] extern crate alloc;
|
||||
extern crate rustc_unicode;
|
||||
extern crate std_unicode;
|
||||
|
||||
#[cfg(not(feature="collections"))]
|
||||
pub type ErrorString = &'static str;
|
||||
|
||||
// Provide Box::new wrapper
|
||||
#[cfg(not(feature="alloc"))]
|
||||
struct FakeBox<T>(core::marker::PhantomData<T>);
|
||||
#[derive(Debug)]
|
||||
#[cfg(not(feature="alloc"))]
|
||||
struct FakeBox<T>(T);
|
||||
impl<T> FakeBox<T> {
|
||||
fn new(val: T) -> T {
|
||||
val
|
||||
fn new(val: T) -> Self {
|
||||
FakeBox(val)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(feature="alloc"))]
|
||||
impl<T> ::core::ops::Deref for FakeBox<T> {
|
||||
type Target = T;
|
||||
fn deref(&self) -> &T {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(feature="alloc"))]
|
||||
impl<T> ::core::ops::DerefMut for FakeBox<T> {
|
||||
fn deref_mut(&mut self) -> &mut T {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
|
||||
// Needed for older compilers, to ignore vec!/format! macros in tests
|
||||
#[cfg(not(feature="collections"))]
|
||||
macro_rules! vec (
|
||||
|
Loading…
Reference in New Issue
Block a user