]> git.lizzy.rs Git - rust.git/blob - tests/ui/unsized/unsized-fn-param.stderr
Auto merge of #106711 - albertlarsan68:use-ci-llvm-when-lld, r=jyn514
[rust.git] / tests / ui / unsized / unsized-fn-param.stderr
1 error[E0277]: the size for values of type `str` cannot be known at compilation time
2   --> $DIR/unsized-fn-param.rs:11:11
3    |
4 LL |     foo11("bar", &"baz");
5    |           ^^^^^ doesn't have a size known at compile-time
6    |
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>`
10    |
11 LL |     foo11(&"bar", &"baz");
12    |           +
13
14 error[E0277]: the size for values of type `str` cannot be known at compilation time
15   --> $DIR/unsized-fn-param.rs:13:19
16    |
17 LL |     foo12(&"bar", "baz");
18    |                   ^^^^^ doesn't have a size known at compile-time
19    |
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>`
23    |
24 LL |     foo12(&"bar", &"baz");
25    |                   +
26
27 error[E0277]: the size for values of type `str` cannot be known at compilation time
28   --> $DIR/unsized-fn-param.rs:16:11
29    |
30 LL |     foo21("bar", &"baz");
31    |           ^^^^^ doesn't have a size known at compile-time
32    |
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>`
36    |
37 LL |     foo21(&"bar", &"baz");
38    |           +
39
40 error[E0277]: the size for values of type `str` cannot be known at compilation time
41   --> $DIR/unsized-fn-param.rs:18:19
42    |
43 LL |     foo22(&"bar", "baz");
44    |                   ^^^^^ doesn't have a size known at compile-time
45    |
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>`
49    |
50 LL |     foo22(&"bar", &"baz");
51    |                   +
52
53 error: aborting due to 4 previous errors
54
55 For more information about this error, try `rustc --explain E0277`.