]> git.proxmox.com Git - rustc.git/blob - src/test/ui/trivial-bounds/trivial-bounds-leak.stderr
New upstream version 1.66.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 {
5 | ^^^ doesn't have a size known at compile-time
6 |
7 = help: the trait `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
11 --> $DIR/trivial-bounds-leak.rs:24:10
12 |
13 LL | 3i32.test();
14 | ^^^^ method not found in `i32`
15 |
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
19 |
20 LL | pub trait Foo {
21 | ^^^^^^^^^^^^^
22
23 error[E0277]: the trait bound `i32: Foo` is not satisfied
24 --> $DIR/trivial-bounds-leak.rs:25:15
25 |
26 LL | Foo::test(&4i32);
27 | --------- ^^^^^ the trait `Foo` is not implemented for `i32`
28 | |
29 | required by a bound introduced by this call
30
31 error[E0277]: the trait bound `i32: Foo` is not satisfied
32 --> $DIR/trivial-bounds-leak.rs:26:22
33 |
34 LL | generic_function(5i32);
35 | ---------------- ^^^^ the trait `Foo` is not implemented for `i32`
36 | |
37 | required by a bound introduced by this call
38 |
39 note: required by a bound in `generic_function`
40 --> $DIR/trivial-bounds-leak.rs:29:24
41 |
42 LL | fn generic_function<T: Foo>(t: T) {}
43 | ^^^ required by this bound in `generic_function`
44
45 error: aborting due to 4 previous errors
46
47 Some errors have detailed explanations: E0277, E0599.
48 For more information about an error, try `rustc --explain E0277`.