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 | required by a bound introduced by this call
31 error[E0277]: the trait bound `i32: Foo` is not satisfied
32 --> $DIR/trivial-bounds-leak.rs:26:22
34 LL | generic_function(5i32);
35 | ---------------- ^^^^ the trait `Foo` is not implemented for `i32`
37 | required by a bound introduced by this call
39 note: required by a bound in `generic_function`
40 --> $DIR/trivial-bounds-leak.rs:29:24
42 LL | fn generic_function<T: Foo>(t: T) {}
43 | ^^^ required by this bound in `generic_function`
45 error: aborting due to 4 previous errors
47 Some errors have detailed explanations: E0277, E0599.
48 For more information about an error, try `rustc --explain E0277`.