Skip to content

Commit

Permalink
Merge pull request #432 from shepmaster/undo
Browse files Browse the repository at this point in the history
Revert "Allow yeeting context selectors to generate errors"
  • Loading branch information
shepmaster committed Dec 27, 2023
2 parents c1faaa8 + 7b8e6a8 commit 3fcc81a
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 50 deletions.
4 changes: 0 additions & 4 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,6 @@ nightly_test_task:
- cd compatibility-tests/backtrace-provider-api/
- rustc --version
- cargo test
yeet_selectors_test_script:
- cd compatibility-tests/yeet-selectors/
- rustc --version
- cargo test
before_cache_script: rm -rf $CARGO_HOME/registry/index

# Our Minimal Supported Rust Version (MSRV)
Expand Down
9 changes: 0 additions & 9 deletions compatibility-tests/yeet-selectors/Cargo.toml

This file was deleted.

1 change: 0 additions & 1 deletion compatibility-tests/yeet-selectors/rust-toolchain

This file was deleted.

20 changes: 0 additions & 20 deletions compatibility-tests/yeet-selectors/src/lib.rs

This file was deleted.

10 changes: 0 additions & 10 deletions snafu-derive/src/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,16 +294,6 @@ pub mod context_selector {
::core::result::Result::Err(self.build())
}
}

impl<#(#original_generics_without_defaults,)* #(#user_field_generics,)*> ::core::convert::From<#parameterized_selector_name> for #parameterized_error_name
where
#(#extended_where_clauses),*
{
#[track_caller]
fn from(other: #parameterized_selector_name) -> Self {
other.build()
}
}
}
}

Expand Down
6 changes: 0 additions & 6 deletions tests/build-leaf-error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,3 @@ fn implements_error() {

map_result().unwrap_err();
}

#[test]
fn build_via_from_and_into() {
let _e = Error::from(MineSnafu);
let _e: Error = MineSnafu.into();
}

0 comments on commit 3fcc81a

Please sign in to comment.