Skip to content

Commit

Permalink
Add a couple tests for normalize under binder issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jackh726 committed Oct 18, 2021
1 parent 5dab47d commit 347d503
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// check-pass

fn foo<T>(t: T) -> usize
where
for<'a> &'a T: IntoIterator,
for<'a> <&'a T as IntoIterator>::IntoIter: ExactSizeIterator,
{
t.into_iter().len()
}

fn main() {
foo::<Vec<u32>>(vec![]);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// check-pass

use std::ops::Deref;

struct Data {
boxed: Box<&'static i32>
}

impl Data {
fn use_data(&self, user: impl for <'a> FnOnce(<Box<&'a i32> as Deref>::Target)) {
user(*self.boxed)
}
}

fn main() {}

0 comments on commit 347d503

Please sign in to comment.