1 error[E0277]: the size for values of type `str` cannot be known at compilation time
2 --> $DIR/trivial-bounds-leak.rs:12:25
4 LL | fn cant_return_str() -> str {
5 | ^^^ doesn't have a size known at compile-time
7 = help: the trait `Sized` is not implemented for `str`
8 = note: the return type of a function must have a statically known size
10 error[E0599]: no method named `test` found for type `i32` in the current scope
11 --> $DIR/trivial-bounds-leak.rs:24:10
14 | ^^^^ method not found in `i32`
16 = help: items from traits can only be used if the trait is implemented and in scope
17 note: `Foo` defines an item `test`, perhaps you need to implement it
18 --> $DIR/trivial-bounds-leak.rs:4:1
23 error[E0277]: the trait bound `i32: Foo` is not satisfied
24 --> $DIR/trivial-bounds-leak.rs:25:15
26 LL | Foo::test(&4i32);
27 | ^^^^^ the trait `Foo` is not implemented for `i32`
29 note: required by `Foo::test`
30 --> $DIR/trivial-bounds-leak.rs:5:5
35 error[E0277]: the trait bound `i32: Foo` is not satisfied
36 --> $DIR/trivial-bounds-leak.rs:26:22
38 LL | generic_function(5i32);
39 | ^^^^ the trait `Foo` is not implemented for `i32`
41 LL | fn generic_function<T: Foo>(t: T) {}
42 | --- required by this bound in `generic_function`
44 error: aborting due to 4 previous errors
46 Some errors have detailed explanations: E0277, E0599.
47 For more information about an error, try `rustc --explain E0277`.