Skip to content

facet-assert: type inference #1161

@vron

Description

@vron

Seems as if the type inference for the assert_same macro is not as good as for assert_eq, when migrating some test I run into a few of:


--> data.rs:75:23
   |
75 |     assert_same!(Some(None), pri.map(|v| v.sk));
   |                       ^^^^ cannot infer type of the type parameter `T` declared on the enum `Option`
   |
help: consider specifying the generic argument
   |
75 |     assert_same!(Some(None::<T>), pri.map(|v| v.sk));
   |                           +++++

Metadata

Metadata

Assignees

No one assigned

    Labels

    🏷️ macrosfacet-macros, proc-macro implementation🐛 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions