Could not compile 'pcid'
Created by: ghatdev
How can I solve this error?
error: borrow of packed field requires unsafe function or block (error E0133) --> pcid/src/main.rs:46:29 | 46 | header.vendor_id, header.device_id, | ^^^^^^^^^^^^^^^^ | note: lint level defined here --> pcid/src/main.rs:1:9 | 1 | #![deny(warnings)] | ^^^^^^^^ = note: #[deny(safe_packed_borrows)] implied by #[deny(warnings)] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #46043 https://github.com/rust-lang/rust/issues/46043
error: borrow of packed field requires unsafe function or block (error E0133) --> pcid/src/main.rs:46:47 | 46 | header.vendor_id, header.device_id, | ^^^^^^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #46043 https://github.com/rust-lang/rust/issues/46043
error: borrow of packed field requires unsafe function or block (error E0133) --> pcid/src/main.rs:81:33 | 81 | for i in 0..header.bars.len() { | ^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #46043 https://github.com/rust-lang/rust/issues/46043
error: borrow of packed field requires unsafe function or block (error E0133) --> pcid/src/main.rs:127:60 | 127 | match PciBar::from(header.bars[i]) { | ^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #46043 https://github.com/rust-lang/rust/issues/46043
error: borrow of packed field requires unsafe function or block (error E0133) --> pcid/src/main.rs:145:71 | 145 | "$VENID" => format!("{:>04X}",header.vendor_id), | ^^^^^^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #46043 https://github.com/rust-lang/rust/issues/46043
error: borrow of packed field requires unsafe function or block (error E0133) --> pcid/src/main.rs:146:71 | 146 | "$DEVID" => format!("{:>04X}",header.device_id), | ^^^^^^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #46043 https://github.com/rust-lang/rust/issues/46043
error: #[derive] can't be used on a non-Copy #[repr(packed)] struct (error E0133) --> pcid/src/pci/header.rs:4:10 | 4 | #[derive(Debug, Default)] | ^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #46043 https://github.com/rust-lang/rust/issues/46043
error: aborting due to 7 previous errors
error: Could not compile pcid
.
warning: build failed, waiting for other jobs to finish...
error: build failed
./repo.sh failed.mk/initfs.mk:2: recipe for target 'build/initfs.tag' failed
make: *** [build/initfs.tag] Error 1