Skip to content

Incompatibility with libloading 0.9.0 #3332

@pavel-reznak-tfs

Description

@pavel-reznak-tfs

Hi all,

When I use bindgen with libloading, starting from 0.9.0, there is an issue with a trait requirement inside a new method.

    |         let library = ::libloading::Library::new(path)?;
    |                       -------------------------- ^^^^ the trait `AsFilename` is not implemented for `P`
    |                       |
    |                       required by a bound introduced by this call
    |
note: required by a bound in `libloading::Library::new`
   --> ***\libloading-0.9.0\src\safe.rs:84:38
    |
    |     pub unsafe fn new(filename: impl AsFilename) -> Result<Library, Error> {
    |                                      ^^^^^^^^^^ required by this bound in `Library::new`
help: consider further restricting type parameter `P` with trait `AsFilename`
    |
    |         P: AsRef<::std::ffi::OsStr> + libloading::AsFilename,
    |                                     ++++++++++++++++++++++++

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions