]>
Commit | Line | Data |
---|---|---|
8faf50e0 | 1 | error[E0277]: the size for values of type `str` cannot be known at compilation time |
0731742a | 2 | --> $DIR/trivial-bounds-leak.rs:12:25 |
94b46f34 | 3 | | |
532ac7d7 | 4 | LL | fn cant_return_str() -> str { |
8faf50e0 | 5 | | ^^^ doesn't have a size known at compile-time |
94b46f34 XL |
6 | | |
7 | = help: the trait `std::marker::Sized` is not implemented for `str` | |
8 | = note: the return type of a function must have a statically known size | |
9 | ||
10 | error[E0599]: no method named `test` found for type `i32` in the current scope | |
0731742a | 11 | --> $DIR/trivial-bounds-leak.rs:24:10 |
94b46f34 | 12 | | |
532ac7d7 | 13 | LL | 3i32.test(); |
e1599b0c | 14 | | ^^^^ method not found in `i32` |
94b46f34 XL |
15 | | |
16 | = help: items from traits can only be used if the trait is implemented and in scope | |
74b04a01 XL |
17 | note: `Foo` defines an item `test`, perhaps you need to implement it |
18 | --> $DIR/trivial-bounds-leak.rs:4:1 | |
19 | | | |
20 | LL | pub trait Foo { | |
21 | | ^^^^^^^^^^^^^ | |
94b46f34 XL |
22 | |
23 | error[E0277]: the trait bound `i32: Foo` is not satisfied | |
e1599b0c | 24 | --> $DIR/trivial-bounds-leak.rs:25:15 |
94b46f34 XL |
25 | | |
26 | LL | fn test(&self); | |
e1599b0c XL |
27 | | --------------- required by `Foo::test` |
28 | ... | |
29 | LL | Foo::test(&4i32); | |
30 | | ^^^^^ the trait `Foo` is not implemented for `i32` | |
94b46f34 XL |
31 | |
32 | error[E0277]: the trait bound `i32: Foo` is not satisfied | |
e1599b0c | 33 | --> $DIR/trivial-bounds-leak.rs:26:22 |
94b46f34 | 34 | | |
532ac7d7 | 35 | LL | generic_function(5i32); |
e1599b0c XL |
36 | | ^^^^ the trait `Foo` is not implemented for `i32` |
37 | ... | |
94b46f34 | 38 | LL | fn generic_function<T: Foo>(t: T) {} |
ba9703b0 | 39 | | --- required by this bound in `generic_function` |
94b46f34 XL |
40 | |
41 | error: aborting due to 4 previous errors | |
42 | ||
48663c56 | 43 | Some errors have detailed explanations: E0277, E0599. |
94b46f34 | 44 | For more information about an error, try `rustc --explain E0277`. |