Expose the Freeze trait again (unstably) and forbid implementing it manually#121501
Closed
oli-obk wants to merge 652 commits intorust-lang:masterfrom
Hidden character warning
The head ref may contain hidden characters: "\ud83e\udd76"
Closed
Expose the Freeze trait again (unstably) and forbid implementing it manually#121501oli-obk wants to merge 652 commits intorust-lang:masterfrom
Freeze trait again (unstably) and forbid implementing it manually#121501oli-obk wants to merge 652 commits intorust-lang:masterfrom
Conversation
This comment has been minimized.
This comment has been minimized.
Contributor
Author
|
I broke github :( I already pushed to this branch, but it hasn't updated in two hours |
jswrenn
reviewed
Feb 23, 2024
Collaborator
|
Some changes occurred in compiler/rustc_codegen_gcc Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
In `auxiliary/sigpipe-utils.rs`, all we want to know is the current `SIGPIPE` disposition. We should not change it. So use `libc::sigaction` instead of `libc::signal`. That way we can also remove the code that restores it.
This allows for Windows users to use miri-script without pain
Windows miri-script execution egronomics
This allows for Windows users to use miri-script without pain. As working on miri earlier I was doing
`.\miri-script\target\debug\miri-script.exe { install | build | ... }` which wasn't fun.
Add "cargo miri clean" command My first reaction when my miri cache was messed up was to attempt run this, which obviously failed. This helps paper over platform differences and such.
compiler: clippy::complexity fixes
compiletest: call cargo-miri directly rather than via 'cargo run' Fixes rust-lang/miri#3297. Thanks to `@bjorn3` for figuring out the cause of this. r? `@oli-obk`
Co-authored-by: Ben Kimock <kimockb@gmail.com>
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#121435 (Account for RPITIT in E0310 explicit lifetime constraint suggestion) - rust-lang#121490 (Rustdoc: include crate name in links for local primitives) - rust-lang#121520 (delay cloning of iterator items) - rust-lang#121522 (check that simd_insert/extract indices are in-bounds) - rust-lang#121531 (Ignore less tests in debug builds) - rust-lang#121539 (compiler/rustc_target/src/spec/base/apple/tests.rs: Avoid unnecessary large move) - rust-lang#121542 (update stdarch) r? `@ghost` `@rustbot` modify labels: rollup
…slice, r=Mark-Simulacrum Add examples for some methods on slices Adds some examples to some methods on slice. `is_empty` didn't have an example for an empty slice, even though `str` and the collections all have one, so I added that in. `first_mut` and `last_mut` didn't have an example for what happens when the slice is empty, whereas `first` and `last` do, so I added that too.
…wjasper match lowering: Split off `test_candidates` into several functions and improve comments The logic of `test_candidates` has three steps: pick a test, sort the candidates, and generate code for everything. So I split it off into three methods. I also ended up reworking the comments that explain the algorithm. In particular I added detailed examples. I removed the digression about rust-lang#29740 because it's no longer relevant to how the code is structured today. r? ``@matthewjasper``
…on, r=Mark-Simulacrum Ignore compiletest test directive migration commits Not sure if the corresponding bors commit need to be included as well, assuming not.
…-obk promotion: don't promote int::MIN / -1 Looks like I entirely forgot about this case when adding the div-by-zero check, which was supposed to ensure that we never promote operations that can fail... Cc rust-lang#80619 This is a breaking change, so needs a crater run. r? ``@oli-obk``
Fix incorrect doc of ScopedJoinHandle::is_finished Fixes the explanation how to use `is_finished` to achieve a non-blocking join. The updated version matches the documentation of the non-scoped JoinHandle::is_finished.
Forbid use of `extern "C-unwind"` inside standard library Those libraries are build with `-C panic=unwind` and is expected to be linkable to `-C panic=abort` library. To ensure unsoundness compiler needs to prevent a `C-unwind` call to exist, as doing so may leak foreign exceptions into `-C panic=abort`. r? ``@RalfJung``
This comment was marked as resolved.
This comment was marked as resolved.
Contributor
Author
|
wtf, sorry everyone... |
This comment has been minimized.
This comment has been minimized.
Collaborator
|
Some changes occurred in engine.rs, potentially modifying the public API of |
Collaborator
Contributor
Author
|
At this point I have to assume that GitHub chokes on the emoji branch name. It takes 3h to accept a force push, and I am certain the branch is correctly based off master |
Member
|
You could also try filing a new one (with fewer than 1000 commits). |
Contributor
Author
|
Yea, must be the emoji 💀 I opened #121840 at the same commit as this PR, and it works just fine ™️ |
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Mar 10, 2024
Expose the Freeze trait again (unstably) and forbid implementing it manually non-emoji version of rust-lang#121501 cc rust-lang#60715 This trait is useful for generic constants (associated consts of generic traits). See the test (`tests/ui/associated-consts/freeze.rs`) added in this PR for a usage example. The builtin `Freeze` trait is the only way to do it, users cannot work around this issue. It's also a useful trait for building some very specific abstrations, as shown by the usage by the `zerocopy` crate: google/zerocopy#941 cc `@RalfJung` T-lang signed off on reexposing this unstably: rust-lang#121501 (comment)
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Mar 11, 2024
Expose the Freeze trait again (unstably) and forbid implementing it manually non-emoji version of rust-lang#121501 cc rust-lang#60715 This trait is useful for generic constants (associated consts of generic traits). See the test (`tests/ui/associated-consts/freeze.rs`) added in this PR for a usage example. The builtin `Freeze` trait is the only way to do it, users cannot work around this issue. It's also a useful trait for building some very specific abstrations, as shown by the usage by the `zerocopy` crate: google/zerocopy#941 cc ``@RalfJung`` T-lang signed off on reexposing this unstably: rust-lang#121501 (comment)
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Mar 11, 2024
Expose the Freeze trait again (unstably) and forbid implementing it manually non-emoji version of rust-lang#121501 cc rust-lang#60715 This trait is useful for generic constants (associated consts of generic traits). See the test (`tests/ui/associated-consts/freeze.rs`) added in this PR for a usage example. The builtin `Freeze` trait is the only way to do it, users cannot work around this issue. It's also a useful trait for building some very specific abstrations, as shown by the usage by the `zerocopy` crate: google/zerocopy#941 cc ```@RalfJung``` T-lang signed off on reexposing this unstably: rust-lang#121501 (comment)
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 11, 2024
Rollup merge of rust-lang#121840 - oli-obk:freeze, r=dtolnay Expose the Freeze trait again (unstably) and forbid implementing it manually non-emoji version of rust-lang#121501 cc rust-lang#60715 This trait is useful for generic constants (associated consts of generic traits). See the test (`tests/ui/associated-consts/freeze.rs`) added in this PR for a usage example. The builtin `Freeze` trait is the only way to do it, users cannot work around this issue. It's also a useful trait for building some very specific abstrations, as shown by the usage by the `zerocopy` crate: google/zerocopy#941 cc ```@RalfJung``` T-lang signed off on reexposing this unstably: rust-lang#121501 (comment)
github-actions bot
pushed a commit
to rust-lang/miri
that referenced
this pull request
Mar 12, 2024
Expose the Freeze trait again (unstably) and forbid implementing it manually non-emoji version of rust-lang/rust#121501 cc #60715 This trait is useful for generic constants (associated consts of generic traits). See the test (`tests/ui/associated-consts/freeze.rs`) added in this PR for a usage example. The builtin `Freeze` trait is the only way to do it, users cannot work around this issue. It's also a useful trait for building some very specific abstrations, as shown by the usage by the `zerocopy` crate: google/zerocopy#941 cc ```@RalfJung``` T-lang signed off on reexposing this unstably: rust-lang/rust#121501 (comment)
bjorn3
pushed a commit
to rust-lang/rustc_codegen_cranelift
that referenced
this pull request
Mar 16, 2024
Expose the Freeze trait again (unstably) and forbid implementing it manually non-emoji version of rust-lang/rust#121501 cc #60715 This trait is useful for generic constants (associated consts of generic traits). See the test (`tests/ui/associated-consts/freeze.rs`) added in this PR for a usage example. The builtin `Freeze` trait is the only way to do it, users cannot work around this issue. It's also a useful trait for building some very specific abstrations, as shown by the usage by the `zerocopy` crate: google/zerocopy#941 cc ```@RalfJung``` T-lang signed off on reexposing this unstably: rust-lang/rust#121501 (comment)
GuillaumeGomez
pushed a commit
to GuillaumeGomez/rustc_codegen_gcc
that referenced
this pull request
Mar 26, 2024
Expose the Freeze trait again (unstably) and forbid implementing it manually non-emoji version of rust-lang/rust#121501 cc #60715 This trait is useful for generic constants (associated consts of generic traits). See the test (`tests/ui/associated-consts/freeze.rs`) added in this PR for a usage example. The builtin `Freeze` trait is the only way to do it, users cannot work around this issue. It's also a useful trait for building some very specific abstrations, as shown by the usage by the `zerocopy` crate: google/zerocopy#941 cc ```@RalfJung``` T-lang signed off on reexposing this unstably: rust-lang/rust#121501 (comment)
christian-schilling
pushed a commit
to christian-schilling/rustc_codegen_cranelift
that referenced
this pull request
Jan 27, 2026
Expose the Freeze trait again (unstably) and forbid implementing it manually non-emoji version of rust-lang/rust#121501 cc #60715 This trait is useful for generic constants (associated consts of generic traits). See the test (`tests/ui/associated-consts/freeze.rs`) added in this PR for a usage example. The builtin `Freeze` trait is the only way to do it, users cannot work around this issue. It's also a useful trait for building some very specific abstrations, as shown by the usage by the `zerocopy` crate: google/zerocopy#941 cc ```@RalfJung``` T-lang signed off on reexposing this unstably: rust-lang/rust#121501 (comment)
christian-schilling
pushed a commit
to christian-schilling/rustc_codegen_cranelift
that referenced
this pull request
Jan 27, 2026
Expose the Freeze trait again (unstably) and forbid implementing it manually non-emoji version of rust-lang/rust#121501 cc #60715 This trait is useful for generic constants (associated consts of generic traits). See the test (`tests/ui/associated-consts/freeze.rs`) added in this PR for a usage example. The builtin `Freeze` trait is the only way to do it, users cannot work around this issue. It's also a useful trait for building some very specific abstrations, as shown by the usage by the `zerocopy` crate: google/zerocopy#941 cc ```@RalfJung``` T-lang signed off on reexposing this unstably: rust-lang/rust#121501 (comment)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
cc #60715
This trait is useful for generic constants (associated consts of generic traits). See the test (
tests/ui/associated-consts/freeze.rs) added in this PR for a usage example. The builtinFreezetrait is the only way to do it, users cannot work around this issue.It's also a useful trait for building some very specific abstrations, as shown by the usage by the
zerocopycrate: google/zerocopy#941cc @RalfJung
r? libs-api
Open questions
Cell, as the trait signals the absence ofUnsafeCell.