Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ***
- *** Rust compiler '/home/axboe/.cargo/bin/rustc' is too new. This may or may not work.
- *** Your version: 1.72.1
- *** Expected version: 1.68.2
- ***
- ***
- *** Rust bindings generator '/usr/bin/bindgen' is too new. This may or may not work.
- *** Your version: 0.60.1
- *** Expected version: 0.56.0
- ***
- error[E0308]: mismatched types
- --> /home/axboe/git/asahi-linux/rust/kernel/allocator.rs:24:25
- |
- 24 | if layout.align() > bindings::BINDINGS_ARCH_SLAB_MINALIGN {
- | -------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `usize`, found `u64`
- | |
- | expected because this is `usize`
- |
- help: you can convert a `u64` to a `usize` and panic if the converted value doesn't fit
- |
- 24 | if layout.align() > bindings::BINDINGS_ARCH_SLAB_MINALIGN.try_into().unwrap() {
- | ++++++++++++++++++++
- error[E0308]: mismatched types
- --> /home/axboe/git/asahi-linux/rust/kernel/allocator.rs:39:66
- |
- 39 | ...fe { bindings::krealloc(ptr as *const core::ffi::c_void, size, flags) a...
- | ------------------ ^^^^ expected `u64`, found `usize`
- | |
- | arguments to this function are incorrect
- |
- note: function defined here
- --> /home/axboe/git/asahi-linux/rust/bindings/bindings_generated.rs:25524:12
- |
- 25524 | pub fn krealloc(
- | ^^^^^^^^
- help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit
- |
- 39 | unsafe { bindings::krealloc(ptr as *const core::ffi::c_void, size.try_into().unwrap(), flags) as *mut u8 }
- | ++++++++++++++++++++
- error[E0308]: mismatched types
- --> /home/axboe/git/asahi-linux/rust/kernel/allocator.rs:46:50
- |
- 46 | ... unsafe { bindings::krealloc(ptr::null(), layout.size(), bindings::GFP...
- | ------------------ ^^^^^^^^^^^^^ expected `u64`, found `usize`
- | |
- | arguments to this function are incorrect
- |
- note: function defined here
- --> /home/axboe/git/asahi-linux/rust/bindings/bindings_generated.rs:25524:12
- |
- 25524 | pub fn krealloc(
- | ^^^^^^^^
- help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit
- |
- 46 | unsafe { bindings::krealloc(ptr::null(), layout.size().try_into().unwrap(), bindings::GFP_KERNEL) as *mut u8 }
- | ++++++++++++++++++++
- error[E0308]: mismatched types
- --> /home/axboe/git/asahi-linux/rust/kernel/dma_fence.rs:460:17
- |
- 458 | bindings::krealloc(
- | ------------------ arguments to this function are incorrect
- 459 | core::ptr::null_mut(),
- 460 | FenceObject::<T>::SIZE,
- | ^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `usize`
- |
- note: function defined here
- --> /home/axboe/git/asahi-linux/rust/bindings/bindings_generated.rs:25524:12
- |
- 25524 | pub fn krealloc(
- | ^^^^^^^^
- help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit
- |
- 460 | FenceObject::<T>::SIZE.try_into().unwrap(),
- | ++++++++++++++++++++
- error[E0308]: mismatched types
- --> /home/axboe/git/asahi-linux/rust/kernel/drm/drv.rs:221:28
- |
- 221 | gem_create_object: T::Object::ALLOC_OPS.gem_create_object,
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `usize`
- |
- = note: expected enum `Option<unsafe extern "C" fn(_, u64) -> _>`
- found enum `Option<unsafe extern "C" fn(_, usize) -> _>`
- error[E0308]: mismatched types
- --> /home/axboe/git/asahi-linux/rust/kernel/drm/gem/shmem.rs:87:47
- |
- 87 | bindings::krealloc(core::ptr::null(), Object::<T>::SIZE, bindings:...
- | ------------------ ^^^^^^^^^^^^^^^^^ expected `u64`, found `usize`
- | |
- | arguments to this function are incorrect
- |
- note: function defined here
- --> /home/axboe/git/asahi-linux/rust/bindings/bindings_generated.rs:25524:12
- |
- 25524 | pub fn krealloc(
- | ^^^^^^^^
- help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit
- |
- 87 | bindings::krealloc(core::ptr::null(), Object::<T>::SIZE.try_into().unwrap(), bindings::GFP_KERNEL)
- | ++++++++++++++++++++
- error[E0308]: mismatched types
- --> /home/axboe/git/asahi-linux/rust/kernel/drm/gem/shmem.rs:165:72
- |
- 165 | ...unsafe { bindings::drm_gem_shmem_create(dev.raw_mut(), size) };
- | ------------------------------ ^^^^ expected `u64`, found `usize`
- | |
- | arguments to this function are incorrect
- |
- note: function defined here
- --> /home/axboe/git/asahi-linux/rust/bindings/bindings_generated.rs:43789:12
- |
- 43789 | pub fn drm_gem_shmem_create(dev: *mut drm_device, size: size_t) -> *mu...
- | ^^^^^^^^^^^^^^^^^^^^
- help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit
- |
- 165 | let p = unsafe { bindings::drm_gem_shmem_create(dev.raw_mut(), size.try_into().unwrap()) };
- | ++++++++++++++++++++
- error[E0308]: mismatched types
- --> /home/axboe/git/asahi-linux/rust/kernel/drm/gem/mod.rs:140:9
- |
- 139 | fn size(&self) -> usize {
- | ----- expected `usize` because of return type
- 140 | self.gem_obj().size
- | ^^^^^^^^^^^^^^^^^^^ expected `usize`, found `u64`
- |
- help: you can convert a `u64` to a `usize` and panic if the converted value doesn't fit
- |
- 140 | self.gem_obj().size.try_into().unwrap()
- | ++++++++++++++++++++
- error[E0308]: mismatched types
- --> /home/axboe/git/asahi-linux/rust/kernel/drm/gem/mod.rs:259:90
- |
- 259 | ... bindings::drm_gem_object_init(dev.raw_mut(), &obj.obj as *const _ as *mut _, si...
- | ----------------------------- arguments to this function are incorrect ^^^^ expected `u64`, found `usize`
- |
- note: function defined here
- --> /home/axboe/git/asahi-linux/rust/bindings/bindings_generated.rs:43499:12
- |
- 43499 | pub fn drm_gem_object_init(
- | ^^^^^^^^^^^^^^^^^^^
- help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit
- |
- 259 | bindings::drm_gem_object_init(dev.raw_mut(), &obj.obj as *const _ as *mut _, size.try_into().unwrap())
- | ++++++++++++++++++++
- error[E0308]: arguments to this function are incorrect
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:158:13
- |
- 158 | (*self.inner_mut().ops).map_pages.unwrap()(
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- ...
- 162 | pgsize,
- | ------ expected `u64`, found `usize`
- 163 | pgcount,
- | ------- expected `u64`, found `usize`
- |
- note: expected `*mut u64`, found `&mut usize`
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:166:17
- |
- 166 | &mut mapped,
- | ^^^^^^^^^^^
- = note: expected raw pointer `*mut u64`
- found mutable reference `&mut usize`
- help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit
- |
- 162 | pgsize.try_into().unwrap(),
- | ++++++++++++++++++++
- help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit
- |
- 163 | pgcount.try_into().unwrap(),
- | ++++++++++++++++++++
- error[E0308]: arguments to this function are incorrect
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:182:13
- |
- 182 | (*self.inner_mut().ops).unmap_pages.unwrap()(
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- ...
- 185 | pgsize,
- | ------ expected `u64`, found `usize`
- 186 | pgcount,
- | ------- expected `u64`, found `usize`
- |
- help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit
- |
- 185 | pgsize.try_into().unwrap(),
- | ++++++++++++++++++++
- help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit
- |
- 186 | pgcount.try_into().unwrap(),
- | ++++++++++++++++++++
- error[E0308]: mismatched types
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:182:13
- |
- 180 | ) -> usize {
- | ----- expected `usize` because of return type
- 181 | unsafe {
- 182 | / (*self.inner_mut().ops).unmap_pages.unwrap()(
- 183 | | self.inner_mut().ops,
- 184 | | iova as u64,
- 185 | | pgsize,
- 186 | | pgcount,
- 187 | | core::ptr::null_mut(),
- 188 | | )
- | |_____________^ expected `usize`, found `u64`
- |
- help: you can convert a `u64` to a `usize` and panic if the converted value doesn't fit
- |
- 188 | ).try_into().unwrap()
- | ++++++++++++++++++++
- error[E0308]: mismatched types
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:38
- |
- 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
- | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
- | |
- | arguments to this enum variant are incorrect
- ...
- 344 | iopt_type!(ARM32LPAES1, ARMLPAES1Cfg, io_pgtable_fmt_ARM_32_LPAE_S1);
- | -------------------------------------------------------------------- in this macro invocation
- |
- = note: expected fn pointer `unsafe extern "C" fn(_, u64, u64, _)`
- found fn item `unsafe extern "C" fn(_, usize, usize, _) {tlb_flush_walk_callback::<T>}`
- = note: when the arguments and return types match, functions can be coerced to function pointers
- help: the type constructed contains `unsafe extern "C" fn(u64, usize, usize, *mut c_void) {tlb_flush_walk_callback::<T>}` due to the type of the argument passed
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:33
- |
- 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
- | ^^^^^----------------------------^
- | |
- | this argument influences the type of `Some`
- ...
- 344 | iopt_type!(ARM32LPAES1, ARMLPAES1Cfg, io_pgtable_fmt_ARM_32_LPAE_S1);
- | -------------------------------------------------------------------- in this macro invocation
- note: tuple variant defined here
- --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
- |
- 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^
- = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
- error[E0308]: mismatched types
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:36
- |
- 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
- | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
- | |
- | arguments to this enum variant are incorrect
- ...
- 344 | iopt_type!(ARM32LPAES1, ARMLPAES1Cfg, io_pgtable_fmt_ARM_32_LPAE_S1);
- | -------------------------------------------------------------------- in this macro invocation
- |
- = note: expected fn pointer `unsafe extern "C" fn(_, _, u64, _)`
- found fn item `unsafe extern "C" fn(_, _, usize, _) {tlb_add_page_callback::<T>}`
- = note: when the arguments and return types match, functions can be coerced to function pointers
- help: the type constructed contains `unsafe extern "C" fn(*mut iommu_iotlb_gather, u64, usize, *mut c_void) {tlb_add_page_callback::<T>}` due to the type of the argument passed
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:31
- |
- 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
- | ^^^^^--------------------------^
- | |
- | this argument influences the type of `Some`
- ...
- 344 | iopt_type!(ARM32LPAES1, ARMLPAES1Cfg, io_pgtable_fmt_ARM_32_LPAE_S1);
- | -------------------------------------------------------------------- in this macro invocation
- note: tuple variant defined here
- --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
- |
- 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^
- = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
- error[E0308]: mismatched types
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:38
- |
- 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
- | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
- | |
- | arguments to this enum variant are incorrect
- ...
- 345 | iopt_type!(ARM32LPAES2, ARMLPAES2Cfg, io_pgtable_fmt_ARM_32_LPAE_S2);
- | -------------------------------------------------------------------- in this macro invocation
- |
- = note: expected fn pointer `unsafe extern "C" fn(_, u64, u64, _)`
- found fn item `unsafe extern "C" fn(_, usize, usize, _) {tlb_flush_walk_callback::<T>}`
- = note: when the arguments and return types match, functions can be coerced to function pointers
- help: the type constructed contains `unsafe extern "C" fn(u64, usize, usize, *mut c_void) {tlb_flush_walk_callback::<T>}` due to the type of the argument passed
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:33
- |
- 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
- | ^^^^^----------------------------^
- | |
- | this argument influences the type of `Some`
- ...
- 345 | iopt_type!(ARM32LPAES2, ARMLPAES2Cfg, io_pgtable_fmt_ARM_32_LPAE_S2);
- | -------------------------------------------------------------------- in this macro invocation
- note: tuple variant defined here
- --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
- |
- 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^
- = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
- error[E0308]: mismatched types
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:36
- |
- 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
- | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
- | |
- | arguments to this enum variant are incorrect
- ...
- 345 | iopt_type!(ARM32LPAES2, ARMLPAES2Cfg, io_pgtable_fmt_ARM_32_LPAE_S2);
- | -------------------------------------------------------------------- in this macro invocation
- |
- = note: expected fn pointer `unsafe extern "C" fn(_, _, u64, _)`
- found fn item `unsafe extern "C" fn(_, _, usize, _) {tlb_add_page_callback::<T>}`
- = note: when the arguments and return types match, functions can be coerced to function pointers
- help: the type constructed contains `unsafe extern "C" fn(*mut iommu_iotlb_gather, u64, usize, *mut c_void) {tlb_add_page_callback::<T>}` due to the type of the argument passed
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:31
- |
- 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
- | ^^^^^--------------------------^
- | |
- | this argument influences the type of `Some`
- ...
- 345 | iopt_type!(ARM32LPAES2, ARMLPAES2Cfg, io_pgtable_fmt_ARM_32_LPAE_S2);
- | -------------------------------------------------------------------- in this macro invocation
- note: tuple variant defined here
- --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
- |
- 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^
- = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
- error[E0308]: mismatched types
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:38
- |
- 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
- | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
- | |
- | arguments to this enum variant are incorrect
- ...
- 346 | iopt_type!(ARM64LPAES1, ARMLPAES1Cfg, io_pgtable_fmt_ARM_64_LPAE_S1);
- | -------------------------------------------------------------------- in this macro invocation
- |
- = note: expected fn pointer `unsafe extern "C" fn(_, u64, u64, _)`
- found fn item `unsafe extern "C" fn(_, usize, usize, _) {tlb_flush_walk_callback::<T>}`
- = note: when the arguments and return types match, functions can be coerced to function pointers
- help: the type constructed contains `unsafe extern "C" fn(u64, usize, usize, *mut c_void) {tlb_flush_walk_callback::<T>}` due to the type of the argument passed
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:33
- |
- 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
- | ^^^^^----------------------------^
- | |
- | this argument influences the type of `Some`
- ...
- 346 | iopt_type!(ARM64LPAES1, ARMLPAES1Cfg, io_pgtable_fmt_ARM_64_LPAE_S1);
- | -------------------------------------------------------------------- in this macro invocation
- note: tuple variant defined here
- --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
- |
- 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^
- = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
- error[E0308]: mismatched types
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:36
- |
- 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
- | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
- | |
- | arguments to this enum variant are incorrect
- ...
- 346 | iopt_type!(ARM64LPAES1, ARMLPAES1Cfg, io_pgtable_fmt_ARM_64_LPAE_S1);
- | -------------------------------------------------------------------- in this macro invocation
- |
- = note: expected fn pointer `unsafe extern "C" fn(_, _, u64, _)`
- found fn item `unsafe extern "C" fn(_, _, usize, _) {tlb_add_page_callback::<T>}`
- = note: when the arguments and return types match, functions can be coerced to function pointers
- help: the type constructed contains `unsafe extern "C" fn(*mut iommu_iotlb_gather, u64, usize, *mut c_void) {tlb_add_page_callback::<T>}` due to the type of the argument passed
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:31
- |
- 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
- | ^^^^^--------------------------^
- | |
- | this argument influences the type of `Some`
- ...
- 346 | iopt_type!(ARM64LPAES1, ARMLPAES1Cfg, io_pgtable_fmt_ARM_64_LPAE_S1);
- | -------------------------------------------------------------------- in this macro invocation
- note: tuple variant defined here
- --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
- |
- 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^
- = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
- error[E0308]: mismatched types
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:38
- |
- 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
- | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
- | |
- | arguments to this enum variant are incorrect
- ...
- 347 | iopt_type!(ARM64LPAES2, ARMLPAES2Cfg, io_pgtable_fmt_ARM_64_LPAE_S2);
- | -------------------------------------------------------------------- in this macro invocation
- |
- = note: expected fn pointer `unsafe extern "C" fn(_, u64, u64, _)`
- found fn item `unsafe extern "C" fn(_, usize, usize, _) {tlb_flush_walk_callback::<T>}`
- = note: when the arguments and return types match, functions can be coerced to function pointers
- help: the type constructed contains `unsafe extern "C" fn(u64, usize, usize, *mut c_void) {tlb_flush_walk_callback::<T>}` due to the type of the argument passed
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:33
- |
- 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
- | ^^^^^----------------------------^
- | |
- | this argument influences the type of `Some`
- ...
- 347 | iopt_type!(ARM64LPAES2, ARMLPAES2Cfg, io_pgtable_fmt_ARM_64_LPAE_S2);
- | -------------------------------------------------------------------- in this macro invocation
- note: tuple variant defined here
- --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
- |
- 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^
- = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
- error[E0308]: mismatched types
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:36
- |
- 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
- | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
- | |
- | arguments to this enum variant are incorrect
- ...
- 347 | iopt_type!(ARM64LPAES2, ARMLPAES2Cfg, io_pgtable_fmt_ARM_64_LPAE_S2);
- | -------------------------------------------------------------------- in this macro invocation
- |
- = note: expected fn pointer `unsafe extern "C" fn(_, _, u64, _)`
- found fn item `unsafe extern "C" fn(_, _, usize, _) {tlb_add_page_callback::<T>}`
- = note: when the arguments and return types match, functions can be coerced to function pointers
- help: the type constructed contains `unsafe extern "C" fn(*mut iommu_iotlb_gather, u64, usize, *mut c_void) {tlb_add_page_callback::<T>}` due to the type of the argument passed
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:31
- |
- 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
- | ^^^^^--------------------------^
- | |
- | this argument influences the type of `Some`
- ...
- 347 | iopt_type!(ARM64LPAES2, ARMLPAES2Cfg, io_pgtable_fmt_ARM_64_LPAE_S2);
- | -------------------------------------------------------------------- in this macro invocation
- note: tuple variant defined here
- --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
- |
- 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^
- = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
- error[E0308]: mismatched types
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:38
- |
- 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
- | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
- | |
- | arguments to this enum variant are incorrect
- ...
- 348 | iopt_type!(ARMv7S, ARMv7SCfg, io_pgtable_fmt_ARM_V7S);
- | ----------------------------------------------------- in this macro invocation
- |
- = note: expected fn pointer `unsafe extern "C" fn(_, u64, u64, _)`
- found fn item `unsafe extern "C" fn(_, usize, usize, _) {tlb_flush_walk_callback::<T>}`
- = note: when the arguments and return types match, functions can be coerced to function pointers
- help: the type constructed contains `unsafe extern "C" fn(u64, usize, usize, *mut c_void) {tlb_flush_walk_callback::<T>}` due to the type of the argument passed
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:33
- |
- 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
- | ^^^^^----------------------------^
- | |
- | this argument influences the type of `Some`
- ...
- 348 | iopt_type!(ARMv7S, ARMv7SCfg, io_pgtable_fmt_ARM_V7S);
- | ----------------------------------------------------- in this macro invocation
- note: tuple variant defined here
- --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
- |
- 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^
- = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
- error[E0308]: mismatched types
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:36
- |
- 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
- | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
- | |
- | arguments to this enum variant are incorrect
- ...
- 348 | iopt_type!(ARMv7S, ARMv7SCfg, io_pgtable_fmt_ARM_V7S);
- | ----------------------------------------------------- in this macro invocation
- |
- = note: expected fn pointer `unsafe extern "C" fn(_, _, u64, _)`
- found fn item `unsafe extern "C" fn(_, _, usize, _) {tlb_add_page_callback::<T>}`
- = note: when the arguments and return types match, functions can be coerced to function pointers
- help: the type constructed contains `unsafe extern "C" fn(*mut iommu_iotlb_gather, u64, usize, *mut c_void) {tlb_add_page_callback::<T>}` due to the type of the argument passed
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:31
- |
- 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
- | ^^^^^--------------------------^
- | |
- | this argument influences the type of `Some`
- ...
- 348 | iopt_type!(ARMv7S, ARMv7SCfg, io_pgtable_fmt_ARM_V7S);
- | ----------------------------------------------------- in this macro invocation
- note: tuple variant defined here
- --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
- |
- 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^
- = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
- error[E0308]: mismatched types
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:38
- |
- 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
- | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
- | |
- | arguments to this enum variant are incorrect
- ...
- 349 | iopt_type!(ARMMaliLPAE, ARMMaliLPAECfg, io_pgtable_fmt_ARM_MALI_LPAE);
- | --------------------------------------------------------------------- in this macro invocation
- |
- = note: expected fn pointer `unsafe extern "C" fn(_, u64, u64, _)`
- found fn item `unsafe extern "C" fn(_, usize, usize, _) {tlb_flush_walk_callback::<T>}`
- = note: when the arguments and return types match, functions can be coerced to function pointers
- help: the type constructed contains `unsafe extern "C" fn(u64, usize, usize, *mut c_void) {tlb_flush_walk_callback::<T>}` due to the type of the argument passed
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:33
- |
- 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
- | ^^^^^----------------------------^
- | |
- | this argument influences the type of `Some`
- ...
- 349 | iopt_type!(ARMMaliLPAE, ARMMaliLPAECfg, io_pgtable_fmt_ARM_MALI_LPAE);
- | --------------------------------------------------------------------- in this macro invocation
- note: tuple variant defined here
- --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
- |
- 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^
- = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
- error[E0308]: mismatched types
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:36
- |
- 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
- | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
- | |
- | arguments to this enum variant are incorrect
- ...
- 349 | iopt_type!(ARMMaliLPAE, ARMMaliLPAECfg, io_pgtable_fmt_ARM_MALI_LPAE);
- | --------------------------------------------------------------------- in this macro invocation
- |
- = note: expected fn pointer `unsafe extern "C" fn(_, _, u64, _)`
- found fn item `unsafe extern "C" fn(_, _, usize, _) {tlb_add_page_callback::<T>}`
- = note: when the arguments and return types match, functions can be coerced to function pointers
- help: the type constructed contains `unsafe extern "C" fn(*mut iommu_iotlb_gather, u64, usize, *mut c_void) {tlb_add_page_callback::<T>}` due to the type of the argument passed
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:31
- |
- 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
- | ^^^^^--------------------------^
- | |
- | this argument influences the type of `Some`
- ...
- 349 | iopt_type!(ARMMaliLPAE, ARMMaliLPAECfg, io_pgtable_fmt_ARM_MALI_LPAE);
- | --------------------------------------------------------------------- in this macro invocation
- note: tuple variant defined here
- --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
- |
- 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^
- = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
- error[E0308]: mismatched types
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:38
- |
- 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
- | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
- | |
- | arguments to this enum variant are incorrect
- ...
- 350 | iopt_type!(AMDIOMMUV1, (), io_pgtable_fmt_AMD_IOMMU_V1);
- | ------------------------------------------------------- in this macro invocation
- |
- = note: expected fn pointer `unsafe extern "C" fn(_, u64, u64, _)`
- found fn item `unsafe extern "C" fn(_, usize, usize, _) {tlb_flush_walk_callback::<T>}`
- = note: when the arguments and return types match, functions can be coerced to function pointers
- help: the type constructed contains `unsafe extern "C" fn(u64, usize, usize, *mut c_void) {tlb_flush_walk_callback::<T>}` due to the type of the argument passed
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:33
- |
- 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
- | ^^^^^----------------------------^
- | |
- | this argument influences the type of `Some`
- ...
- 350 | iopt_type!(AMDIOMMUV1, (), io_pgtable_fmt_AMD_IOMMU_V1);
- | ------------------------------------------------------- in this macro invocation
- note: tuple variant defined here
- --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
- |
- 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^
- = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
- error[E0308]: mismatched types
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:36
- |
- 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
- | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
- | |
- | arguments to this enum variant are incorrect
- ...
- 350 | iopt_type!(AMDIOMMUV1, (), io_pgtable_fmt_AMD_IOMMU_V1);
- | ------------------------------------------------------- in this macro invocation
- |
- = note: expected fn pointer `unsafe extern "C" fn(_, _, u64, _)`
- found fn item `unsafe extern "C" fn(_, _, usize, _) {tlb_add_page_callback::<T>}`
- = note: when the arguments and return types match, functions can be coerced to function pointers
- help: the type constructed contains `unsafe extern "C" fn(*mut iommu_iotlb_gather, u64, usize, *mut c_void) {tlb_add_page_callback::<T>}` due to the type of the argument passed
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:31
- |
- 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
- | ^^^^^--------------------------^
- | |
- | this argument influences the type of `Some`
- ...
- 350 | iopt_type!(AMDIOMMUV1, (), io_pgtable_fmt_AMD_IOMMU_V1);
- | ------------------------------------------------------- in this macro invocation
- note: tuple variant defined here
- --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
- |
- 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^
- = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
- error[E0308]: mismatched types
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:38
- |
- 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
- | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
- | |
- | arguments to this enum variant are incorrect
- ...
- 351 | iopt_type!(AppleDART, AppleDARTCfg, io_pgtable_fmt_APPLE_DART);
- | -------------------------------------------------------------- in this macro invocation
- |
- = note: expected fn pointer `unsafe extern "C" fn(_, u64, u64, _)`
- found fn item `unsafe extern "C" fn(_, usize, usize, _) {tlb_flush_walk_callback::<T>}`
- = note: when the arguments and return types match, functions can be coerced to function pointers
- help: the type constructed contains `unsafe extern "C" fn(u64, usize, usize, *mut c_void) {tlb_flush_walk_callback::<T>}` due to the type of the argument passed
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:33
- |
- 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
- | ^^^^^----------------------------^
- | |
- | this argument influences the type of `Some`
- ...
- 351 | iopt_type!(AppleDART, AppleDARTCfg, io_pgtable_fmt_APPLE_DART);
- | -------------------------------------------------------------- in this macro invocation
- note: tuple variant defined here
- --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
- |
- 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^
- = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
- error[E0308]: mismatched types
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:36
- |
- 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
- | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
- | |
- | arguments to this enum variant are incorrect
- ...
- 351 | iopt_type!(AppleDART, AppleDARTCfg, io_pgtable_fmt_APPLE_DART);
- | -------------------------------------------------------------- in this macro invocation
- |
- = note: expected fn pointer `unsafe extern "C" fn(_, _, u64, _)`
- found fn item `unsafe extern "C" fn(_, _, usize, _) {tlb_add_page_callback::<T>}`
- = note: when the arguments and return types match, functions can be coerced to function pointers
- help: the type constructed contains `unsafe extern "C" fn(*mut iommu_iotlb_gather, u64, usize, *mut c_void) {tlb_add_page_callback::<T>}` due to the type of the argument passed
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:31
- |
- 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
- | ^^^^^--------------------------^
- | |
- | this argument influences the type of `Some`
- ...
- 351 | iopt_type!(AppleDART, AppleDARTCfg, io_pgtable_fmt_APPLE_DART);
- | -------------------------------------------------------------- in this macro invocation
- note: tuple variant defined here
- --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
- |
- 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^
- = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
- error[E0308]: mismatched types
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:38
- |
- 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
- | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
- | |
- | arguments to this enum variant are incorrect
- ...
- 352 | iopt_type!(AppleDART2, AppleDARTCfg, io_pgtable_fmt_APPLE_DART2);
- | ---------------------------------------------------------------- in this macro invocation
- |
- = note: expected fn pointer `unsafe extern "C" fn(_, u64, u64, _)`
- found fn item `unsafe extern "C" fn(_, usize, usize, _) {tlb_flush_walk_callback::<T>}`
- = note: when the arguments and return types match, functions can be coerced to function pointers
- help: the type constructed contains `unsafe extern "C" fn(u64, usize, usize, *mut c_void) {tlb_flush_walk_callback::<T>}` due to the type of the argument passed
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:33
- |
- 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
- | ^^^^^----------------------------^
- | |
- | this argument influences the type of `Some`
- ...
- 352 | iopt_type!(AppleDART2, AppleDARTCfg, io_pgtable_fmt_APPLE_DART2);
- | ---------------------------------------------------------------- in this macro invocation
- note: tuple variant defined here
- --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
- |
- 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^
- = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
- error[E0308]: mismatched types
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:36
- |
- 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
- | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
- | |
- | arguments to this enum variant are incorrect
- ...
- 352 | iopt_type!(AppleDART2, AppleDARTCfg, io_pgtable_fmt_APPLE_DART2);
- | ---------------------------------------------------------------- in this macro invocation
- |
- = note: expected fn pointer `unsafe extern "C" fn(_, _, u64, _)`
- found fn item `unsafe extern "C" fn(_, _, usize, _) {tlb_add_page_callback::<T>}`
- = note: when the arguments and return types match, functions can be coerced to function pointers
- help: the type constructed contains `unsafe extern "C" fn(*mut iommu_iotlb_gather, u64, usize, *mut c_void) {tlb_add_page_callback::<T>}` due to the type of the argument passed
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:31
- |
- 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
- | ^^^^^--------------------------^
- | |
- | this argument influences the type of `Some`
- ...
- 352 | iopt_type!(AppleDART2, AppleDARTCfg, io_pgtable_fmt_APPLE_DART2);
- | ---------------------------------------------------------------- in this macro invocation
- note: tuple variant defined here
- --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
- |
- 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^
- = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
- error[E0308]: mismatched types
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:38
- |
- 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
- | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
- | |
- | arguments to this enum variant are incorrect
- ...
- 353 | iopt_type!(AppleUAT, AppleUATCfg, io_pgtable_fmt_APPLE_UAT);
- | ----------------------------------------------------------- in this macro invocation
- |
- = note: expected fn pointer `unsafe extern "C" fn(_, u64, u64, _)`
- found fn item `unsafe extern "C" fn(_, usize, usize, _) {tlb_flush_walk_callback::<T>}`
- = note: when the arguments and return types match, functions can be coerced to function pointers
- help: the type constructed contains `unsafe extern "C" fn(u64, usize, usize, *mut c_void) {tlb_flush_walk_callback::<T>}` due to the type of the argument passed
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:33
- |
- 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
- | ^^^^^----------------------------^
- | |
- | this argument influences the type of `Some`
- ...
- 353 | iopt_type!(AppleUAT, AppleUATCfg, io_pgtable_fmt_APPLE_UAT);
- | ----------------------------------------------------------- in this macro invocation
- note: tuple variant defined here
- --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
- |
- 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^
- = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
- error[E0308]: mismatched types
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:36
- |
- 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
- | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
- | |
- | arguments to this enum variant are incorrect
- ...
- 353 | iopt_type!(AppleUAT, AppleUATCfg, io_pgtable_fmt_APPLE_UAT);
- | ----------------------------------------------------------- in this macro invocation
- |
- = note: expected fn pointer `unsafe extern "C" fn(_, _, u64, _)`
- found fn item `unsafe extern "C" fn(_, _, usize, _) {tlb_add_page_callback::<T>}`
- = note: when the arguments and return types match, functions can be coerced to function pointers
- help: the type constructed contains `unsafe extern "C" fn(*mut iommu_iotlb_gather, u64, usize, *mut c_void) {tlb_add_page_callback::<T>}` due to the type of the argument passed
- --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:31
- |
- 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
- | ^^^^^--------------------------^
- | |
- | this argument influences the type of `Some`
- ...
- 353 | iopt_type!(AppleUAT, AppleUATCfg, io_pgtable_fmt_APPLE_UAT);
- | ----------------------------------------------------------- in this macro invocation
- note: tuple variant defined here
- --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
- |
- 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^^^
- = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
- error[E0308]: mismatched types
- --> /home/axboe/git/asahi-linux/rust/kernel/siphash.rs:37:77
- |
- 37 | ...safe { bindings::siphash(bytes.as_ptr() as *const _, bytes.len(), &key) };
- | ----------------- ^^^^^^^^^^^ expected `u64`, found `usize`
- | |
- | arguments to this function are incorrect
- |
- note: function defined here
- --> /home/axboe/git/asahi-linux/rust/bindings/bindings_helpers_generated.rs:77:12
- |
- 77 | pub fn siphash(
- | ^^^^^^^
- help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit
- |
- 37 | self.state = unsafe { bindings::siphash(bytes.as_ptr() as *const _, bytes.len().try_into().unwrap(), &key) };
- | ++++++++++++++++++++
- error[E0308]: mismatched types
- --> /home/axboe/git/asahi-linux/rust/kernel/soc/apple/rtkit.rs:128:17
- |
- 124 | T::shmem_map(
- | ------------ arguments to this function are incorrect
- ...
- 128 | bfr_mut.size,
- | ^^^^^^^^^^^^ expected `usize`, found `u64`
- |
- note: associated function defined here
- --> /home/axboe/git/asahi-linux/rust/kernel/soc/apple/rtkit.rs:73:8
- |
- 73 | fn shmem_map(
- | ^^^^^^^^^
- ...
- 76 | _size: usize,
- | ------------
- help: you can convert a `u64` to a `usize` and panic if the converted value doesn't fit
- |
- 128 | bfr_mut.size.try_into().unwrap(),
- | ++++++++++++++++++++
- error[E0308]: mismatched types
- --> /home/axboe/git/asahi-linux/rust/kernel/soc/apple/rtkit.rs:133:64
- |
- 133 | T::shmem_alloc(unsafe { T::Data::borrow(cookie) }, bfr_mut.size)?
- | -------------- ^^^^^^^^^^^^ expected `usize`, found `u64`
- | |
- | arguments to this function are incorrect
- |
- note: associated function defined here
- --> /home/axboe/git/asahi-linux/rust/kernel/soc/apple/rtkit.rs:65:8
- |
- 65 | fn shmem_alloc(
- | ^^^^^^^^^^^
- 66 | _data: <Self::Data as ForeignOwnable>::Borrowed<'_>,
- 67 | _size: usize,
- | ------------
- help: you can convert a `u64` to a `usize` and panic if the converted value doesn't fit
- |
- 133 | T::shmem_alloc(unsafe { T::Data::borrow(cookie) }, bfr_mut.size.try_into().unwrap())?
- | ++++++++++++++++++++
- error[E0308]: mismatched types
- --> /home/axboe/git/asahi-linux/rust/kernel/soc/apple/rtkit.rs:139:26
- |
- 139 | if slice.len() < bfr_mut.size {
- | ----------- ^^^^^^^^^^^^ expected `usize`, found `u64`
- | |
- | expected because this is `usize`
- |
- help: you can convert a `u64` to a `usize` and panic if the converted value doesn't fit
- |
- 139 | if slice.len() < bfr_mut.size.try_into().unwrap() {
- | ++++++++++++++++++++
- error: aborting due to 36 previous errors
- For more information about this error, try `rustc --explain E0308`.
- make[2]: *** [rust/Makefile:428: rust/kernel.o] Error 1
- make[1]: *** [/home/axboe/git/asahi-linux/Makefile:1293: prepare] Error 2
- make: *** [Makefile:234: __sub-make] Error 2
Advertisement
Add Comment
Please, Sign In to add comment