fehler
fehler copied to clipboard
Rust doesn't have exceptions
The `todo!()` macro produces an unreachable expression warning: ```rust #[throws(Error)] fn foo() { todo!() } ``` ```rust warning: unreachable expression --> rocket_lang/src/main.rs:4:1 | 4 | #[throws(Error)] | ^^^^^^^^^^^^^^^^ unreachable expression...
Hi. Thanks again for this excellent package. To reproduce: ``` #[allow(unused_imports)] use fehler::throws; fn parse_args(_f: &dyn Fn(&mut ())) { } #[throws(std::io::Error)] fn main() { #[derive(Default,Debug)] struct Args { } let...
Hi! Many projects turn warnings into errors, which can make using the latest fehler release (necessary if you want to publish on crates.io) a bit unergonomic, as seen in #53,...
Would be nice to have actually good documentation here
```rust #![feature(stmt_expr_attributes, proc_macro_hygiene)] type Error = usize; fn main() { let x = #[fehler::throws] || 5; dbg!(x()); } ``` I expected this to work and print `Ok(5)`, with an expansion...
I've used fehler on a few small projects and like it very much. (Thank you!) I'm considering using it for a larger project, but I'm worried that having the `#[throws]`...
Another oddity I'm afraid. This: ``` use fehler::throws; #[throws(std::io::Error)] // ERROR: Wrapper type must be a normal path type pub fn zonk() { let mut _unused : Box = Box::new(||());...
Adds support for a propane integration, which will make a propane generator Ok-wrapping. see withoutboats/propane#9
Code: ``` use fehler::throws; trait FooTrait {} struct FooStruct; struct FooError; impl FooTrait for FooStruct {} #[throws(FooError)] fn foo() -> Box { Box::new(FooStruct) } ``` Compile result: ``` Error[E0271]: type...
I am just adding a test case for issue #55 and this confirms it is still failing on the master branch.