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

Use `drop_in_place` in `array::IntoIter::drop` #65821

Merged
merged 1 commit into from Nov 19, 2019

Conversation

@SimonSapin
Copy link
Contributor

SimonSapin commented Oct 25, 2019

This skips the loop when the element type is known not to have drop glue, even in debug mode.

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Oct 25, 2019

r? @Kimundi

(rust_highfive has picked a reviewer for you, use r? to override)

@JohnCSimon

This comment has been minimized.

Copy link
Member

JohnCSimon commented Nov 2, 2019

Ping from triage.
@Kimundi can you please review this PR?
@SimonSapin
Thank you!

@JohnCSimon

This comment has been minimized.

Copy link
Member

JohnCSimon commented Nov 9, 2019

Pinging again from triage.
@Kimundi can you please review this PR?
@SimonSapin
Thank you!

@Dylan-DPC

This comment has been minimized.

Copy link
Member

Dylan-DPC commented Nov 12, 2019

@rust-highfive rust-highfive assigned Amanieu and unassigned Kimundi Nov 12, 2019
@Amanieu

This comment has been minimized.

Copy link
Contributor

Amanieu commented Nov 13, 2019

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 13, 2019

📌 Commit f4c59b3 has been approved by Amanieu

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 13, 2019

⌛️ Testing commit f4c59b3 with merge 3ee3c48...

bors added a commit that referenced this pull request Nov 13, 2019
Use `drop_in_place` in `array::IntoIter::drop`

This skips the loop when the element type is known not to have drop glue, even in debug mode.
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Nov 13, 2019
Use `drop_in_place` in `array::IntoIter::drop`

This skips the loop when the element type is known not to have drop glue, even in debug mode.
@JohnTitor

This comment has been minimized.

Copy link
Member

JohnTitor commented Nov 13, 2019

@bors retry rolled up

bors added a commit that referenced this pull request Nov 13, 2019
Rollup of 16 pull requests

Successful merges:

 - #65821 (Use `drop_in_place` in `array::IntoIter::drop`)
 - #65932 (download .tar.xz if python3 is used)
 - #66074 ([mir-opt] Turn on the `ConstProp` pass by default)
 - #66094 (Fix documentation for `Iterator::count()`.)
 - #66166 (rename cfg(rustdoc) into cfg(doc))
 - #66186 (Add long error explanation for E0623)
 - #66227 (docs: Fix link to BufWriter::flush)
 - #66248 (add raw ptr variant of UnsafeCell::get)
 - #66292 (add Result::map_or)
 - #66297 (Add a callback that allows compiler consumers to override queries.)
 - #66317 (Use a relative bindir for rustdoc to find rustc)
 - #66330 (Improve non-exhaustiveness handling in usefulness checking)
 - #66331 (Add some tests for fixed ICEs)
 - #66334 (Move Session fields to CrateStore)
 - #66335 (Move self-profile infrastructure to data structures)
 - #66337 (Remove dead code for encoding/decoding lint IDs)

Failed merges:

r? @ghost
@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Nov 13, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-11-13T12:59:48.5966248Z [RUSTC-TIMING] tidy test:false 0.709
2019-11-13T12:59:48.5981317Z     Finished release [optimized] target(s) in 1m 28s
2019-11-13T12:59:48.6091992Z [TIMING] ToolBuild { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target: "x86_64-unknown-linux-gnu", tool: "tidy", path: "src/tools/tidy", mode: ToolBootstrap, is_optional_tool: false, source_type: InTree, extra_features: [] } -- 88.083
2019-11-13T12:59:48.6092258Z tidy check
2019-11-13T12:59:49.4639579Z tidy error: /checkout/src/libcore/array/iter.rs:100: undocumented unsafe
2019-11-13T12:59:49.4639811Z tidy error: /checkout/src/libcore/array/iter.rs:196: undocumented unsafe
2019-11-13T12:59:51.3273113Z Found 485 error codes
2019-11-13T12:59:51.3273854Z Found 0 error codes with no tests
2019-11-13T12:59:51.3274072Z Done!
2019-11-13T12:59:51.3274298Z some tidy checks failed
2019-11-13T12:59:51.3274298Z some tidy checks failed
2019-11-13T12:59:51.3274789Z 
2019-11-13T12:59:51.3274960Z 
2019-11-13T12:59:51.3276182Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor"
2019-11-13T12:59:51.3277454Z 
2019-11-13T12:59:51.3277593Z 
2019-11-13T12:59:51.3277876Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
2019-11-13T12:59:51.3278146Z Build completed unsuccessfully in 0:01:32
2019-11-13T12:59:51.3278146Z Build completed unsuccessfully in 0:01:32
2019-11-13T12:59:51.3328903Z == clock drift check ==
2019-11-13T12:59:51.3338838Z   local time: Wed Nov 13 12:59:51 UTC 2019
2019-11-13T12:59:51.4176767Z   network time: Wed, 13 Nov 2019 12:59:51 GMT
2019-11-13T12:59:51.4177824Z == end clock drift check ==
2019-11-13T12:59:52.7778489Z 
2019-11-13T12:59:52.7886089Z ##[error]Bash exited with code '1'.
2019-11-13T12:59:52.7918766Z ##[section]Starting: Checkout
2019-11-13T12:59:52.7920716Z ==============================================================================
2019-11-13T12:59:52.7920832Z Task         : Get sources
2019-11-13T12:59:52.7920937Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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 @TimNN. (Feature Requests)

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 13, 2019

⌛️ Testing commit f4c59b3 with merge b6b6d35...

bors added a commit that referenced this pull request Nov 13, 2019
Use `drop_in_place` in `array::IntoIter::drop`

This skips the loop when the element type is known not to have drop glue, even in debug mode.
@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Nov 13, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-11-13T13:15:27.4676662Z [RUSTC-TIMING] tidy test:false 0.657
2019-11-13T13:15:27.4693864Z     Finished release [optimized] target(s) in 1m 26s
2019-11-13T13:15:27.4964476Z [TIMING] ToolBuild { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target: "x86_64-unknown-linux-gnu", tool: "tidy", path: "src/tools/tidy", mode: ToolBootstrap, is_optional_tool: false, source_type: InTree, extra_features: [] } -- 86.122
2019-11-13T13:15:27.4968720Z tidy check
2019-11-13T13:15:28.3628288Z tidy error: /checkout/src/libcore/array/iter.rs:100: undocumented unsafe
2019-11-13T13:15:28.3628544Z tidy error: /checkout/src/libcore/array/iter.rs:196: undocumented unsafe
2019-11-13T13:15:30.1814600Z some tidy checks failed
2019-11-13T13:15:30.1814761Z Found 485 error codes
2019-11-13T13:15:30.1814859Z Found 0 error codes with no tests
2019-11-13T13:15:30.1814939Z Done!
2019-11-13T13:15:30.1814939Z Done!
2019-11-13T13:15:30.1814983Z 
2019-11-13T13:15:30.1815044Z 
2019-11-13T13:15:30.1816315Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor"
2019-11-13T13:15:30.1816873Z 
2019-11-13T13:15:30.1816930Z 
2019-11-13T13:15:30.1821665Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
2019-11-13T13:15:30.1821809Z Build completed unsuccessfully in 0:01:30
2019-11-13T13:15:30.1821809Z Build completed unsuccessfully in 0:01:30
2019-11-13T13:15:30.1873984Z == clock drift check ==
2019-11-13T13:15:30.1901375Z   local time: Wed Nov 13 13:15:30 UTC 2019
2019-11-13T13:15:30.2592628Z   network time: Wed, 13 Nov 2019 13:15:30 GMT
2019-11-13T13:15:30.2594298Z == end clock drift check ==
2019-11-13T13:15:31.5866540Z 
2019-11-13T13:15:31.5963682Z ##[error]Bash exited with code '1'.
2019-11-13T13:15:31.5996753Z ##[section]Starting: Checkout
2019-11-13T13:15:31.5998681Z ==============================================================================
2019-11-13T13:15:31.5998803Z Task         : Get sources
2019-11-13T13:15:31.5998900Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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 @TimNN. (Feature Requests)

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 13, 2019

💔 Test failed - checks-azure

@joelpalmer

This comment has been minimized.

Copy link

joelpalmer commented Nov 18, 2019

Ping from Triage: @Amanieu @JohnTitor @SimonSapin any updates?

@JohnTitor

This comment has been minimized.

Copy link
Member

JohnTitor commented Nov 18, 2019

tidy check is failed due to undocumented unsafe block

This skips the loop when the element type is known not to have drop glue, even in debug mode.
@SimonSapin SimonSapin force-pushed the SimonSapin:in-place branch from f4c59b3 to 74b5714 Nov 18, 2019
@SimonSapin

This comment has been minimized.

Copy link
Contributor Author

SimonSapin commented Nov 18, 2019

Rebased and added SAFETY comments so that tidy passes.

@SimonSapin

This comment has been minimized.

Copy link
Contributor Author

SimonSapin commented Nov 18, 2019

Let’s maybe not keep blocking this. One of the new safety comments is copied from an existing similar method, the other seems straight-forward enough that I’ll take the liberty of carrying the review of the comment-less diff:

@bors r=Amanieu

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 18, 2019

📌 Commit 74b5714 has been approved by Amanieu

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 19, 2019

⌛️ Testing commit 74b5714 with merge 5c5a120...

bors added a commit that referenced this pull request Nov 19, 2019
Use `drop_in_place` in `array::IntoIter::drop`

This skips the loop when the element type is known not to have drop glue, even in debug mode.
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 19, 2019

☀️ Test successful - checks-azure
Approved by: Amanieu
Pushing 5c5a120 to master...

@bors bors added the merged-by-bors label Nov 19, 2019
@bors bors merged commit 74b5714 into rust-lang:master Nov 19, 2019
6 checks passed
6 checks passed
homu Test successful
Details
pr Build #20191118.12 succeeded
Details
pr #20191118.12 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-6.0) Linux x86_64-gnu-llvm-6.0 succeeded
Details
pr (Linux x86_64-gnu-tools) Linux x86_64-gnu-tools succeeded
Details
@SimonSapin SimonSapin deleted the SimonSapin:in-place branch Nov 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
9 participants
You can’t perform that action at this time.