fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.4 KiB31 linesraw
1error[E0277]: the size for values of type `str` cannot be known at compilation time
2  --> $DIR/unsized-ret.rs:10:11
3   |
4LL |     foo::<fn() -> str, _>(None, ());
5   |           ^^^^^^^^^^^ doesn't have a size known at compile-time
6   |
7   = help: within `fn() -> str`, the trait `Sized` is not implemented for `str`
8   = note: required because it appears within the type `fn() -> str`
9note: required by a bound in `foo`
10  --> $DIR/unsized-ret.rs:5:11
11   |
12LL | fn foo<F: Fn<T>, T:std::marker::Tuple>(f: Option<F>, t: T) {
13   |           ^^^^^ required by this bound in `foo`
14
15error[E0277]: the size for values of type `(dyn std::fmt::Display + 'a)` cannot be known at compilation time
16  --> $DIR/unsized-ret.rs:13:11
17   |
18LL |     foo::<for<'a> fn(&'a ()) -> (dyn std::fmt::Display + 'a), _>(None, (&(),));
19   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
20   |
21   = help: within `for<'a> fn(&'a ()) -> (dyn std::fmt::Display + 'a)`, the trait `for<'a> Sized` is not implemented for `(dyn std::fmt::Display + 'a)`
22   = note: required because it appears within the type `fn(&()) -> dyn Display`
23note: required by a bound in `foo`
24  --> $DIR/unsized-ret.rs:5:11
25   |
26LL | fn foo<F: Fn<T>, T:std::marker::Tuple>(f: Option<F>, t: T) {
27   |           ^^^^^ required by this bound in `foo`
28
29error: aborting due to 2 previous errors
30
31For more information about this error, try `rustc --explain E0277`.