mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 23:12:02 +00:00
Add a couple tests for normalize under binder issues
This commit is contained in:
parent
5dab47dcd8
commit
347d503333
@ -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![]);
|
||||
}
|
@ -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() {}
|
Loading…
Reference in New Issue
Block a user