-
Notifications
You must be signed in to change notification settings - Fork 479
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
const
expression can borrow static items
#1610
Open
dingxiangfei2009
wants to merge
11
commits into
rust-lang:master
Choose a base branch
from
dingxiangfei2009:const-ref-to-static
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
const
expression can borrow static items
#1610
dingxiangfei2009
wants to merge
11
commits into
rust-lang:master
from
dingxiangfei2009:const-ref-to-static
Commits on Oct 9, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 703e3d4 - Browse repository at this point
Copy the full SHA 703e3d4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1462eda - Browse repository at this point
Copy the full SHA 1462edaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0b8ced4 - Browse repository at this point
Copy the full SHA 0b8ced4View commit details -
Co-authored-by: Eric Huss <eric@huss.org>
Configuration menu - View commit details
-
Copy full SHA for d8a53df - Browse repository at this point
Copy the full SHA d8a53dfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9af6601 - Browse repository at this point
Copy the full SHA 9af6601View commit details -
This removes some content for const_refs_to_static which seems to duplicate content elsewhere. In particular: * Remove the examples of allowed use of `static` in `const_eval.md`. We don't show examples for any of the other permitted uses. Additionally, I believe the other points in the list already cover concerns such as interior mutability (and possibly more precise way, since the existing content mentions things like transient places). * I think a single statement that reads of `extern` statics is sufficient to follow the pattern of all the other allowed behaviors. * Removed the examples from the `constant-items.md` chapter about allowing use of `static`s. Again, we generally don't duplicate what is allowed unless there is some explicit statement indicating that it is not. Also, I am reluctant to duplicate what is allowed between `const_eval.md` and `constant-items.md`.
Configuration menu - View commit details
-
Copy full SHA for 97abd04 - Browse repository at this point
Copy the full SHA 97abd04View commit details -
Configuration menu - View commit details
-
Copy full SHA for 68fb8b8 - Browse repository at this point
Copy the full SHA 68fb8b8View commit details -
Clarify wording of the
Sync
requirement for an immutable staticAdditionally, this drops the statement that all access is "safe" since there isn't anything that would imply that it is unsafe.
Configuration menu - View commit details
-
Copy full SHA for 73de72e - Browse repository at this point
Copy the full SHA 73de72eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8b01b71 - Browse repository at this point
Copy the full SHA 8b01b71View commit details
Commits on Oct 12, 2024
-
Configuration menu - View commit details
-
Copy full SHA for e8c43a6 - Browse repository at this point
Copy the full SHA e8c43a6View commit details
Commits on Oct 13, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 36c84b0 - Browse repository at this point
Copy the full SHA 36c84b0View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.