Skip to content

Commit

Permalink
Add test for issue 30867
Browse files Browse the repository at this point in the history
  • Loading branch information
clubby789 committed Oct 7, 2024
1 parent 65c2d4c commit 3412412
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/ui/traits/hrtb-related-type-params-30867.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//@ check-pass
#![crate_type = "lib"]

trait Unary<T> {}
impl<T, U, F: Fn(T) -> U> Unary<T> for F {}
fn unary<F: for<'a> Unary<&'a T>, T>() {}

pub fn test<F: for<'a> Fn(&'a i32) -> &'a i32>() {
unary::<F, i32>()
}

0 comments on commit 3412412

Please sign in to comment.