softprops / dynomite

โšก๐Ÿฆ€ ๐Ÿงจ make your rust types fit DynamoDB and visa versa
https://docs.rs/dynomite/
MIT License
220 stars 53 forks source link

`Item` conflicts with custom `Result` in the same scope #125

Closed stanislav-tkach closed 4 years ago

stanislav-tkach commented 4 years ago

๐Ÿ› Bug description

The following code gives the "unexpected type argument" error:

use dynomite::Item;

type Result = result::Result<u8, u8>;

#[derive(Item)]
pub struct S {
    #[dynomite(partition_key)]
    s: String,
}

๐Ÿค” Expected Behavior

I expect this code to compile.

๐Ÿ‘Ÿ Steps to reproduce

To reproduce try to compile the code above.

10 | #[derive(Item)]
   |          ^^^^
   |          |
   |          unexpected type argument
   |          unexpected type argument

๐ŸŒ Your environment

dynomite version: 0.9.0

rustc version: rustc 1.45.2 (d3fb005a3 2020-07-31)