rust/tests/ui/impl-trait/defined-by-trait-resolution.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
199 B
Rust
Raw Normal View History

//! The trait query `foo: Fn() -> u8` is a valid defining use of RPIT.
// build-pass
fn returns_u8(_: impl Fn() -> u8) {}
pub fn foo() -> impl Sized {
returns_u8(foo);
0u8
}
fn main() {}