Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build fails in alpm.rs #1215

Open
zeule opened this issue Jul 16, 2024 · 0 comments · May be fixed by #1225
Open

build fails in alpm.rs #1215

zeule opened this issue Jul 16, 2024 · 0 comments · May be fixed by #1225

Comments

@zeule
Copy link

zeule commented Jul 16, 2024

Affected Version

https://aur.archlinux.org/paru.git at 7008763e43b8f950394acf736abd5dc0179d3ff1

Description

Building fails with the current PKGBUILD and rustc 1.79.0 (129f3b996 2024-06-10) (Arch Linux rust 1:1.79.0-1)

Output

error[E0308]: mismatched types
   --> /home/eugene/.cargo/git/checkouts/alpm.rs-a0070a235cf20bfa/306342e/alpm/src/cb.rs:244:60
    |
244 |         unsafe { alpm_option_set_logcb(self.as_ptr(), Some(cb), &*ctx as *const _ as *mut _) };
    |                                                       ---- ^^ expected fn pointer, found fn item
    |                                                       |
    |                                                       arguments to this enum variant are incorrect
    |
    = note: expected fn pointer `unsafe extern "C" fn(_, _, _, *mut __va_list_tag)`
                  found fn item `extern "C" fn(_, _, _, [__va_list_tag; 1]) {logcb::<LogCbImpl<T, F>>}`
help: the type constructed contains `extern "C" fn(*mut c_void, u32, *const u8, [__va_list_tag; 1]) {logcb::<LogCbImpl<T, F>>}` due to the type of the argument passed
   --> /home/eugene/.cargo/git/checkouts/alpm.rs-a0070a235cf20bfa/306342e/alpm/src/cb.rs:244:55
    |
244 |         unsafe { alpm_option_set_logcb(self.as_ptr(), Some(cb), &*ctx as *const _ as *mut _) };
    |                                                       ^^^^^--^
    |                                                            |
    |                                                            this argument influences the type of `Some`
note: tuple variant defined here
   --> /build/rust/src/rustc-1.79.0-src/library/core/src/option.rs:579:5
@ptazithos ptazithos linked a pull request Aug 1, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant