File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 11// This is just the compile_fail version of the previous test case, testing what
22// error happens if the user has written an incorrect #[bits = N] attribute.
3+ //
4+ // Ensure that the error message points to the incorrect attribute and contains
5+ // the correct number of bits in some form.
36
47use bitfield:: * ;
58
Original file line number Diff line number Diff line change 11error[E0308]: mismatched types
2- --> $DIR/11-bits-attribute-wrong.rs:8 :14
3- |
4- 8 | #[bits = 9]
5- | ^ expected an array with a fixed size of 9 elements, found one with 1 elements
6- |
7- = note: expected type `[(); 9]`
8- found type `[(); 1]`
2+ --> $DIR/11-bits-attribute-wrong.rs:11 :14
3+ |
4+ 11 | #[bits = 9]
5+ | ^ expected an array with a fixed size of 9 elements, found one with 1 elements
6+ |
7+ = note: expected type `[(); 9]`
8+ found type `[(); 1]`
99
1010For more information about this error, try `rustc --explain E0308`.
You can’t perform that action at this time.
0 commit comments