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

Compilation Error #2

Closed
farooquiumar27 opened this issue Oct 21, 2024 · 0 comments · Fixed by #3
Closed

Compilation Error #2

farooquiumar27 opened this issue Oct 21, 2024 · 0 comments · Fixed by #3

Comments

@farooquiumar27
Copy link

I cannot test your DB.
I have type this and
rustc +nightly --version
rustc 1.84.0-nightly (e92993dbb 2024-10-18)
And its showing me three 3 errors.
1 -> error[E0308]: mismatched types
--> src\paging\cache.rs:400:31
|
400 | .get_many_mut(frame_ids.map(|frame_id| *frame_id))
| ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected [usize; _], found Option<usize>
| |
| arguments to this method are incorrect
|
= note: expected array [usize; _]
found enum Option<usize>
note: method defined here
--> /rustc/e92993dbb43f0a5d17fe56e2d82f90435d6521c8\library\core\src\slice\mod.rs:4518:12

2 -> error[E0308]: mismatched types
--> src\paging\cache.rs:398:9
|
397 | ) -> Option<[&mut MemPage; N]> {
| ------------------------- expected Option<[&mut MemPage; N]> because of return type
398 | / self.pages.get_many_mut(pages.each_ref()).map(|frame_ids| {
399 | | self.buffer
400 | | .get_many_mut(frame_ids.map(|frame_id| *frame_id))
401 | | .unwrap()
... |
405 | | })
406 | | })
| |__________^ expected Option<[&mut MemPage; N]>, found [[&mut MemPage; _]; N]
|
= note: expected enum Option<[&mut MemPage; N]>
found array [[&mut MemPage; _]; N]

3 -> error[E0658]: use of unstable library feature 'pointer_is_aligned_to'
--> src\storage\page.rs:346:21
|
346 | pointer.is_aligned_to(CELL_ALIGNMENT),
| ^^^^^^^^^^^^^
|
= note: see issue #96284 rust-lang/rust#96284 for more information
= help: add #![feature(pointer_is_aligned_to)] to the crate attributes to enable
= note: this compiler was built on 2024-10-18; consider upgrading it if it is out of date

-------------------------------------------------Please fix the issues--------------------------------------------------------------

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