Skip to content

Rollup of 10 pull requests #137918

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

Closed
wants to merge 22 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
adaa756
Add more ranges parsing tests
dtolnay Dec 29, 2024
462604d
Fix parsing of ranges after unary operators
dtolnay Dec 29, 2024
932f7fd
Make phantom variance markers transparent
jhpratt Feb 15, 2025
2bead27
remove : from stack-protector-heuristics-effect.rs filecheck
mustartt Feb 12, 2025
fb8c993
fix label suffix
mustartt Feb 20, 2025
41a7c83
Skip `tidy` in pre-push hook if the user is deleting a remote branch
yotamofek Feb 25, 2025
762fdf6
default to `-znostart-stop-gc`
lqd Feb 26, 2025
396c2a8
Stop using `hash_raw_entry` in `CodegenCx::const_str`
cuviper Feb 27, 2025
32de3b9
Revert "Remove Win SDK 10.0.26100.0 from CI"
jieyouxu Mar 1, 2025
42f51d4
Implment `#[cfg]` and `#[cfg_attr]` in `where` clauses
frank-king Feb 5, 2025
6f505ba
ensure we always print all --print options in help
mtoner23 Mar 1, 2025
7603e01
Simplify parallelization in test-float-parse
tgross35 Dec 31, 2024
ecec1ac
Rollup merge of #132388 - frank-king:feature/where-cfg, r=petrochenkov
matthiaskrgr Mar 3, 2025
1b353d6
Rollup merge of #134900 - dtolnay:unoprange, r=compiler-errors,davidtwco
matthiaskrgr Mar 3, 2025
35e9383
Rollup merge of #136938 - mustartt:fix-stack-protector-filecheck, r=M…
matthiaskrgr Mar 3, 2025
44368a5
Rollup merge of #137054 - jhpratt:phantom-variance, r=Mark-Simulacrum
matthiaskrgr Mar 3, 2025
6f1ad99
Rollup merge of #137525 - tgross35:test-float-parse-less-parallelizat…
matthiaskrgr Mar 3, 2025
66cea79
Rollup merge of #137618 - yotamofek:pr/pre-push-hook, r=Mark-Simulacrum
matthiaskrgr Mar 3, 2025
e69d710
Rollup merge of #137685 - lqd:nostart-stop-gc, r=petrochenkov
matthiaskrgr Mar 3, 2025
f68727b
Rollup merge of #137741 - cuviper:const_str-raw_entry, r=Mark-Simulacrum
matthiaskrgr Mar 3, 2025
45315a4
Rollup merge of #137849 - jieyouxu:undo-workaround, r=Kobzol
matthiaskrgr Mar 3, 2025
5f3394b
Rollup merge of #137862 - mtoner23:print-help, r=nnethercote
matthiaskrgr Mar 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make phantom variance markers transparent
  • Loading branch information
jhpratt committed Feb 15, 2025
commit 932f7fd8e4f1c2b695fdf402d370a21bb3f78038
12 changes: 12 additions & 0 deletions library/core/src/marker/variance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ phantom_lifetime! {
/// For all `'a`, the following are guaranteed:
/// * `size_of::<PhantomCovariantLifetime<'a>>() == 0`
/// * `align_of::<PhantomCovariantLifetime<'a>>() == 1`
#[rustc_pub_transparent]
#[repr(transparent)]
pub struct PhantomCovariantLifetime<'a>(PhantomCovariant<&'a ()>);
/// Zero-sized type used to mark a lifetime as contravariant.
///
Expand All @@ -149,6 +151,8 @@ phantom_lifetime! {
/// For all `'a`, the following are guaranteed:
/// * `size_of::<PhantomContravariantLifetime<'a>>() == 0`
/// * `align_of::<PhantomContravariantLifetime<'a>>() == 1`
#[rustc_pub_transparent]
#[repr(transparent)]
pub struct PhantomContravariantLifetime<'a>(PhantomContravariant<&'a ()>);
/// Zero-sized type used to mark a lifetime as invariant.
///
Expand All @@ -162,6 +166,8 @@ phantom_lifetime! {
/// For all `'a`, the following are guaranteed:
/// * `size_of::<PhantomInvariantLifetime<'a>>() == 0`
/// * `align_of::<PhantomInvariantLifetime<'a>>() == 1`
#[rustc_pub_transparent]
#[repr(transparent)]
pub struct PhantomInvariantLifetime<'a>(PhantomInvariant<&'a ()>);
}

Expand All @@ -179,6 +185,8 @@ phantom_type! {
/// For all `T`, the following are guaranteed:
/// * `size_of::<PhantomCovariant<T>>() == 0`
/// * `align_of::<PhantomCovariant<T>>() == 1`
#[rustc_pub_transparent]
#[repr(transparent)]
pub struct PhantomCovariant<T>(PhantomData<fn() -> T>);
/// Zero-sized type used to mark a type parameter as contravariant.
///
Expand All @@ -193,6 +201,8 @@ phantom_type! {
/// For all `T`, the following are guaranteed:
/// * `size_of::<PhantomContravariant<T>>() == 0`
/// * `align_of::<PhantomContravariant<T>>() == 1`
#[rustc_pub_transparent]
#[repr(transparent)]
pub struct PhantomContravariant<T>(PhantomData<fn(T)>);
/// Zero-sized type used to mark a type parameter as invariant.
///
Expand All @@ -206,6 +216,8 @@ phantom_type! {
/// For all `T`, the following are guaranteed:
/// * `size_of::<PhantomInvariant<T>>() == 0`
/// * `align_of::<PhantomInvariant<T>>() == 1`
#[rustc_pub_transparent]
#[repr(transparent)]
pub struct PhantomInvariant<T>(PhantomData<fn(T) -> T>);
}

Expand Down
Loading