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

Rollup of 8 pull requests #120667

Closed
wants to merge 29 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Nadrieril and others added 29 commits January 25, 2024 02:35
yes, once_cell better, but ...

this reduces from

==31349== Total:     1,365,199,543 bytes in 4,774,213 blocks
==31349== At t-gmax: 10,975,708 bytes in 66,093 blocks
==31349== At t-end:  2,880,947 bytes in 12,332 blocks
==31349== Reads:     5,210,008,956 bytes
==31349== Writes:    1,280,920,127 bytes

to

==47796== Total:     821,467,407 bytes in 3,955,595 blocks
==47796== At t-gmax: 10,976,209 bytes in 66,100 blocks
==47796== At t-end:  2,944,016 bytes in 12,490 blocks
==47796== Reads:     4,788,959,023 bytes
==47796== Writes:    975,493,639 bytes

miropt-test-tools: remove regex usage

this removes regex usage and slightly refactors ext stripping in one case
 $ cargo update  -p ignore --precise=0.4.22
    Updating crates.io index
    Updating aho-corasick v1.0.2 -> v1.1.2
    Updating bstr v1.5.0 -> v1.9.0
    Updating globset v0.4.10 -> v0.4.14
    Updating ignore v0.4.20 -> v0.4.22
    Updating log v0.4.19 -> v0.4.20
    Updating memchr v2.5.0 -> v2.7.1
      Adding regex-automata v0.4.3
    Updating walkdir v2.3.3 -> v2.4.0

some notable change is BurntSushi/ripgrep#2692

reduces memory usage from

==47796== Total:     821,467,407 bytes in 3,955,595 blocks
==47796== At t-gmax: 10,976,209 bytes in 66,100 blocks
==47796== At t-end:  2,944,016 bytes in 12,490 blocks
==47796== Reads:     4,788,959,023 bytes
==47796== Writes:    975,493,639 bytes

to

==66633== Total:     791,565,538 bytes in 3,503,144 blocks
==66633== At t-gmax: 10,914,511 bytes in 65,997 blocks
==66633== At t-end:  395,531 bytes in 941 blocks
==66633== Reads:     4,249,388,949 bytes
==66633== Writes:    814,119,580 bytes

bump regex to dedupe one regex-syntax

$ cargo update -p regex
    Updating crates.io index
    Updating regex v1.8.4 -> v1.10.2
    Removing regex-syntax v0.7.2
When encountering

```rust
fn f<T>(a: T, b: T) -> std::cmp::Ordering {
    a.cmp(&b) //~ ERROR E0599
}
```

output

```
error[E0599]: no method named `cmp` found for type parameter `T` in the current scope
  --> $DIR/method-on-unbounded-type-param.rs:2:7
   |
LL | fn f<T>(a: T, b: T) -> std::cmp::Ordering {
   |      - method `cmp` not found for this type parameter
LL |     a.cmp(&b)
   |       ^^^ method cannot be called on `T` due to unsatisfied trait bounds
   |
   = help: items from traits can only be used if the type parameter is bounded by the trait
help: the following traits define an item `cmp`, perhaps you need to restrict type parameter `T` with one of them:
   |
LL | fn f<T: Ord>(a: T, b: T) -> std::cmp::Ordering {
   |       +++++
LL | fn f<T: Iterator>(a: T, b: T) -> std::cmp::Ordering {
   |       ++++++++++
```

Fix rust-lang#120186.
When a method not found on a type parameter could have been provided by any
of multiple traits, suggest each trait individually, instead of a single
suggestion to restrict the type parameter with *all* of them.

Before:

```
error[E0599]: the method `cmp` exists for reference `&T`, but its trait bounds were not satisfied
  --> $DIR/method-on-unbounded-type-param.rs:5:10
   |
LL |     (&a).cmp(&b)
   |          ^^^ method cannot be called on `&T` due to unsatisfied trait bounds
   |
   = note: the following trait bounds were not satisfied:
           `T: Ord`
           which is required by `&T: Ord`
           `&T: Iterator`
           which is required by `&mut &T: Iterator`
           `T: Iterator`
           which is required by `&mut T: Iterator`
help: consider restricting the type parameters to satisfy the trait bounds
   |
LL | fn g<T>(a: T, b: T) -> std::cmp::Ordering where T: Iterator, T: Ord {
   |                                           +++++++++++++++++++++++++
```

After:

```
error[E0599]: the method `cmp` exists for reference `&T`, but its trait bounds were not satisfied
  --> $DIR/method-on-unbounded-type-param.rs:5:10
   |
LL |     (&a).cmp(&b)
   |          ^^^ method cannot be called on `&T` due to unsatisfied trait bounds
   |
   = note: the following trait bounds were not satisfied:
           `T: Ord`
           which is required by `&T: Ord`
           `&T: Iterator`
           which is required by `&mut &T: Iterator`
           `T: Iterator`
           which is required by `&mut T: Iterator`
   = help: items from traits can only be used if the type parameter is bounded by the trait
help: the following traits define an item `cmp`, perhaps you need to restrict type parameter `T` with one of them:
   |
LL | fn g<T: Ord>(a: T, b: T) -> std::cmp::Ordering {
   |       +++++
LL | fn g<T: Iterator>(a: T, b: T) -> std::cmp::Ordering {
   |       ++++++++++
```

Fix rust-lang#108428.
tidy: reduce allocs

this reduces allocs in tidy from (dhat output)

```
==31349== Total:     1,365,199,543 bytes in 4,774,213 blocks
==31349== At t-gmax: 10,975,708 bytes in 66,093 blocks
==31349== At t-end:  2,880,947 bytes in 12,332 blocks
==31349== Reads:     5,210,008,956 bytes
==31349== Writes:    1,280,920,127 bytes
```
to
```
==66633== Total:     791,565,538 bytes in 3,503,144 blocks
==66633== At t-gmax: 10,914,511 bytes in 65,997 blocks
==66633== At t-end:  395,531 bytes in 941 blocks
==66633== Reads:     4,249,388,949 bytes
==66633== Writes:    814,119,580 bytes
```

by wrapping regex and updating `ignore` (effect probably not only from `ignore`, didn't measured)
match lowering: consistently lower bindings deepest-first

Currently when lowering match expressions to MIR, we do a funny little dance with the order of bindings. I attempt to explain it in the third commit: we handle refutable (i.e. needing a test) patterns differently than irrefutable ones. This leads to inconsistencies, as reported in rust-lang#120210. The reason we need a dance at all is for situations like:

```rust
fn foo1(x: NonCopyStruct) {
    let y @ NonCopyStruct { copy_field: z } = x;
    // the above should turn into
    let z = x.copy_field;
    let y = x;
}
```

Here the `y ````@````` binding will move out of `x`, so we need to copy the field first.

I believe that the inconsistency came about when we fixed rust-lang#69971, and didn't notice that the fix didn't extend to refutable patterns. My guess then is that ordering bindings by "deepest-first, otherwise source order" is a sound choice. This PR implements that (at least I hope, match lowering is hard to follow 🥲).

Fixes rust-lang#120210

r? ````@oli-obk```` since you merged the original fix to rust-lang#69971
cc ````@matthewjasper````
…param, r=nnethercote

Account for unbounded type param receiver in suggestions

When encountering

```rust
fn f<T>(a: T, b: T) -> std::cmp::Ordering {
    a.cmp(&b) //~ ERROR E0599
}
```

output

```
error[E0599]: no method named `cmp` found for type parameter `T` in the current scope
  --> $DIR/method-on-unbounded-type-param.rs:2:7
   |
LL | fn f<T>(a: T, b: T) -> std::cmp::Ordering {
   |      - method `cmp` not found for this type parameter
LL |     a.cmp(&b)
   |       ^^^ method cannot be called on `T` due to unsatisfied trait bounds
   |
   = help: items from traits can only be used if the type parameter is bounded by the trait
help: the following traits define an item `cmp`, perhaps you need to restrict type parameter `T` with one of them:
   |
LL | fn f<T: Ord>(a: T, b: T) -> std::cmp::Ordering {
   |       +++++
LL | fn f<T: Iterator>(a: T, b: T) -> std::cmp::Ordering {
   |       ++++++++++
```

Fix rust-lang#120186.
…, r=petrochenkov

update indirect structural match lints to match RFC and to show up for dependencies

This is a large step towards implementing rust-lang/rfcs#3535.
We currently have five lints related to "the structural match situation":
- nontrivial_structural_match
- indirect_structural_match
- pointer_structural_match
- const_patterns_without_partial_eq
- illegal_floating_point_literal_pattern

This PR concerns the first 3 of them. (The 4th already is set up to show for dependencies, and the 5th is removed by rust-lang#116284.) nontrivial_structural_match is being removed as per the RFC; the other two are enabled to show up in dependencies.

Fixes rust-lang#73448 by removing the affected analysis.
…ame, r=Urgau,Nilstrieb

Suggest name value cfg when only value is used for check-cfg

Fixes rust-lang#120427
r? ````````@Nilstrieb````````
Account for non-overlapping unmet trait bounds in suggestion

When a method not found on a type parameter could have been provided by any
of multiple traits, suggest each trait individually, instead of a single
suggestion to restrict the type parameter with *all* of them.

Before:

```
error[E0599]: the method `cmp` exists for reference `&T`, but its trait bounds were not satisfied
  --> $DIR/method-on-unbounded-type-param.rs:5:10
   |
LL |     (&a).cmp(&b)
   |          ^^^ method cannot be called on `&T` due to unsatisfied trait bounds
   |
   = note: the following trait bounds were not satisfied:
           `T: Ord`
           which is required by `&T: Ord`
           `&T: Iterator`
           which is required by `&mut &T: Iterator`
           `T: Iterator`
           which is required by `&mut T: Iterator`
help: consider restricting the type parameters to satisfy the trait bounds
   |
LL | fn g<T>(a: T, b: T) -> std::cmp::Ordering where T: Iterator, T: Ord {
   |                                           +++++++++++++++++++++++++
```

After:

```
error[E0599]: the method `cmp` exists for reference `&T`, but its trait bounds were not satisfied
  --> $DIR/method-on-unbounded-type-param.rs:5:10
   |
LL |     (&a).cmp(&b)
   |          ^^^ method cannot be called on `&T` due to unsatisfied trait bounds
   |
   = note: the following trait bounds were not satisfied:
           `T: Ord`
           which is required by `&T: Ord`
           `&T: Iterator`
           which is required by `&mut &T: Iterator`
           `T: Iterator`
           which is required by `&mut T: Iterator`
   = help: items from traits can only be used if the type parameter is bounded by the trait
help: the following traits define an item `cmp`, perhaps you need to restrict type parameter `T` with one of them:
   |
LL | fn g<T: Ord>(a: T, b: T) -> std::cmp::Ordering {
   |       +++++
LL | fn g<T: Iterator>(a: T, b: T) -> std::cmp::Ordering {
   |       ++++++++++
```

Fix rust-lang#108428.

Follow up to rust-lang#120396, only last commit is relevant.
…ructors, r=dtolnay,oli-obk

Make `NonZero` constructors generic.

This makes `NonZero` constructors generic, so that `NonZero::new` can be used without turbofish syntax.

Tracking issue: rust-lang#120257

~~I cannot figure out how to make this work with `const` traits. Not sure if I'm using it wrong or whether there's a bug:~~

```rust
101 |         if n == T::ZERO {
    |            ^^^^^^^^^^^^ expected `host`, found `true`
    |
    = note: expected constant `host`
               found constant `true`
```

r? `````@dtolnay`````
…ochenkov

Switch OwnedStore handle count to AtomicU32

This is already panics if overflowing a u32, so let's use the smaller int size to save a tiny bit of memory.
@rustbot rustbot added the A-testsuite Area: The testsuite used to check the correctness of rustc label Feb 5, 2024
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Feb 5, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=8

@bors
Copy link
Contributor

bors commented Feb 5, 2024

📌 Commit d6ea81b has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 5, 2024
@bors
Copy link
Contributor

bors commented Feb 5, 2024

⌛ Testing commit d6ea81b with merge e9636ac...

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 5, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#120023 (tidy: reduce allocs)
 - rust-lang#120214 (match lowering: consistently lower bindings deepest-first)
 - rust-lang#120396 (Account for unbounded type param receiver in suggestions)
 - rust-lang#120423 (update indirect structural match lints to match RFC and to show up for dependencies)
 - rust-lang#120435 (Suggest name value cfg when only value is used for check-cfg)
 - rust-lang#120507 (Account for non-overlapping unmet trait bounds in suggestion)
 - rust-lang#120521 (Make `NonZero` constructors generic.)
 - rust-lang#120527 (Switch OwnedStore handle count to AtomicU32)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job dist-i586-gnu-i586-i686-musl failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

---- [ui] tests/ui/print_type_sizes/niche-filling.rs stdout ----
diff of stdout:

+ print-type-size type: `core::fmt::rt::Placeholder`: 32 bytes, alignment: 4 bytes
+ print-type-size     field `.precision`: 8 bytes
+ print-type-size     field `.width`: 8 bytes
+ print-type-size     field `.fill`: 4 bytes
+ print-type-size     field `.position`: 4 bytes
+ print-type-size     field `.flags`: 4 bytes
+ print-type-size     field `.align`: 1 bytes
+ print-type-size     end padding: 3 bytes
+ print-type-size type: `std::fmt::Arguments<'_>`: 24 bytes, alignment: 4 bytes
+ print-type-size     field `.pieces`: 8 bytes
+ print-type-size     field `.args`: 8 bytes
+ print-type-size     field `.fmt`: 8 bytes
+ print-type-size type: `std::panic::Location<'_>`: 16 bytes, alignment: 4 bytes
+ print-type-size     field `.file`: 8 bytes
+ print-type-size     field `.line`: 4 bytes
+ print-type-size     field `.col`: 4 bytes
1 print-type-size type: `IndirectNonZero`: 12 bytes, alignment: 4 bytes
2 print-type-size     field `.nested`: 8 bytes
3 print-type-size     field `.post`: 2 bytes

34 print-type-size     field `.post`: 2 bytes
35 print-type-size     field `.pre`: 1 bytes
36 print-type-size     end padding: 1 bytes
+ print-type-size type: `core::fmt::rt::Count`: 8 bytes, alignment: 4 bytes
+ print-type-size     discriminant: 4 bytes
+ print-type-size     variant `Is`: 4 bytes
+ print-type-size         field `.0`: 4 bytes
+ print-type-size     variant `Param`: 4 bytes
+ print-type-size         field `.0`: 4 bytes
+ print-type-size     variant `Implied`: 0 bytes
+ print-type-size type: `std::option::Option<&[core::fmt::rt::Placeholder]>`: 8 bytes, alignment: 4 bytes
+ print-type-size     variant `Some`: 8 bytes
+ print-type-size         field `.0`: 8 bytes
+ print-type-size     variant `None`: 0 bytes
37 print-type-size type: `Enum4<(), char, (), ()>`: 4 bytes, alignment: 4 bytes
38 print-type-size     variant `Two`: 4 bytes
39 print-type-size         field `.0`: 4 bytes

68 print-type-size     variant `Union2`: 4 bytes
69 print-type-size         field `.a`: 4 bytes
70 print-type-size         field `.b`: 4 bytes, offset: 0 bytes, alignment: 4 bytes
+ print-type-size type: `std::mem::ManuallyDrop<std::option::Option<std::num::NonZero<u32>>>`: 4 bytes, alignment: 4 bytes
+ print-type-size     field `.value`: 4 bytes
+ print-type-size type: `std::mem::MaybeUninit<std::option::Option<std::num::NonZero<u32>>>`: 4 bytes, alignment: 4 bytes
+ print-type-size     variant `MaybeUninit`: 4 bytes
+ print-type-size         field `.uninit`: 0 bytes
+ print-type-size         field `.value`: 4 bytes
71 print-type-size type: `std::num::NonZero<u32>`: 4 bytes, alignment: 4 bytes
72 print-type-size     field `.0`: 4 bytes
+ print-type-size type: `std::option::Option<std::num::NonZero<u32>>`: 4 bytes, alignment: 4 bytes
+ print-type-size     variant `Some`: 4 bytes
+ print-type-size         field `.0`: 4 bytes
+ print-type-size     variant `None`: 0 bytes
73 print-type-size type: `Enum4<(), (), (), MyOption<u8>>`: 2 bytes, alignment: 1 bytes
74 print-type-size     variant `Four`: 2 bytes
75 print-type-size         field `.0`: 2 bytes
105 print-type-size     variant `Some`: 1 bytes
105 print-type-size     variant `Some`: 1 bytes
106 print-type-size         field `.0`: 1 bytes
107 print-type-size     variant `None`: 0 bytes
+ print-type-size type: `core::fmt::rt::Alignment`: 1 bytes, alignment: 1 bytes
+ print-type-size     discriminant: 1 bytes
+ print-type-size     variant `Left`: 0 bytes
+ print-type-size     variant `Right`: 0 bytes
+ print-type-size     variant `Center`: 0 bytes
+ print-type-size     variant `Unknown`: 0 bytes
108 print-type-size type: `std::cmp::Ordering`: 1 bytes, alignment: 1 bytes
109 print-type-size     discriminant: 1 bytes
110 print-type-size     variant `Less`: 0 bytes

The actual stdout differed from the expected stdout.
Actual stdout saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/print_type_sizes/niche-filling/niche-filling.stdout
To update references, rerun the tests and pass the `--bless` flag
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args print_type_sizes/niche-filling.rs`

error: 1 errors occurred comparing output.
status: exit status: 0
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/print_type_sizes/niche-filling.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=i586-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/print_type_sizes/niche-filling" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/i586-unknown-linux-gnu/native/rust-test-helpers" "-Clinker=i586-unknown-linux-gnu-gcc" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/print_type_sizes/niche-filling/auxiliary" "-Z" "print-type-sizes" "--crate-type=lib"
--- stdout -------------------------------
print-type-size type: `core::fmt::rt::Placeholder`: 32 bytes, alignment: 4 bytes
print-type-size     field `.precision`: 8 bytes
print-type-size     field `.width`: 8 bytes
print-type-size     field `.fill`: 4 bytes
print-type-size     field `.position`: 4 bytes
print-type-size     field `.flags`: 4 bytes
print-type-size     field `.align`: 1 bytes
print-type-size     end padding: 3 bytes
print-type-size type: `std::fmt::Arguments<'_>`: 24 bytes, alignment: 4 bytes
print-type-size     field `.pieces`: 8 bytes
print-type-size     field `.args`: 8 bytes
print-type-size     field `.fmt`: 8 bytes
print-type-size type: `std::panic::Location<'_>`: 16 bytes, alignment: 4 bytes
print-type-size     field `.file`: 8 bytes
print-type-size     field `.line`: 4 bytes
print-type-size     field `.col`: 4 bytes
print-type-size type: `IndirectNonZero`: 12 bytes, alignment: 4 bytes
print-type-size     field `.nested`: 8 bytes
print-type-size     field `.post`: 2 bytes
print-type-size     field `.pre`: 1 bytes
print-type-size     end padding: 1 bytes
print-type-size type: `MyOption<IndirectNonZero>`: 12 bytes, alignment: 4 bytes
print-type-size     variant `Some`: 12 bytes
print-type-size         field `.0`: 12 bytes
print-type-size     variant `None`: 0 bytes
print-type-size type: `EmbeddedDiscr`: 8 bytes, alignment: 4 bytes
print-type-size     discriminant: 1 bytes
print-type-size     variant `Record`: 7 bytes
print-type-size         field `.pre`: 1 bytes
print-type-size         field `.post`: 2 bytes
print-type-size         field `.val`: 4 bytes
print-type-size     variant `None`: 0 bytes
print-type-size type: `MyOption<Union1<std::num::NonZero<u32>>>`: 8 bytes, alignment: 4 bytes
print-type-size     discriminant: 4 bytes
print-type-size     variant `Some`: 4 bytes
print-type-size         field `.0`: 4 bytes
print-type-size     variant `None`: 0 bytes
print-type-size type: `MyOption<Union2<std::num::NonZero<u32>, std::num::NonZero<u32>>>`: 8 bytes, alignment: 4 bytes
print-type-size     discriminant: 4 bytes
print-type-size     variant `Some`: 4 bytes
print-type-size         field `.0`: 4 bytes
print-type-size     variant `None`: 0 bytes
print-type-size type: `MyOption<Union2<std::num::NonZero<u32>, u32>>`: 8 bytes, alignment: 4 bytes
print-type-size     discriminant: 4 bytes
print-type-size     variant `Some`: 4 bytes
print-type-size         field `.0`: 4 bytes
print-type-size     variant `None`: 0 bytes
print-type-size type: `NestedNonZero`: 8 bytes, alignment: 4 bytes
print-type-size     field `.val`: 4 bytes
print-type-size     field `.post`: 2 bytes
print-type-size     field `.pre`: 1 bytes
print-type-size     end padding: 1 bytes
print-type-size type: `core::fmt::rt::Count`: 8 bytes, alignment: 4 bytes
print-type-size     discriminant: 4 bytes
print-type-size     variant `Is`: 4 bytes
print-type-size         field `.0`: 4 bytes
print-type-size     variant `Param`: 4 bytes
print-type-size         field `.0`: 4 bytes
print-type-size     variant `Implied`: 0 bytes
print-type-size type: `std::option::Option<&[core::fmt::rt::Placeholder]>`: 8 bytes, alignment: 4 bytes
print-type-size     variant `Some`: 8 bytes
print-type-size         field `.0`: 8 bytes
print-type-size     variant `None`: 0 bytes
print-type-size type: `Enum4<(), char, (), ()>`: 4 bytes, alignment: 4 bytes
print-type-size     variant `Two`: 4 bytes
print-type-size         field `.0`: 4 bytes
print-type-size     variant `One`: 0 bytes
print-type-size         field `.0`: 0 bytes
print-type-size     variant `Three`: 0 bytes
print-type-size         field `.0`: 0 bytes
print-type-size     variant `Four`: 0 bytes
print-type-size         field `.0`: 0 bytes
print-type-size type: `MyNotNegativeOne`: 4 bytes, alignment: 4 bytes
print-type-size     field `._i`: 4 bytes
print-type-size type: `MyOption<MyNotNegativeOne>`: 4 bytes, alignment: 4 bytes
print-type-size     variant `Some`: 4 bytes
print-type-size         field `.0`: 4 bytes
print-type-size     variant `None`: 0 bytes
print-type-size type: `MyOption<char>`: 4 bytes, alignment: 4 bytes
print-type-size     variant `Some`: 4 bytes
print-type-size         field `.0`: 4 bytes
print-type-size     variant `None`: 0 bytes
print-type-size type: `MyOption<std::num::NonZero<u32>>`: 4 bytes, alignment: 4 bytes
print-type-size     variant `Some`: 4 bytes
print-type-size         field `.0`: 4 bytes
print-type-size     variant `None`: 0 bytes
print-type-size type: `Union1<std::num::NonZero<u32>>`: 4 bytes, alignment: 4 bytes
print-type-size     variant `Union1`: 4 bytes
print-type-size         field `.a`: 4 bytes
print-type-size type: `Union2<std::num::NonZero<u32>, std::num::NonZero<u32>>`: 4 bytes, alignment: 4 bytes
print-type-size     variant `Union2`: 4 bytes
print-type-size         field `.a`: 4 bytes
print-type-size         field `.b`: 4 bytes, offset: 0 bytes, alignment: 4 bytes
print-type-size type: `Union2<std::num::NonZero<u32>, u32>`: 4 bytes, alignment: 4 bytes
print-type-size     variant `Union2`: 4 bytes
print-type-size         field `.a`: 4 bytes
print-type-size         field `.b`: 4 bytes, offset: 0 bytes, alignment: 4 bytes
print-type-size type: `std::mem::ManuallyDrop<std::option::Option<std::num::NonZero<u32>>>`: 4 bytes, alignment: 4 bytes
print-type-size     field `.value`: 4 bytes
print-type-size type: `std::mem::MaybeUninit<std::option::Option<std::num::NonZero<u32>>>`: 4 bytes, alignment: 4 bytes
print-type-size     variant `MaybeUninit`: 4 bytes
print-type-size         field `.uninit`: 0 bytes
print-type-size         field `.value`: 4 bytes
print-type-size type: `std::num::NonZero<u32>`: 4 bytes, alignment: 4 bytes
print-type-size     field `.0`: 4 bytes
print-type-size type: `std::option::Option<std::num::NonZero<u32>>`: 4 bytes, alignment: 4 bytes
print-type-size     variant `Some`: 4 bytes
print-type-size         field `.0`: 4 bytes
print-type-size     variant `None`: 0 bytes
print-type-size type: `Enum4<(), (), (), MyOption<u8>>`: 2 bytes, alignment: 1 bytes
print-type-size     variant `Four`: 2 bytes
print-type-size         field `.0`: 2 bytes
print-type-size     variant `One`: 0 bytes
print-type-size         field `.0`: 0 bytes
print-type-size     variant `Two`: 0 bytes
print-type-size         field `.0`: 0 bytes
print-type-size     variant `Three`: 0 bytes
print-type-size         field `.0`: 0 bytes
print-type-size type: `MyOption<MyOption<u8>>`: 2 bytes, alignment: 1 bytes
print-type-size     variant `Some`: 2 bytes
print-type-size         field `.0`: 2 bytes
print-type-size     variant `None`: 0 bytes
print-type-size type: `MyOption<u8>`: 2 bytes, alignment: 1 bytes
print-type-size     discriminant: 1 bytes
print-type-size     variant `Some`: 1 bytes
print-type-size         field `.0`: 1 bytes
print-type-size     variant `None`: 0 bytes
print-type-size type: `Enum4<(), (), bool, ()>`: 1 bytes, alignment: 1 bytes
print-type-size     variant `Three`: 1 bytes
print-type-size         field `.0`: 1 bytes
print-type-size     variant `One`: 0 bytes
print-type-size         field `.0`: 0 bytes
print-type-size     variant `Two`: 0 bytes
print-type-size         field `.0`: 0 bytes
print-type-size     variant `Four`: 0 bytes
print-type-size         field `.0`: 0 bytes
print-type-size type: `MyOption<bool>`: 1 bytes, alignment: 1 bytes
print-type-size     variant `Some`: 1 bytes
print-type-size         field `.0`: 1 bytes
print-type-size     variant `None`: 0 bytes
print-type-size type: `MyOption<std::cmp::Ordering>`: 1 bytes, alignment: 1 bytes
print-type-size     variant `Some`: 1 bytes
print-type-size         field `.0`: 1 bytes
print-type-size     variant `None`: 0 bytes
print-type-size type: `core::fmt::rt::Alignment`: 1 bytes, alignment: 1 bytes
print-type-size     discriminant: 1 bytes
print-type-size     variant `Left`: 0 bytes
print-type-size     variant `Right`: 0 bytes
print-type-size     variant `Center`: 0 bytes
print-type-size     variant `Unknown`: 0 bytes
print-type-size type: `std::cmp::Ordering`: 1 bytes, alignment: 1 bytes
print-type-size     discriminant: 1 bytes
print-type-size     variant `Less`: 0 bytes
print-type-size     variant `Equal`: 0 bytes
print-type-size     variant `Greater`: 0 bytes
stderr: none



@bors
Copy link
Contributor

bors commented Feb 5, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 5, 2024
@matthiaskrgr matthiaskrgr self-assigned this Feb 5, 2024
@klensy
Copy link
Contributor

klensy commented Feb 5, 2024

NonZero mentioned in test, so maybe #120521?

@bors
Copy link
Contributor

bors commented Feb 5, 2024

☔ The latest upstream changes (presumably #120671) made this pull request unmergeable. Please resolve the merge conflicts.

@matthiaskrgr matthiaskrgr deleted the rollup-2gjjc2r branch March 16, 2024 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.