fork/rust
git clone https://git.julia.blue/fork/rust
f3e1a954d2e
1.41.1
1error[E0277]: the size for values of type `str` cannot be known at compilation time 2 --> $DIR/trivial-bounds-leak.rs:12:25 3 | 4LL | fn cant_return_str() -> str { 5 | ^^^ doesn't have a size known at compile-time 6 | 7 = help: the trait `std::marker::Sized` is not implemented for `str` 8 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> 9 = note: the return type of a function must have a statically known size 10 11error[E0599]: no method named `test` found for type `i32` in the current scope 12 --> $DIR/trivial-bounds-leak.rs:24:10 13 | 14LL | 3i32.test(); 15 | ^^^^ method not found in `i32` 16 | 17 = help: items from traits can only be used if the trait is implemented and in scope 18 = note: the following trait defines an item `test`, perhaps you need to implement it: 19 candidate #1: `Foo` 20 21error[E0277]: the trait bound `i32: Foo` is not satisfied 22 --> $DIR/trivial-bounds-leak.rs:25:15 23 | 24LL | fn test(&self); 25 | --------------- required by `Foo::test` 26... 27LL | Foo::test(&4i32); 28 | ^^^^^ the trait `Foo` is not implemented for `i32` 29 30error[E0277]: the trait bound `i32: Foo` is not satisfied 31 --> $DIR/trivial-bounds-leak.rs:26:22 32 | 33LL | generic_function(5i32); 34 | ^^^^ the trait `Foo` is not implemented for `i32` 35... 36LL | fn generic_function<T: Foo>(t: T) {} 37 | ---------------- --- required by this bound in `generic_function` 38 39error: aborting due to 4 previous errors 40 41Some errors have detailed explanations: E0277, E0599. 42For more information about an error, try `rustc --explain E0277`.