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

Reduce keyword list to something more reasonable, hopefully "finished" #3324

Closed
graydon opened this issue Aug 31, 2012 · 6 comments
Closed
Assignees
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup.
Milestone

Comments

@graydon
Copy link
Contributor

graydon commented Aug 31, 2012

There are still lots of vestigial keywords. We should get this as close to a fixed-set for good as we can.

@ghost ghost assigned brson Aug 31, 2012
@graydon
Copy link
Contributor Author

graydon commented Aug 31, 2012

In particular, again becomes loop (executive fiat; writing again has been a "wince-every-time" experience), remove as many as possible of module, import, export, check, new, owned, send, drop, static, of, with and to, and turn log, assert and fail into built-in macros (that is: log! and assert! and fail!) that call intrinsics that, at present, do what the statements do. And make all remaining "contextual" keywords into normal (restricted everywhere) keywords.

@brson
Copy link
Contributor

brson commented Sep 18, 2012

Status update: unsafe is the only non-strict keyword now, and I still expect that to be fixed in 0.4. export is still in and I don't expect to be able to remove it. assert, log and fail are still in and I am not planning on converting them to macros for 0.4.

@graydon
Copy link
Contributor Author

graydon commented Sep 19, 2012

I'll have a go at export today and tomorrow, see if it can go too.

@brson
Copy link
Contributor

brson commented Sep 20, 2012

unsafe is a real keyword now. There are no more 'restricted' keywords.

@bstrie
Copy link
Contributor

bstrie commented Sep 22, 2012

Is const likely to go from keyword to trait?

@brson
Copy link
Contributor

brson commented Sep 29, 2012

The fate of const is uncertain still. Closing this. Will open a new one for the macro conversions.

@brson brson closed this as completed Sep 29, 2012
tesuji pushed a commit to tesuji/rustc that referenced this issue Jun 9, 2020
let_and_return: avoid "does not live long enough" errors

EDIT: Add rust-lang#3324 to the list of fixes

<details>
<summary>Description of old impl</summary>
<br>
Avoid suggesting turning the RHS expression of the last statement into the block tail expression if a temporary borrows from a local that would be destroyed before.

This is my first incursion into MIR so there's probably room for improvement!
</details>

Avoid linting if the return type of some method or function called in the last statement has a lifetime parameter.

changelog: Fix false positive in [`let_and_return`]

Fixes rust-lang#3792
Fixes rust-lang#3324
jaisnan pushed a commit to jaisnan/rust-dev that referenced this issue Jul 29, 2024
… memory initialization is checked (rust-lang#3332)

This PR introduces layout checks for types to instrument mutable pointer
casts. If two types have incompatible padding (e.g. a padding byte in
one is a data byte in the other or vice-versa), an "unsupported check"
assertion is inserted. This overapproximates for soundness, since the
casts do not cause UB themselves, but an alternative solution involves
tracking every MIR place, which is costly.

Resolves rust-lang#3324

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.
jaisnan pushed a commit to jaisnan/rust-dev that referenced this issue Jul 29, 2024
…t-lang#3338)

This PR addresses another aspect of rust-lang#3324, where delayed UB could be
caused by transmuting a mutable pointer into the one of incompatible
padding. It also adds a check to error whenever transmuting between two
types of incompatible padding.

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.
jaisnan pushed a commit to jaisnan/rust-dev that referenced this issue Jul 29, 2024
This PR adds basic support for global transformations, which will be
useful to implement full support of rust-lang#3324

Changes:
- Add edge annotations to the call graph
- Implement global transformation pass infrastructure
- Implement `dump_mir` as a global transformation pass

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.

---------

Co-authored-by: Celina G. Val <celinval@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup.
Projects
None yet
Development

No branches or pull requests

3 participants