Skip to content

Commit 56077b5

Browse files
Rollup merge of rust-lang#90017 - jackh726:issue-tests, r=nikomatsakis
Add a couple tests for normalize under binder issues Closes rust-lang#56556 Closes rust-lang#76956 r? `@nikomatsakis`
2 parents 32f3887 + 347d503 commit 56077b5

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// check-pass
2+
3+
fn foo<T>(t: T) -> usize
4+
where
5+
for<'a> &'a T: IntoIterator,
6+
for<'a> <&'a T as IntoIterator>::IntoIter: ExactSizeIterator,
7+
{
8+
t.into_iter().len()
9+
}
10+
11+
fn main() {
12+
foo::<Vec<u32>>(vec![]);
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// check-pass
2+
3+
use std::ops::Deref;
4+
5+
struct Data {
6+
boxed: Box<&'static i32>
7+
}
8+
9+
impl Data {
10+
fn use_data(&self, user: impl for <'a> FnOnce(<Box<&'a i32> as Deref>::Target)) {
11+
user(*self.boxed)
12+
}
13+
}
14+
15+
fn main() {}

0 commit comments

Comments
 (0)