File: bitfield_disable_default.stderr

package info (click to toggle)
rust-bitfields 0.12.4-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 400 kB
  • sloc: makefile: 2
file content (22 lines) | stat: -rw-r--r-- 1,192 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
error[E0599]: no function or associated item named `default` found for struct `Bitfield` in the current scope
  --> tests/compile_error_cases/bitfield_disable_default.rs:12:30
   |
3  | #[bitfield(u64, default = false)]
   | --------------------------------- function or associated item `default` not found for this struct
...
12 |     let bitfield = Bitfield::default();
   |                              ^^^^^^^ function or associated item not found in `Bitfield`
   |
note: if you're trying to build a new `Bitfield` consider using one of the following associated functions:
      Bitfield::new
      Bitfield::new_without_defaults
      Bitfield::from_bits
      Bitfield::from_bits_with_defaults
  --> tests/compile_error_cases/bitfield_disable_default.rs:3:1
   |
3  | #[bitfield(u64, default = false)]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = help: items from traits can only be used if the trait is implemented and in scope
   = note: the following trait defines an item `default`, perhaps you need to implement it:
           candidate #1: `Default`
   = note: this error originates in the attribute macro `bitfield` (in Nightly builds, run with -Z macro-backtrace for more info)