2019-11-24 07:31:19 -06:00
|
|
|
error[E0277]: the size for values of type `str` cannot be known at compilation time
|
|
|
|
--> $DIR/unsized-fn-param.rs:11:11
|
|
|
|
|
|
|
|
|
LL | foo11("bar", &"baz");
|
2022-08-16 01:27:22 -05:00
|
|
|
| ^^^^^ doesn't have a size known at compile-time
|
2019-11-24 07:31:19 -06:00
|
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
= help: the trait `Sized` is not implemented for `str`
|
2022-06-19 23:04:06 -05:00
|
|
|
= note: required for the cast from `str` to the object type `dyn AsRef<Path>`
|
2022-04-02 18:43:17 -05:00
|
|
|
help: consider borrowing the value, since `&str` can be coerced into `dyn AsRef<Path>`
|
|
|
|
|
|
|
|
|
LL | foo11(&"bar", &"baz");
|
|
|
|
| +
|
2019-11-24 07:31:19 -06:00
|
|
|
|
|
|
|
error[E0277]: the size for values of type `str` cannot be known at compilation time
|
|
|
|
--> $DIR/unsized-fn-param.rs:13:19
|
|
|
|
|
|
|
|
|
LL | foo12(&"bar", "baz");
|
2022-08-16 01:27:22 -05:00
|
|
|
| ^^^^^ doesn't have a size known at compile-time
|
2019-11-24 07:31:19 -06:00
|
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
= help: the trait `Sized` is not implemented for `str`
|
2022-06-19 23:04:06 -05:00
|
|
|
= note: required for the cast from `str` to the object type `dyn AsRef<Path>`
|
2022-04-02 18:43:17 -05:00
|
|
|
help: consider borrowing the value, since `&str` can be coerced into `dyn AsRef<Path>`
|
|
|
|
|
|
|
|
|
LL | foo12(&"bar", &"baz");
|
|
|
|
| +
|
2019-11-24 07:31:19 -06:00
|
|
|
|
|
|
|
error[E0277]: the size for values of type `str` cannot be known at compilation time
|
|
|
|
--> $DIR/unsized-fn-param.rs:16:11
|
|
|
|
|
|
|
|
|
LL | foo21("bar", &"baz");
|
2022-08-16 01:27:22 -05:00
|
|
|
| ^^^^^ doesn't have a size known at compile-time
|
2019-11-24 07:31:19 -06:00
|
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
= help: the trait `Sized` is not implemented for `str`
|
2022-06-19 23:04:06 -05:00
|
|
|
= note: required for the cast from `str` to the object type `dyn AsRef<str>`
|
2022-04-02 18:43:17 -05:00
|
|
|
help: consider borrowing the value, since `&str` can be coerced into `dyn AsRef<str>`
|
|
|
|
|
|
|
|
|
LL | foo21(&"bar", &"baz");
|
|
|
|
| +
|
2019-11-24 07:31:19 -06:00
|
|
|
|
|
|
|
error[E0277]: the size for values of type `str` cannot be known at compilation time
|
|
|
|
--> $DIR/unsized-fn-param.rs:18:19
|
|
|
|
|
|
|
|
|
LL | foo22(&"bar", "baz");
|
2022-08-16 01:27:22 -05:00
|
|
|
| ^^^^^ doesn't have a size known at compile-time
|
2019-11-24 07:31:19 -06:00
|
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
= help: the trait `Sized` is not implemented for `str`
|
2022-06-19 23:04:06 -05:00
|
|
|
= note: required for the cast from `str` to the object type `dyn AsRef<str>`
|
2022-04-02 18:43:17 -05:00
|
|
|
help: consider borrowing the value, since `&str` can be coerced into `dyn AsRef<str>`
|
|
|
|
|
|
|
|
|
LL | foo22(&"bar", &"baz");
|
|
|
|
| +
|
2019-11-24 07:31:19 -06:00
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|