Skip to content

Allow impl Trait as type for function parameters #3454

@CohenArthur

Description

@CohenArthur
macro_rules! impl_foo {
	() => { impl Foo }
}

pub trait Foo {}

pub trait Bar {
    type Baz;
}

pub fn foo(_value: impl Bar<Baz = impl_foo!()>) -> i32 {
    15
}

pub fn bar(_value: impl Bar<Baz = impl Foo>) -> i32 {
    16
}

This is to make sure we properly handle opaque types

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions