- 16 Nov, 2018 15 commits
-
-
Federico Mena Quintero authored
-
Alex Crichton authored
This commit moves all tests to being compiled with the 2018 edition, and adds one standlone test which is compiled with the 2015 edition. One `use` statement needed an update but otherwise everything looks like it's good to go for 2018! Closes #35
-
Antoni authored
-
Federico Mena Quintero authored
-
mredlek authored
-
mredlek authored
It creates a new extension-traits with can contain the implementation
-
Federico Mena Quintero authored
-
Federico Mena Quintero authored
-
Alex Crichton authored
* No longer necessary to `extern crate` * Add `<'_>` where idiomatic
-
Alex Crichton authored
I was reading over the gnome-class macro crate recently and I was having a difficult time getting up to speed on the error handling of the crate as it was using a number of patterns I hadn't seen before. I was also wondering how only one `Span` was necessary to create an error when multi-token spans were needed sometimes, which led me in the end to start a refactor here. The first point of refactoring was to ensure that multi-token errors were handled. Although the `syn` crate has a `Spanned` trait it doesn't actually work on stable Rust, so the errors coming out of gnome-class today weren't compatible with being spanned over multiple tokens. I added a convenience API in https://github.com/dtolnay/syn/pull/538 and have started using that here to construct syn `Error` instances. Next I opted to lift similar error handling from the `failure` crate here as well. This was primarily the `bail!` macro as well as the `format_err!` macro, used to quickly return and create errors with formatted messages. Using this macro I was able to replace most of the support traits in `src/errors.rs` with local error handling and/or various other idioms. Afterwards the crate (to me at least) feels much more idiomatic in terms of error handling where `?` is still maximally used, returning an error is easy to do, and there aren't too many traits/methods to discover when learning how to work with errors.
-
Federico Mena Quintero authored
-
Jordan Petridis authored
The library is building against rust 2018 but the test can't compile succesfully against that.
-
Alex Crichton authored
A few changes included in this small refactoring: * The return value is asserted to not be `G_TYPE_INVALID` * Instead of `catch_unwind` a `Drop` implementation is used. * When spinning, use `yield_now` to ensure that not too much work is wasted Closes #39
-
Jordan Petridis authored
Looks like we are hitting a compiler bug so we need to enable `extern_crate_item_prelude`. Should be fixed by the time Rust 2018 is released though. [1] https://github.com/rust-lang/rust/issues/55599
-
Jordan Petridis authored
-
- 15 Nov, 2018 14 commits
-
-
Federico Mena Quintero authored
-
Federico Mena Quintero authored
-
Federico Mena Quintero authored
-
Federico Mena Quintero authored
-
Federico Mena Quintero authored
-
Federico Mena Quintero authored
-
Federico Mena Quintero authored
-
Alex Crichton authored
Be sure to special case `Unit` return types to avoid generating these unnecessary tokens! Closes #41
-
Alex Crichton authored
Closes #43
-
Federico Mena Quintero authored
-
Federico Mena Quintero authored
-
Federico Mena Quintero authored
Fixes federico/gnome-class#36
-
Federico Mena Quintero authored
-
Federico Mena Quintero authored
The syntax is impl MyClass { reserve_slots(10) } Fixes federico/gnome-class#4
-
- 11 Nov, 2018 1 commit
-
-
Federico Mena Quintero authored
-
- 10 Nov, 2018 1 commit
-
-
Elias Aebi authored
-
- 09 Nov, 2018 3 commits
-
-
Federico Mena Quintero authored
It works, but if we just do class Foo { } impl Foo { virtual fn blah(&self, ...) {} } class Bar: Foo { } // i.e. with no "impl Foo for Bar" then this won't work: let bar = Bar::new(); bar.blah(); // no method named `blah` found for type `Bar` in the current scope We in fact have to specify impl Foo for Bar {} Will fix this later.
-
Federico Mena Quintero authored
It works!!!!
-
Federico Mena Quintero authored
-
- 08 Nov, 2018 2 commits
- 01 Nov, 2018 1 commit
-
-
mredlek authored
-
- 31 Oct, 2018 1 commit
-
-
mredlek authored
-
- 30 Oct, 2018 1 commit
-
-
mredlek authored
-
- 29 Oct, 2018 1 commit
-
-
mredlek authored
-