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

Instantiating the type parameters of a function without calling it fails in LLVM #523

Closed
paulstansifer opened this issue Jun 20, 2011 · 1 comment

Comments

@paulstansifer
Copy link
Contributor

fn f1[T](int x) {
  log x;
}

fn main() {
  auto f2 = f1[str];
}

results in
rustc: Instructions.cpp:962: void llvm::StoreInst::AssertOK(): Assertion `getOperand(0)->getType() == cast(getOperand(1)->getType())->getElementType() && "Ptr must be a pointer to Val type!"' failed.

@catamorphism
Copy link
Contributor

Dup of Issue #333

keeperofdakeys pushed a commit to keeperofdakeys/rust that referenced this issue Dec 12, 2017
posix definitions should be used on Solaris

For compatibility reasons, Solaris historically had its header files
setup so that, unless specifically requested through specific header
defines, either the old pre-POSIX interfaces or POSIX.1c Draft 6
interfaces were used. However, in the case of rust, since these symbols
are linked directly instead of via system header files, the underlying
posix symbol name can be used directly instead.

These definitions should be corrected to match what they do on almost
every other platform.

Be aware this is a breaking change in terms of interface for any crates
/ consumers of these interfaces for Solaris.

Fixes rust-lang#522
ZuseZ4 pushed a commit to EnzymeAD/rust that referenced this issue Mar 7, 2023
celinval added a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
)

This changes the compilation to use crate type lib instead of binary when
we are running rmc on a single .rs file. This allow us to use
any public function as a verification target.

We have also changed the tests to use pub main so it is exported and it
can be used as the entry point of the proof.

Fix cargo-rmc and the current testcase to support library build.
GuillaumeGomez pushed a commit to GuillaumeGomez/rust that referenced this issue Jul 10, 2024
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

No branches or pull requests

2 participants