We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Adding the #[lang="exchange_malloc"] directive to a function causes an assertion failure in the compiler. Tested with the latest version (746d086)
#[lang="exchange_malloc"]
$ cat ex.rs #![no_std] #![no_main] #[no_split_stack] #[no_mangle] pub fn thing()->int { let y = box 10; 0 } #[lang="exchange_malloc"] pub fn malloc(size: uint) -> *mut u8 { 0 as *mut u8 } $ rustc --crate-type=lib ex.rs ex.rs:7:6: 7:7 warning: unused variable: `y`, #[warn(unused_variable)] on by default ex.rs:7 let y = box 10; ^ ex.rs:12:15: 12:19 warning: unused variable: `size`, #[warn(unused_variable)] on by default ex.rs:12 pub fn malloc(size: uint) -> *mut u8 { ^~~~ Assertion failed: ((Args.size() == FTy->getNumParams() || (FTy->isVarArg() && Args.size() > FTy->getNumParams())) && "Calling a function with bad signature!"), function init, file /<redacted>/rust/src/llvm/lib/IR/Instructions.cpp, line 276. zsh: abort ~/rust/bin/rustc --crate-type=lib ex.rs zsh: abort rustc --crate-type=lib ex.rs
The text was updated successfully, but these errors were encountered:
Closing, it was changed recently to take an align parameter as well:
align
#[lang="exchange_malloc"] pub fn malloc(size: uint, align: uint) -> *mut u8 { /* ... */ }
Making this a first class error is covered by #9307
Sorry, something went wrong.
Consecutive returns dont decrease cognitive Complexity level anymore (r…
b157411
…ust-lang#14460) changelog: [`cognitive_complexity`]: Consecutive return calls decreased complexity level of the function by 1. fixes rust-lang/rust-clippy#14422
No branches or pull requests
Adding the
#[lang="exchange_malloc"]
directive to a function causes an assertion failure in the compiler. Tested with the latest version (746d086)The text was updated successfully, but these errors were encountered: