@@ -6,6 +6,10 @@ LL | foo11("bar", &"baz");
6
6
|
7
7
= help: the trait `Sized` is not implemented for `str`
8
8
= note: required for the cast 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
+ | +
9
13
10
14
error[E0277]: the size for values of type `str` cannot be known at compilation time
11
15
--> $DIR/unsized-fn-param.rs:13:19
@@ -15,6 +19,10 @@ LL | foo12(&"bar", "baz");
15
19
|
16
20
= help: the trait `Sized` is not implemented for `str`
17
21
= note: required for the cast 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
+ | +
18
26
19
27
error[E0277]: the size for values of type `str` cannot be known at compilation time
20
28
--> $DIR/unsized-fn-param.rs:16:11
@@ -24,6 +32,10 @@ LL | foo21("bar", &"baz");
24
32
|
25
33
= help: the trait `Sized` is not implemented for `str`
26
34
= note: required for the cast 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
+ | +
27
39
28
40
error[E0277]: the size for values of type `str` cannot be known at compilation time
29
41
--> $DIR/unsized-fn-param.rs:18:19
@@ -33,6 +45,10 @@ LL | foo22(&"bar", "baz");
33
45
|
34
46
= help: the trait `Sized` is not implemented for `str`
35
47
= note: required for the cast 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
+ | +
36
52
37
53
error: aborting due to 4 previous errors
38
54
0 commit comments