Skip to content

Does not support associated types #57

@zhixinwen

Description

@zhixinwen
    #[cfg_attr(test, faux::create)]
    struct Object {}

    #[cfg_attr(test, faux::methods)]
    impl Object {
        pub fn method<A>(&self, data: impl IntoIterator<Item = A>) {}
    }
    
    #[test]
    fn test_mock() {
        let o = Object::faux();
    }

Error is

error[E0191]: the value of the associated type `IntoIter` (from trait `IntoIterator`) must be specified
    |
784 |         pub fn method<A>(&self, data: impl IntoIterator<Item = A>) {}
    |                                            ^^^^^^^^^^^^^^^^^^^^^^ help: specify the associated type: `IntoIterator<Item = A, IntoIter = Type>`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions