Skip to content

adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file - #150368

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
paradoxicalguy:minicore-ordering
Jan 11, 2026
Merged

adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file#150368
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
paradoxicalguy:minicore-ordering

Conversation

@paradoxicalguy

@paradoxicalguyparadoxicalguy commented Dec 25, 2025

Copy link
Copy Markdown
Contributor

this adds the Ordering enum to minicore.rs.

consequently, this updates tests/assembly-llvm/rust-abi-arg-attr.rs to import minicore directly. previously, this test file contained traits like CopyClonePointeeSized, which were giving a duplicate lang item error, so replace those by importing minicore completely.

@rustbot

Copy link
Copy Markdown
Collaborator

This PR modifies tests/auxiliary/minicore.rs.

cc @jieyouxu

@rustbotrustbot added A-test-infra-minicore Area: `minicore` test auxiliary and `//@ add-core-stubs` S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 25, 2025
@rustbot

Copy link
Copy Markdown
Collaborator

Mark-Simulacrum is not on the review rotation at the moment.
They may take a while to respond.

@rustbot

Copy link
Copy Markdown
Collaborator

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rustbot

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@workingjubileeworkingjubilee left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't actually remove any diverging definitions from tests?

View changes since this review

Comment threadtests/auxiliary/minicore.rs Outdated

#[lang = "c_void"]
#[repr(u8)]
#[repr(C)]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not how c_void is defined in core::ffi. Please revert this unrelated change.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure!

Comment threadtests/auxiliary/minicore.rs Outdated
#[lang = "Ordering"]
#[repr(i8)]
pub enum Ordering {
Less = 0xFFu8 as i8,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry?

You can just write -1, can't you?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was giving an error before, reverted it back

Comment threadtests/auxiliary/minicore.rs Outdated
Comment on lines +308 to +310
#[rustc_nounwind]
#[rustc_intrinsic]
pub const fn three_way_compare<T: Copy>(lhs: T, rhs: T) -> Ordering;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you also adding this?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests/assembly-llvm/rust-abi-arg-attr.rs - uses Ordering and three_way_compare

@rustbotrustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 26, 2025
@rustbot

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rustbotrustbot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Dec 26, 2025
@paradoxicalguy

Copy link
Copy Markdown
ContributorAuthor

fixed minicore issues, aligned ordering and usize behavior, ready for re-review
@rustbot ready

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 26, 2025
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rustbotrustbot added the T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. label Dec 26, 2025
@rust-log-analyzer

This comment has been minimized.

@paradoxicalguy

Copy link
Copy Markdown
ContributorAuthor

@rustbot ready

@paradoxicalguy

Copy link
Copy Markdown
ContributorAuthor

@workingjubilee
i used 0xFFu8 as i8 instead of -1 because in #![no_core] context, the unary - operator requires the Neg lang item and an impl Neg for i8, which aren't currently in minicore.

adding impl Neg for i8 just to support this discriminant would introduce operator semantics (arithmetic, overflow handling, MIR lowering) which minicore intentionally avoids. the 0xFFu8 as i8 approach uses pure constant evaluation with no operator traits or lang items required

if you'd prefer -1 for readability, i can add the Neg implementation

@workingjubilee

Copy link
Copy Markdown
Member

don't quote the deep magic to me. I was there when it was written.

minicore is minimal for the sake of not reimplementing all of core, nothing more.

@workingjubileeworkingjubilee self-assigned this Dec 26, 2025
@workingjubilee

Copy link
Copy Markdown
Member

@bors r+

@rust-borsrust-borsBot 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 Jan 9, 2026
@rust-bors

rust-borsBot commented Jan 9, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 484ea76 has been approved by workingjubilee

It is now in the queue for this repository.

@paradoxicalguy

Copy link
Copy Markdown
ContributorAuthor

yay :-D

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 9, 2026
adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file
this adds the `Ordering` enum to `minicore.rs`.
consequently, this updates `tests/assembly-llvm/rust-abi-arg-attr.rs` to import `minicore` directly. previously, this test file contained traits like `Copy` `Clone` `PointeeSized`, which were giving a duplicate lang item error, so replace those by importing `minicore` completely.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 9, 2026
adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file
this adds the `Ordering` enum to `minicore.rs`.
consequently, this updates `tests/assembly-llvm/rust-abi-arg-attr.rs` to import `minicore` directly. previously, this test file contained traits like `Copy` `Clone` `PointeeSized`, which were giving a duplicate lang item error, so replace those by importing `minicore` completely.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 9, 2026
adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file
this adds the `Ordering` enum to `minicore.rs`.
consequently, this updates `tests/assembly-llvm/rust-abi-arg-attr.rs` to import `minicore` directly. previously, this test file contained traits like `Copy` `Clone` `PointeeSized`, which were giving a duplicate lang item error, so replace those by importing `minicore` completely.
tgross35 added a commit to tgross35/rust that referenced this pull request Jan 9, 2026
adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file
this adds the `Ordering` enum to `minicore.rs`.
consequently, this updates `tests/assembly-llvm/rust-abi-arg-attr.rs` to import `minicore` directly. previously, this test file contained traits like `Copy` `Clone` `PointeeSized`, which were giving a duplicate lang item error, so replace those by importing `minicore` completely.
@tgross35tgross35 mentioned this pull request Jan 9, 2026
Zalathar added a commit to Zalathar/rust that referenced this pull request Jan 10, 2026
adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file
this adds the `Ordering` enum to `minicore.rs`.
consequently, this updates `tests/assembly-llvm/rust-abi-arg-attr.rs` to import `minicore` directly. previously, this test file contained traits like `Copy` `Clone` `PointeeSized`, which were giving a duplicate lang item error, so replace those by importing `minicore` completely.
@ZalatharZalathar mentioned this pull request Jan 10, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jan 10, 2026
adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file
this adds the `Ordering` enum to `minicore.rs`.
consequently, this updates `tests/assembly-llvm/rust-abi-arg-attr.rs` to import `minicore` directly. previously, this test file contained traits like `Copy` `Clone` `PointeeSized`, which were giving a duplicate lang item error, so replace those by importing `minicore` completely.
Zalathar added a commit to Zalathar/rust that referenced this pull request Jan 11, 2026
adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file
this adds the `Ordering` enum to `minicore.rs`.
consequently, this updates `tests/assembly-llvm/rust-abi-arg-attr.rs` to import `minicore` directly. previously, this test file contained traits like `Copy` `Clone` `PointeeSized`, which were giving a duplicate lang item error, so replace those by importing `minicore` completely.
Zalathar added a commit to Zalathar/rust that referenced this pull request Jan 11, 2026
adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file
this adds the `Ordering` enum to `minicore.rs`.
consequently, this updates `tests/assembly-llvm/rust-abi-arg-attr.rs` to import `minicore` directly. previously, this test file contained traits like `Copy` `Clone` `PointeeSized`, which were giving a duplicate lang item error, so replace those by importing `minicore` completely.
@ZalatharZalathar mentioned this pull request Jan 11, 2026
rust-borsBot added a commit that referenced this pull request Jan 11, 2026
Rollup of 14 pull requests
Successful merges:
- #148941 (stabilize `Peekable::next_if_map` (`#![feature(peekable_next_if_map)]`))
- #150368 (adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file)
- #150668 (Unix implementation for stdio set/take/replace)
- #150743 (Reword the collect() docs)
- #150776 (Fix the connect_error test on FreeBSD 15+)
- #150781 (Use `rand` crate more idiomatically)
- #150786 (mGCA: Support array expression as direct const arguments)
- #150812 (Bump `diesel` to the most recent commit in `cargotest`)
- #150862 (std: sys: fs: uefi: Implement File::flush)
- #150873 (Reenable GCC CI download)
- #150908 (llvm: Update `reliable_f16` configuration for LLVM22)
- #150918 (std: sys: fs: uefi: Implement File::seek)
- #150922 (Subscribe myself to attr parsing)
- #150930 (Remove special case for `AllowedTargets::CrateLevel`)
r? @ghost
rust-borsBot added a commit that referenced this pull request Jan 11, 2026
Rollup of 14 pull requests
Successful merges:
- #148941 (stabilize `Peekable::next_if_map` (`#![feature(peekable_next_if_map)]`))
- #150368 (adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file)
- #150668 (Unix implementation for stdio set/take/replace)
- #150743 (Reword the collect() docs)
- #150776 (Fix the connect_error test on FreeBSD 15+)
- #150781 (Use `rand` crate more idiomatically)
- #150812 (Bump `diesel` to the most recent commit in `cargotest`)
- #150862 (std: sys: fs: uefi: Implement File::flush)
- #150873 (Reenable GCC CI download)
- #150908 (llvm: Update `reliable_f16` configuration for LLVM22)
- #150918 (std: sys: fs: uefi: Implement File::seek)
- #150922 (Subscribe myself to attr parsing)
- #150930 (Remove special case for `AllowedTargets::CrateLevel`)
- #150942 (Port `#[rustc_has_incoherent_inherent_impls]` to attribute parser)
Failed merges:
- #150943 (Port `#[must_not_suspend]` to attribute parser)
r? @ghost
@rust-bors
rust-borsBot merged commit f417f55 into rust-lang:mainJan 11, 2026
11 checks passed
@rustbotrustbot added this to the 1.94.0 milestone Jan 11, 2026
rust-timer added a commit that referenced this pull request Jan 11, 2026
Rollup merge of #150368 - minicore-ordering, r=workingjubilee
adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file
this adds the `Ordering` enum to `minicore.rs`.
consequently, this updates `tests/assembly-llvm/rust-abi-arg-attr.rs` to import `minicore` directly. previously, this test file contained traits like `Copy` `Clone` `PointeeSized`, which were giving a duplicate lang item error, so replace those by importing `minicore` completely.
github-actionsBot pushed a commit to rust-lang/miri that referenced this pull request Jan 12, 2026
Rollup of 14 pull requests
Successful merges:
- rust-lang/rust#148941 (stabilize `Peekable::next_if_map` (`#![feature(peekable_next_if_map)]`))
- rust-lang/rust#150368 (adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file)
- rust-lang/rust#150668 (Unix implementation for stdio set/take/replace)
- rust-lang/rust#150743 (Reword the collect() docs)
- rust-lang/rust#150776 (Fix the connect_error test on FreeBSD 15+)
- rust-lang/rust#150781 (Use `rand` crate more idiomatically)
- rust-lang/rust#150812 (Bump `diesel` to the most recent commit in `cargotest`)
- rust-lang/rust#150862 (std: sys: fs: uefi: Implement File::flush)
- rust-lang/rust#150873 (Reenable GCC CI download)
- rust-lang/rust#150908 (llvm: Update `reliable_f16` configuration for LLVM22)
- rust-lang/rust#150918 (std: sys: fs: uefi: Implement File::seek)
- rust-lang/rust#150922 (Subscribe myself to attr parsing)
- rust-lang/rust#150930 (Remove special case for `AllowedTargets::CrateLevel`)
- rust-lang/rust#150942 (Port `#[rustc_has_incoherent_inherent_impls]` to attribute parser)
Failed merges:
- rust-lang/rust#150943 (Port `#[must_not_suspend]` to attribute parser)
r? @ghost
@paradoxicalguy

paradoxicalguy commented Jan 25, 2026

Copy link
Copy Markdown
ContributorAuthor

@workingjubilee very out of the blue but thank you for the big feedback, i keep coming back to it
especially because this was my first pr

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-test-infra-minicoreArea: `minicore` test auxiliary and `//@ add-core-stubs`S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-rustdoc-frontendRelevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@paradoxicalguy@rustbot@rust-log-analyzer@workingjubilee@Mark-Simulacrum