Skip to content

Nightly has what appear to be upcoming serious failures #474

@m4b

Description

@m4b
error: implicit autoref creates a reference to the dereference of a raw pointer
   --> src/elf/dynamic.rs:788:5
    |
570 |                         let lib = &(*strtab)[dynamic.d_val as usize];
    |                                      ------ this raw pointer has type `*const Strtab<'_>`
...
788 |     elf_dyn_std_impl!(u32, crate::elf32::program_header::ProgramHeader);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: creating a reference requires the pointer target to be valid and imposes aliasing requirements
note: autoref is being applied to this expression, resulting in: `&Strtab<'_>`
   --> src/elf/dynamic.rs:570:36
    |
570 |                         let lib = &(*strtab)[dynamic.d_val as usize];
    |                                    ^^^^^^^^^
...
788 |     elf_dyn_std_impl!(u32, crate::elf32::program_header::ProgramHeader);
    |     ------------------------------------------------------------------- in this macro invocation
    = note: `#[deny(dangerous_implicit_autorefs)]` on by default
    = note: this error originates in the macro `elf_dyn_std_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
help: try using a raw pointer method instead; or if this reference is intentional, make it explicit
    |
570 |                         let lib = &(&(*strtab))[dynamic.d_val as usize];
    |                                    ++         +

error: implicit autoref creates a reference to the dereference of a raw pointer
   --> src/elf/dynamic.rs:802:5
    |
570 |                         let lib = &(*strtab)[dynamic.d_val as usize];
    |                                      ------ this raw pointer has type `*const Strtab<'_>`
...
802 |     elf_dyn_std_impl!(u64, crate::elf64::program_header::ProgramHeader);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: creating a reference requires the pointer target to be valid and imposes aliasing requirements
note: autoref is being applied to this expression, resulting in: `&Strtab<'_>`
   --> src/elf/dynamic.rs:570:36
    |
570 |                         let lib = &(*strtab)[dynamic.d_val as usize];
    |                                    ^^^^^^^^^
...
802 |     elf_dyn_std_impl!(u64, crate::elf64::program_header::ProgramHeader);
    |     ------------------------------------------------------------------- in this macro invocation
    = note: this error originates in the macro `elf_dyn_std_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
help: try using a raw pointer method instead; or if this reference is intentional, make it explicit
    |
570 |                         let lib = &(&(*strtab))[dynamic.d_val as usize];
    |                                    ++         +

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions