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

Warning for vecname(0) could be more helpful #657

Closed
jdm opened this issue Jul 11, 2011 · 1 comment
Closed

Warning for vecname(0) could be more helpful #657

jdm opened this issue Jul 11, 2011 · 1 comment

Comments

@jdm
Copy link
Contributor

jdm commented Jul 11, 2011

I find it easy to leave out the indexing operator. It would be nice if we could use a heuristic to detect this and display a better warning than the current "mismatched types: expected function or native function but found vec[uint]".

@marijnh
Copy link
Contributor

marijnh commented Jul 11, 2011

This will be a non-issue once we move to [] indexing, which should be pretty soon. I don't think extra clever error messages are worth it for this short period.

@marijnh marijnh closed this as completed Jul 11, 2011
frewsxcv added a commit to frewsxcv/rust that referenced this issue Sep 15, 2017
pdietl pushed a commit to pdietl/rust that referenced this issue Apr 23, 2020
Add reference for attributes in function parameters
ZuseZ4 added a commit to EnzymeAD/rust that referenced this issue Mar 7, 2023
* closes rust-lang#657

* Handle vector case

* adding test

* remove test until further bugfixes
celinval added a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
…-lang#657)

* Introduce rmc::any and rmc::any_raw and deprecate rmc::nondet

We decided to replace the old method rmc::nondet because its behavior
wasn't clear. For some types it would respect the type invariants but
not for others. Additionally, there was no way for the user to specify
how to create safe non-deterministic values.

Users will be able to control how RMC generate symbolic values to their
variables.

- `rmc::any::<T>()` will provide a safe way to generate values
that respect any invariant specified to type T (Given by the
implementation of Arbitrary trait.)

- `rmc::any_raw::<T>()` will provide any possible bit value for the
memory layout of the type. This is an unsafe method and users must
ensure correctness after this call.

Co-authored-by: Zyad Hassan <[email protected]>
Co-authored-by: Adrian Palacios <[email protected]>
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