Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround silent ignores of cargo features #25

Merged
merged 1 commit into from
Jul 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,23 @@ rust:
- beta
- nightly
env:
- CARGO_FEATURES=""
- CARGO_FEATURES="codespan"
- CARGO_FEATURES="default"
- CARGO_FEATURES="default codespan"
- MONIKER_CARGO_FEATURES=""
- MONIKER_CARGO_FEATURES="codespan"
- MONIKER_CARGO_FEATURES="default"
- MONIKER_CARGO_FEATURES="default codespan"
matrix:
allow_failures:
- rust: nightly
script:
- cargo build --no-default-features --features "$CARGO_FEATURES" --verbose
- cargo test --no-default-features --features "$CARGO_FEATURES" --verbose
- bash -c 'if [[ $CARGO_FEATURES = *"default"* ]]; then
cargo test --no-default-features --features "$CARGO_FEATURES" --examples --verbose;
fi'
# moniker-derive
- cargo build --manifest-path=moniker-derive/Cargo.toml --verbose
- cargo test --manifest-path=moniker-derive/Cargo.toml --verbose
# moniker
- cargo build --manifest-path=moniker/Cargo.toml --no-default-features --features="$MONIKER_CARGO_FEATURES" --verbose
- cargo test --manifest-path=moniker/Cargo.toml --no-default-features --features="$MONIKER_CARGO_FEATURES" --verbose
# moniker examples
- cargo build --manifest-path=moniker/Cargo.toml --no-default-features --features="$MONIKER_CARGO_FEATURES" --verbose --examples
- cargo test --manifest-path=moniker/Cargo.toml --no-default-features --features="$MONIKER_CARGO_FEATURES" --verbose --examples
notifications:
webhooks:
urls:
Expand Down
28 changes: 28 additions & 0 deletions moniker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,31 @@ codespan = { version = "0.1.2", optional = true }

[dev-dependencies]
im = "10.2"

[[example]]
name = "lc"
required-features = ["moniker-derive"]

[[example]]
name = "lc_let"
required-features = ["moniker-derive"]

[[example]]
name = "lc_letrec"
required-features = ["moniker-derive"]

[[example]]
name = "lc_multi"
required-features = ["moniker-derive"]

[[example]]
name = "stlc"
required-features = ["moniker-derive"]

[[example]]
name = "stlc_data"
required-features = ["moniker-derive"]

[[example]]
name = "stlc_data_isorec"
required-features = ["moniker-derive"]
10 changes: 5 additions & 5 deletions moniker/src/bound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ impl_bound_term_partial_eq!(f64);
macro_rules! impl_bound_term_ignore {
($T:ty) => {
impl<Ident> BoundTerm<Ident> for $T {
fn term_eq(&self, other: &$T) -> bool {
fn term_eq(&self, _: &$T) -> bool {
true
}

Expand Down Expand Up @@ -227,7 +227,7 @@ impl_bound_term_ignore!(LineOffset);

#[cfg(feature = "codespan")]
impl<Ident, T> BoundTerm<Ident> for Span<T> {
fn term_eq(&self, other: &Span<T>) -> bool {
fn term_eq(&self, _: &Span<T>) -> bool {
true
}

Expand Down Expand Up @@ -645,7 +645,7 @@ impl_bound_pattern_partial_eq!(f64);
macro_rules! impl_bound_pattern_ignore {
($T:ty) => {
impl<Ident> BoundPattern<Ident> for $T {
fn pattern_eq(&self, other: &$T) -> bool {
fn pattern_eq(&self, _: &$T) -> bool {
true
}

Expand Down Expand Up @@ -688,8 +688,8 @@ impl_bound_pattern_ignore!(LineNumber);
impl_bound_pattern_ignore!(LineOffset);

#[cfg(feature = "codespan")]
impl<Ident, T> BoundTerm<Ident> for Span<T> {
fn pattern_eq(&self, other: &Span<T>) -> bool {
impl<Ident, T> BoundPattern<Ident> for Span<T> {
fn pattern_eq(&self, _: &Span<T>) -> bool {
true
}

Expand Down