]> git.lizzy.rs Git - rust.git/blob - src/test/ui/trivial-bounds/trivial-bounds-leak.stderr
Rollup merge of #87307 - michaelwoerister:pgo-unwind-msvc, r=nagisa
[rust.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 note: required by `Foo::test`
30   --> $DIR/trivial-bounds-leak.rs:5:5
31    |
32 LL |     fn test(&self);
33    |     ^^^^^^^^^^^^^^^
34
35 error[E0277]: the trait bound `i32: Foo` is not satisfied
36   --> $DIR/trivial-bounds-leak.rs:26:22
37    |
38 LL |     generic_function(5i32);
39    |                      ^^^^ the trait `Foo` is not implemented for `i32`
40 ...
41 LL | fn generic_function<T: Foo>(t: T) {}
42    |                        --- required by this bound in `generic_function`
43
44 error: aborting due to 4 previous errors
45
46 Some errors have detailed explanations: E0277, E0599.
47 For more information about an error, try `rustc --explain E0277`.