Skip to content

Add fallible allocation methods#325

Closed
nbdd0121 wants to merge 1 commit intoRust-for-Linux:rustfrom
nbdd0121:fallible
Closed

Add fallible allocation methods#325
nbdd0121 wants to merge 1 commit intoRust-for-Linux:rustfrom
nbdd0121:fallible

Conversation

@nbdd0121
Copy link
Copy Markdown
Member

@nbdd0121 nbdd0121 commented Jun 1, 2021

These are all fallible alternatives to all currently used methods that may perform infallible allocation.

assume_fallible is a semantically marker function to denote that we have proved that the closure passed to it will not perform infallible allocation.

After this change, the code can be verified to not perform any infallible allocation using the tool I have just completed: https://github.com/nbdd0121/klint
(you can try the tool on Linux repo by rustup run nightly make CLIPPY_DRIVER=klint CLIPPY=1, beware it's quite noisy when compiling libmacros!)

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants