summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/non_lifetime_binders/bad-sized-cond.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/traits/non_lifetime_binders/bad-sized-cond.stderr')
-rw-r--r--tests/ui/traits/non_lifetime_binders/bad-sized-cond.stderr62
1 files changed, 62 insertions, 0 deletions
diff --git a/tests/ui/traits/non_lifetime_binders/bad-sized-cond.stderr b/tests/ui/traits/non_lifetime_binders/bad-sized-cond.stderr
new file mode 100644
index 000000000..ed9b57cb1
--- /dev/null
+++ b/tests/ui/traits/non_lifetime_binders/bad-sized-cond.stderr
@@ -0,0 +1,62 @@
+warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
+ --> $DIR/bad-sized-cond.rs:1:12
+ |
+LL | #![feature(non_lifetime_binders)]
+ | ^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information
+ = note: `#[warn(incomplete_features)]` on by default
+
+error[E0277]: the size for values of type `V` cannot be known at compilation time
+ --> $DIR/bad-sized-cond.rs:17:5
+ |
+LL | foo();
+ | ^^^ doesn't have a size known at compile-time
+ |
+ = help: the trait `Sized` is not implemented for `V`
+note: required by a bound in `foo`
+ --> $DIR/bad-sized-cond.rs:6:15
+ |
+LL | pub fn foo()
+ | --- required by a bound in this function
+LL | where
+LL | for<V> V: Sized,
+ | ^^^^^ required by this bound in `foo`
+
+error[E0277]: the size for values of type `V` cannot be known at compilation time
+ --> $DIR/bad-sized-cond.rs:20:5
+ |
+LL | bar();
+ | ^^^ doesn't have a size known at compile-time
+ |
+ = help: the trait `Sized` is not implemented for `V`
+ = note: required for `V` to implement `IntoIterator`
+note: required by a bound in `bar`
+ --> $DIR/bad-sized-cond.rs:12:15
+ |
+LL | pub fn bar()
+ | --- required by a bound in this function
+LL | where
+LL | for<V> V: IntoIterator,
+ | ^^^^^^^^^^^^ required by this bound in `bar`
+
+error[E0277]: `V` is not an iterator
+ --> $DIR/bad-sized-cond.rs:20:5
+ |
+LL | bar();
+ | ^^^ `V` is not an iterator
+ |
+ = help: the trait `Iterator` is not implemented for `V`
+ = note: required for `V` to implement `IntoIterator`
+note: required by a bound in `bar`
+ --> $DIR/bad-sized-cond.rs:12:15
+ |
+LL | pub fn bar()
+ | --- required by a bound in this function
+LL | where
+LL | for<V> V: IntoIterator,
+ | ^^^^^^^^^^^^ required by this bound in `bar`
+
+error: aborting due to 3 previous errors; 1 warning emitted
+
+For more information about this error, try `rustc --explain E0277`.