New CI test.

This commit is contained in:
Stephen Chung 2020-11-28 16:58:02 +08:00
parent 36546c7325
commit b098160262
2 changed files with 4 additions and 2 deletions

View File

@ -32,6 +32,7 @@ jobs:
- "--features no_module"
- "--features no_closure"
- "--features unicode-xid-ident"
- "--features sync,only_i32,no_function,no_float,no_optimize,no_module,no_closure,serde,unchecked"
toolchain: [stable]
experimental: [false]
include:

View File

@ -33,18 +33,19 @@ pub enum OptimizationLevel {
impl OptimizationLevel {
/// Is the `OptimizationLevel` [`None`][OptimizationLevel::None]?
#[allow(dead_code)]
#[inline(always)]
pub fn is_none(self) -> bool {
self == Self::None
}
/// Is the `OptimizationLevel` [`Simple`][OptimizationLevel::Simple]?
#[cfg(not(feature = "no_optimize"))]
#[allow(dead_code)]
#[inline(always)]
pub fn is_simple(self) -> bool {
self == Self::Simple
}
/// Is the `OptimizationLevel` [`Full`][OptimizationLevel::Full]?
#[cfg(not(feature = "no_optimize"))]
#[allow(dead_code)]
#[inline(always)]
pub fn is_full(self) -> bool {
self == Self::Full