-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file #150368
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
base: main
Are you sure you want to change the base?
Conversation
|
This PR modifies cc @jieyouxu |
|
|
|
rustbot has assigned @Mark-Simulacrum. Use |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
ae5f45a to
6896c91
Compare
This comment has been minimized.
This comment has been minimized.
a999dcd to
b557438
Compare
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
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?
tests/auxiliary/minicore.rs
Outdated
|
|
||
| #[lang = "c_void"] | ||
| #[repr(u8)] | ||
| #[repr(C)] |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure!
tests/auxiliary/minicore.rs
Outdated
| #[lang = "Ordering"] | ||
| #[repr(i8)] | ||
| pub enum Ordering { | ||
| Less = 0xFFu8 as i8, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
tests/auxiliary/minicore.rs
Outdated
| #[rustc_nounwind] | ||
| #[rustc_intrinsic] | ||
| pub const fn three_way_compare<T: Copy>(lhs: T, rhs: T) -> Ordering; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
|
Reminder, once the PR becomes ready for a review, use |
|
fixed minicore issues, aligned ordering and usize behavior, ready for re-review |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@rustbot ready |
|
@workingjubilee adding if you'd prefer -1 for readability, i can add the Neg implementation |
|
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 |
|
#150423 |
|
@workingjubilee i have added the i found 2 ways to fix it which passes locally:
|
e2bf58d to
c933872
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This comment has been minimized.
This comment has been minimized.
|
@workingjubilee i have closed the duplicate PR and pushed the CI failure is the duplicate lang item issue i asked in my previous comment, when importing |
|
@workingjubilee just following up, waiting for whichever solution you prefer for the duplicate lang item error. i'll update the PR |
bc44eee to
484ea76
Compare
|
@paradoxicalguy It seems that this test was the only one that actually used It's arguably fine to make the change since it makes it easier to write certain tests and verify they cross-compile. But "some" is awfully vague when it's just 1. |
|
@bors r+ |
|
yay :-D |
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.
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.
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.
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.
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.
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.
this adds the
Orderingenum tominicore.rs.consequently, this updates
tests/assembly-llvm/rust-abi-arg-attr.rsto importminicoredirectly. previously, this test file contained traits likeCopyClonePointeeSized, which were giving a duplicate lang item error, so replace those by importingminicorecompletely.