Uh oh!
There was an error while loading. Please reload this page.
forbid mutable references in all constant contexts except for const-fns - #72934
Conversation
rust-highfive
commented
Jun 3, 2020
(rust_highfive has picked a reviewer for you, use r? to override) |
My question is how this works, which will need more than a single line 😄. |
ecstatic-morse
commented
Jun 3, 2020
pvdrz
commented
Jun 7, 2020
@ecstatic-morse I reutilized |
rust-highfive
commented
Jun 7, 2020
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
ecstatic-morse
left a comment
There was a problem hiding this comment.
I think we need to improve diagnostics a bit.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
ecstatic-morse
commented
Jun 18, 2020
Error messages look good to me now. Can you add an error code and description for this like oli mentioned? After that I think this is ready. |
pvdrz
commented
Jun 18, 2020
@ecstatic-morse@oli-obk I think we are ready then. |
Uh oh!
There was an error while loading. Please reload this page.
oli-obk
commented
Jun 19, 2020
r=me with the documentation suggestion or something similarly expanatory. @bors delegate+ |
bors
commented
Jun 19, 2020
✌️ @christianpoveda can now approve this pull request |
pvdrz
commented
Jun 19, 2020
@bors r+ |
bors
commented
Jun 19, 2020
📌 Commit 5302bd755d5a2a150083fc616e24361ee45d887b has been approved by |
oli-obk
commented
Jun 19, 2020
you need to write @bors r+ |
bors
commented
Jun 19, 2020
💡 This pull request was already approved, no need to approve it again.
|
bors
commented
Jun 19, 2020
📌 Commit 5302bd755d5a2a150083fc616e24361ee45d887b has been approved by |
pvdrz
commented
Jun 19, 2020
heh, thanks I've never used bors before :P |
bors
commented
Jun 19, 2020
☔ The latest upstream changes (presumably #73504) made this pull request unmergeable. Please resolve the merge conflicts. |
oli-obk
commented
Jun 19, 2020
@bors r+ |
bors
commented
Jun 19, 2020
📌 Commit 6eb7a2dc0f0df32c2ef380d8a06086db5bdcfc20 has been approved by |
pvdrz
commented
Jun 20, 2020
@bors r=oli-obk |
bors
commented
Jun 20, 2020
📌 Commit 96031e2 has been approved by |
…arth Rollup of 16 pull requests Successful merges: - rust-lang#71420 (Specialization is unsound) - rust-lang#71899 (Refactor `try_find` a little) - rust-lang#72689 (add str to common types) - rust-lang#72791 (update coerce docs and unify relevant tests) - rust-lang#72934 (forbid mutable references in all constant contexts except for const-fns) - rust-lang#73027 (Make `need_type_info_err` more conservative) - rust-lang#73347 (Diagnose use of incompatible sanitizers) - rust-lang#73359 (shim.rs: avoid creating `Call` terminators calling `Self`) - rust-lang#73399 (Clean up E0668 explanation) - rust-lang#73436 (Clean up E0670 explanation) - rust-lang#73440 (Add src/librustdoc as an alias for src/tools/rustdoc) - rust-lang#73442 (pretty/mir: const value enums with no variants) - rust-lang#73452 (Unify region variables when projecting associated types) - rust-lang#73458 (Use alloc::Layout in DroplessArena API) - rust-lang#73484 (Update the doc for std::prelude to the correct behavior) - rust-lang#73506 (Bump Rustfmt and RLS) Failed merges: r? @ghost
This commit includes work-arounds for the following changes in the compiler: - Raw pointers as const generic parameters are now forbidden. <rust-lang/rust#73398> This means the work-around for ICE caused by `&'static [_]` const generic parameters doesn't work anymore. An alternative work-around is yet to be implemented. - Mutable references are now forbidden in all constant contexts except for `const fn`s. <rust-lang/rust#72934> Working around this change was as easy as mechanically replacing `const` with `const fn` for most cases. The only tricky case was the definition of `id_map` inside `build!`, which is a macro meant to be called inside a `const` item. The type of `id_map` isn't explicitly specified but is rather implied by a given configuration function, so this couldn't be mechanically replaced with a `const` item. To resolve this problem, I added an explicit type to `build!`'s signature.
PR to address #71212
cc: @ecstatic-morse