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

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.