]> git.proxmox.com Git - rustc.git/blame - src/test/ui/trivial-bounds/trivial-bounds-leak.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / trivial-bounds / trivial-bounds-leak.stderr
CommitLineData
8faf50e0 1error[E0277]: the size for values of type `str` cannot be known at compilation time
0731742a 2 --> $DIR/trivial-bounds-leak.rs:12:25
94b46f34 3 |
532ac7d7 4LL | fn cant_return_str() -> str {
8faf50e0 5 | ^^^ doesn't have a size known at compile-time
94b46f34 6 |
1b1a35ee 7 = help: the trait `Sized` is not implemented for `str`
94b46f34
XL
8 = note: the return type of a function must have a statically known size
9
10error[E0599]: no method named `test` found for type `i32` in the current scope
0731742a 11 --> $DIR/trivial-bounds-leak.rs:24:10
94b46f34 12 |
532ac7d7 13LL | 3i32.test();
e1599b0c 14 | ^^^^ method not found in `i32`
94b46f34
XL
15 |
16 = help: items from traits can only be used if the trait is implemented and in scope
74b04a01
XL
17note: `Foo` defines an item `test`, perhaps you need to implement it
18 --> $DIR/trivial-bounds-leak.rs:4:1
19 |
20LL | pub trait Foo {
21 | ^^^^^^^^^^^^^
94b46f34
XL
22
23error[E0277]: the trait bound `i32: Foo` is not satisfied
e1599b0c 24 --> $DIR/trivial-bounds-leak.rs:25:15
94b46f34
XL
25 |
26LL | fn test(&self);
e1599b0c
XL
27 | --------------- required by `Foo::test`
28...
29LL | Foo::test(&4i32);
30 | ^^^^^ the trait `Foo` is not implemented for `i32`
94b46f34
XL
31
32error[E0277]: the trait bound `i32: Foo` is not satisfied
e1599b0c 33 --> $DIR/trivial-bounds-leak.rs:26:22
94b46f34 34 |
532ac7d7 35LL | generic_function(5i32);
e1599b0c
XL
36 | ^^^^ the trait `Foo` is not implemented for `i32`
37...
94b46f34 38LL | fn generic_function<T: Foo>(t: T) {}
ba9703b0 39 | --- required by this bound in `generic_function`
94b46f34
XL
40
41error: aborting due to 4 previous errors
42
48663c56 43Some errors have detailed explanations: E0277, E0599.
94b46f34 44For more information about an error, try `rustc --explain E0277`.