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

Allow mutable slices in mutable static items #12742

Merged
merged 2 commits into from
Mar 17, 2014

Conversation

flaper87
Copy link
Contributor

@flaper87 flaper87 commented Mar 6, 2014

This PR enables the use of mutable slices in mutable static items. The work was started by @xales and I added a follow-up commit that moves the immutable restriction to the recently added check_static

Closes #11411

xales and others added 2 commits March 6, 2014 22:50
This is a follow-up patch that moves the mut slice check to the recently
added `check_static`

Closes rust-lang#11411
@flaper87
Copy link
Contributor Author

flaper87 commented Mar 6, 2014

@nikomatsakis r?

@nikomatsakis
Copy link
Contributor

That said, I'm not opposed to land this, and adding this issue to the RFC that I ought to write. Eventually we may want to straighten it out but in the meantime it affords the ability to have mut slices in static muts at least.

bors added a commit that referenced this pull request Mar 17, 2014
…nikomatsakis

This PR enables the use of mutable slices in *mutable* static items. The work was started by @xales and I added a follow-up commit that moves the *immutable* restriction to the recently added `check_static`

Closes #11411
@bors bors closed this Mar 17, 2014
@bors bors merged commit abfc6db into rust-lang:master Mar 17, 2014
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 25, 2022
…-keys, r=Veykril

Fix obsolete config keys

The config keys were drastically reorganized by rust-lang#12010, but the docs don't reflect the updates, causing inconsistency and confusion.  I checked for such obsolete configuration keys and updated to the new one.  For reproducibility, I attach a small shell script that I used to examine the old keys.  Now the script only detects `cargoExtraArgs` and `overrideCargo`, which originates from other type definition in the code but not from the configuration.

<details><summary>script</summary>

```bash
echo "allowMergingIntoGlobImports
exprFillDefault
importEnforceGranularity
importGranularity
importMergeBehavior
importMergeBehaviour
importGroup
importPrefix
warmup
loadOutDirsFromCheck
runBuildScripts
runBuildScriptsCommand
useRustcWrapperForBuildScripts
enableExperimental
procAttrMacros
breakPoints
exitPoints
yieldPoints
linksInHover
linksInHover
gotoTypeDef
chainingHints
closureReturnTypeHints
hideNamedConstructorHints
parameterHints
reborrowHints
typeHints
lruCapacity
cargoExtraArgs
overrideCargo
rustcSource
enableRangeFormatting
assist\.allowMergingIntoGlobImports
assist\.exprFillDefault
assist\.importEnforceGranularity
assist\.importGranularity
assist\.importMergeBehavior
assist\.importMergeBehaviour
assist\.importGroup
assist\.importPrefix
primeCaches\.enable
cache\.warmup
cargo\.loadOutDirsFromCheck
cargo\.runBuildScripts
cargo\.runBuildScriptsCommand
cargo\.useRustcWrapperForBuildScripts
completion\.snippets
diagnostics\.enableExperimental
experimental\.procAttrMacros
highlighting\.strings
highlightRelated\.breakPoints
highlightRelated\.exitPoints
highlightRelated\.yieldPoints
highlightRelated\.references
hover\.documentation
hover\.linksInHover
hoverActions\.linksInHover
hoverActions\.debug
hoverActions\.enable
hoverActions\.gotoTypeDef
hoverActions\.implementations
hoverActions\.references
hoverActions\.run
inlayHints\.chainingHints
inlayHints\.closureReturnTypeHints
inlayHints\.hideNamedConstructorHints
inlayHints\.parameterHints
inlayHints\.reborrowHints
inlayHints\.typeHints
lruCapacity
runnables\.cargoExtraArgs
runnables\.overrideCargo
rustcSource
rustfmt\.enableRangeFormatting
allFeatures
addCallArgumentSnippets
addCallParenthesis
callInfo\.full
cargo\.allFeatures
checkOnSave\.allFeatures
completion\.addCallArgumentSnippets
completion\.addCallParenthesis" | while read -r pattern
do
  rg '\b'$pattern'\b([^.]|$)' . -g "!crates/rust-analyzer/src/config/patch_old_style.rs" -g "!editors/code/src/config.ts" -g "!a.sh" --no-heading --color=always --line-number
done

exit

excluded
# debug
# enable
# run
# implementations
# references
# documentation
# references
# snippets
# strings
# full
```

</details>
xFrednet pushed a commit to xFrednet/rust that referenced this pull request May 5, 2024
…e-init, r=dswij

Don't lint assigning_clones on nested late init locals

Fixes rust-lang#12741

changelog: none
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

Successfully merging this pull request may close these issues.

&mut [] results in "constant contains unimplemented expression type"
4 participants