1 error[E0277]: the size for values of type `str` cannot be known at compilation time
2 --> $DIR/unsized-fn-param.rs:11:11
4 LL | foo11("bar", &"baz");
5 | ^^^^^ doesn't have a size known at compile-time
7 = help: the trait `Sized` is not implemented for `str`
8 = note: required for the cast from `str` to the object type `dyn AsRef<Path>`
9 help: consider borrowing the value, since `&str` can be coerced into `dyn AsRef<Path>`
11 LL | foo11(&"bar", &"baz");
14 error[E0277]: the size for values of type `str` cannot be known at compilation time
15 --> $DIR/unsized-fn-param.rs:13:19
17 LL | foo12(&"bar", "baz");
18 | ^^^^^ doesn't have a size known at compile-time
20 = help: the trait `Sized` is not implemented for `str`
21 = note: required for the cast from `str` to the object type `dyn AsRef<Path>`
22 help: consider borrowing the value, since `&str` can be coerced into `dyn AsRef<Path>`
24 LL | foo12(&"bar", &"baz");
27 error[E0277]: the size for values of type `str` cannot be known at compilation time
28 --> $DIR/unsized-fn-param.rs:16:11
30 LL | foo21("bar", &"baz");
31 | ^^^^^ doesn't have a size known at compile-time
33 = help: the trait `Sized` is not implemented for `str`
34 = note: required for the cast from `str` to the object type `dyn AsRef<str>`
35 help: consider borrowing the value, since `&str` can be coerced into `dyn AsRef<str>`
37 LL | foo21(&"bar", &"baz");
40 error[E0277]: the size for values of type `str` cannot be known at compilation time
41 --> $DIR/unsized-fn-param.rs:18:19
43 LL | foo22(&"bar", "baz");
44 | ^^^^^ doesn't have a size known at compile-time
46 = help: the trait `Sized` is not implemented for `str`
47 = note: required for the cast from `str` to the object type `dyn AsRef<str>`
48 help: consider borrowing the value, since `&str` can be coerced into `dyn AsRef<str>`
50 LL | foo22(&"bar", &"baz");
53 error: aborting due to 4 previous errors
55 For more information about this error, try `rustc --explain E0277`.