We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 32f3887 + 347d503 commit 56077b5Copy full SHA for 56077b5
src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-56556.rs
@@ -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
src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-76956.rs
@@ -0,0 +1,15 @@
+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)
+ }
14
15
+fn main() {}
0 commit comments