diff --git a/.travis.yml b/.travis.yml index c366702..c270958 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,11 @@ language: rust -rust: nightly +rust: + - nightly + - beta + - stable script: - - cargo test + - cargo build + - "if [ $TRAVIS_RUST_VERSION = nightly ]; then cargo test; fi" - cargo doc after_success: - curl https://raw.githubusercontent.com/kmcallister/travis-doc-upload/master/travis-doc-upload.sh | sh diff --git a/Cargo.toml b/Cargo.toml index 60c34ec..d54277b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,4 +8,5 @@ repository = "https://github.com/servo/futf" description = "Handling fragments of UTF-8" [dependencies] -mac = "0" +mac = "0.0" +debug_unreachable = "0.0" diff --git a/src/lib.rs b/src/lib.rs index 69433f5..13daba0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,16 +4,18 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(core_intrinsics)] #![cfg_attr(test, feature(test, str_char, slice_bytes))] +#[macro_use] +extern crate debug_unreachable; + #[macro_use] extern crate mac; #[cfg(test)] extern crate test as std_test; -use std::{slice, char, intrinsics}; +use std::{slice, char}; /// Meaning of a complete or partial UTF-8 codepoint. /// @@ -131,7 +133,7 @@ unsafe fn decode(buf: &[u8]) -> Option { | ((*buf.get_unchecked(3) & 0x3F) as u32); if n < 0x1_0000 { return None } // Overlong } - _ => intrinsics::unreachable(), + _ => debug_unreachable!(), } char::from_u32(n).map(Meaning::Whole)