-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Don't promote function calls to nonpromotable things #58784
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
discussed at T-compiler meeting. approved for beta backport. |
Looks like the reason this regressed is because "not promotable" used to be turned into "not const" but at some point in the refactor I simplified it too much and only preserved "not const" from callee/arguments, but not "not promotable". r=me with a FIXME about removing |
@bors r=eddyb |
📌 Commit 8c16507 has been approved by |
⌛ Testing commit 8c16507 with merge f40e37747ba74cd7fd974cb092033474d4d8c6f9... |
💔 Test failed - status-appveyor |
The error looks spurious; maybe my try rights are already in force? @bors retry |
⌛ Testing commit 8c16507 with merge 113a74e1c5bdcf894fd624d1465b342324779fc6... |
💔 Test failed - status-appveyor |
@bors retry (different builder failed that passed in the previous run) |
@bors r=eddyb p=1 |
💡 This pull request was already approved, no need to approve it again.
|
📌 Commit 8c16507 has been approved by |
💔 Test failed - checks-travis |
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 |
@bors retry timeout |
☀️ Test successful - checks-travis, status-appveyor |
[beta] Rollup backports Cherry-picked: * Include bounds from promoted constants in NLL #57202 * Warning period for detecting nested impl trait #58608 * Don't promote function calls to nonpromotable things #58784 * Make migrate mode work at item level granularity #58788 * Expand where negative supertrait specific error is shown #58861 * Expand where negative supertrait specific error is shown #58861 Rolled up: * [BETA] Update cargo #59217 r? @ghost
Retire `IsNotConst` naming This naming scheme caused a lot of confusion lately (including ICEs) due to misrefactored code. Also clean up the initialization code for said flag. r? @eddyb previous discussions: rust-lang#58784 (comment) rust-lang#58403 (comment)
Retire `IsNotConst` naming This naming scheme caused a lot of confusion lately (including ICEs) due to misrefactored code. Also clean up the initialization code for said flag. r? @eddyb previous discussions: rust-lang#58784 (comment) rust-lang#58403 (comment)
Retire `IsNotConst` naming This naming scheme caused a lot of confusion lately (including ICEs) due to misrefactored code. Also clean up the initialization code for said flag. r? @eddyb previous discussions: rust-lang#58784 (comment) rust-lang#58403 (comment)
Retire `IsNotConst` naming This naming scheme caused a lot of confusion lately (including ICEs) due to misrefactored code. Also clean up the initialization code for said flag. r? @eddyb previous discussions: rust-lang#58784 (comment) rust-lang#58403 (comment)
fixes #58767 and fixes #58634
r? @eddyb
should we additionally check the function call return type? It might be a promotable function (or any
const fn
inside aconst fn
), but its return type might contain interior mutability.