]> git.lizzy.rs Git - rust.git/blob - tests/ui/traits/new-solver/pointer-sized.stderr
b250b1331bbf9ef1083cc1349d7b6e74ec91e7f7
[rust.git] / tests / ui / traits / new-solver / pointer-sized.stderr
1 error[E0277]: `u16` needs to be a pointer-sized type
2   --> $DIR/pointer-sized.rs:9:27
3    |
4 LL |     require_pointer_sized(1u16);
5    |     --------------------- ^^^^ the trait `PointerSized` is not implemented for `u16`
6    |     |
7    |     required by a bound introduced by this call
8    |
9    = note: the trait bound `u16: PointerSized` is not satisfied
10 note: required by a bound in `require_pointer_sized`
11   --> $DIR/pointer-sized.rs:5:34
12    |
13 LL | fn require_pointer_sized(_: impl PointerSized) {}
14    |                                  ^^^^^^^^^^^^ required by this bound in `require_pointer_sized`
15 help: consider borrowing here
16    |
17 LL |     require_pointer_sized(&1u16);
18    |                           +
19 LL |     require_pointer_sized(&mut 1u16);
20    |                           ++++
21
22 error: aborting due to previous error
23
24 For more information about this error, try `rustc --explain E0277`.