-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
57: Emit full paths for `Option` and `Result` r=cuviper a=cuviper This drops any assumption about having `Option` and `Result` through the normal prelude. This also fixes #51 hygiene, as weird local types by the same name won't affect the derived code. Co-authored-by: Josh Stone <cuviper@gmail.com>
- Loading branch information
Showing
2 changed files
with
50 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#![no_implicit_prelude] | ||
|
||
use ::num_derive::*; | ||
|
||
#[derive(FromPrimitive, ToPrimitive)] | ||
enum Color { | ||
Red, | ||
Blue, | ||
Green, | ||
} | ||
|
||
#[derive(FromPrimitive, ToPrimitive, NumCast, PartialEq, Zero, One, NumOps, Num)] | ||
struct NewI32(i32); |