(unsafe function - error E0133) Can't compile on Ubuntu or ElementaryOS
Created by: MichaelHoelzl
On my new computer i can't compile Redox. I installed the Redox toolchain and do everything like in the description.
Compiling ntpclient v0.0.1 (https://github.com/willem66745/ntpclient-rust#7e3bdf60)
Compiling idna v0.1.4
Compiling pbr v1.0.0 (https://github.com/a8m/pb#e9369ed2)
Compiling ring v0.11.0
Compiling toml v0.4.5
Compiling url v1.6.0
Compiling webpki v0.14.0
Compiling hyper v0.10.13
Compiling webpki-roots v0.11.0
Compiling rustls v0.9.0
Compiling pcid v0.1.0 (file:///home/michael/redox/redox/cookbook/recipes/drivers/build/pcid)
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