]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/trait-with-supertraits-needing-sized-self.stderr
feat(rustdoc): open sidebar menu when links inside it are focused
[rust.git] / src / test / ui / associated-types / trait-with-supertraits-needing-sized-self.stderr
1 error[E0277]: the size for values of type `Self` cannot be known at compilation time
2   --> $DIR/trait-with-supertraits-needing-sized-self.rs:3:22
3    |
4 LL | trait ArithmeticOps: Add<Output=Self> + Sub<Output=Self> + Mul<Output=Self> + Div<Output=Self> {}
5    |                      ^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
6    | 
7   ::: $SRC_DIR/core/src/ops/arith.rs:LL:COL
8    |
9 LL | pub trait Add<Rhs = Self> {
10    |               --- required by this bound in `Add`
11    |
12 help: consider further restricting `Self`
13    |
14 LL | trait ArithmeticOps: Add<Output=Self> + Sub<Output=Self> + Mul<Output=Self> + Div<Output=Self> + Sized {}
15    |                                                                                                ^^^^^^^
16
17 error: aborting due to previous error
18
19 For more information about this error, try `rustc --explain E0277`.