]> git.proxmox.com Git - rustc.git/blob - src/test/ui/trivial-bounds/trivial-bounds-leak.stderr
New upstream version 1.33.0+dfsg1
[rustc.git] / src / test / ui / trivial-bounds / trivial-bounds-leak.stderr
1 error[E0277]: the size for values of type `str` cannot be known at compilation time
2 --> $DIR/trivial-bounds-leak.rs:12:25
3 |
4 LL | fn cant_return_str() -> str { //~ ERROR
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
11 error[E0599]: no method named `test` found for type `i32` in the current scope
12 --> $DIR/trivial-bounds-leak.rs:24:10
13 |
14 LL | 3i32.test(); //~ ERROR
15 | ^^^^
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
21 error[E0277]: the trait bound `i32: Foo` is not satisfied
22 --> $DIR/trivial-bounds-leak.rs:25:5
23 |
24 LL | Foo::test(&4i32); //~ ERROR
25 | ^^^^^^^^^ the trait `Foo` is not implemented for `i32`
26 |
27 note: required by `Foo::test`
28 --> $DIR/trivial-bounds-leak.rs:5:5
29 |
30 LL | fn test(&self);
31 | ^^^^^^^^^^^^^^^
32
33 error[E0277]: the trait bound `i32: Foo` is not satisfied
34 --> $DIR/trivial-bounds-leak.rs:26:5
35 |
36 LL | generic_function(5i32); //~ ERROR
37 | ^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `i32`
38 |
39 note: required by `generic_function`
40 --> $DIR/trivial-bounds-leak.rs:29:1
41 |
42 LL | fn generic_function<T: Foo>(t: T) {}
43 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44
45 error: aborting due to 4 previous errors
46
47 Some errors occurred: E0277, E0599.
48 For more information about an error, try `rustc --explain E0277`.