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

Prepare for being included via crates.io into std #1134

Merged
merged 1 commit into from
Nov 22, 2018

Conversation

alexcrichton
Copy link
Member

This commit prepares the libc crate to be included directly into the
standard library via crates.io. More details about this can be found on
rust-lang/rust#56092, but the main idea is that this crate now depends
on core/compiler-builtins explicitly (but off-by-default).

The main caveat here is that this activates no_core when building as
part of libstd, which means that it needs to explicitly have an iter
and option module for the expansion of for loops to work.

@rust-highfive
Copy link

@alexcrichton: no appropriate reviewer found, use r? to override

@alexcrichton
Copy link
Member Author

r? @gnzlbg

@gnzlbg
Copy link
Contributor

gnzlbg commented Nov 21, 2018

LGTM.

[features]
default = ["use_std"]
use_std = []
align = []
rustc-dep-of-std = ['align', 'rustc-std-workspace-core']
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know if this should enable use_std as well to be sure - it should be enabled by default anyways as long as libstd doesn't use default-features=false.

Copy link
Member Author

Choose a reason for hiding this comment

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

Nah this specifically actually doesn't want use_std because std isn't built yet! (this'll be a dependency of std)

@gnzlbg
Copy link
Contributor

gnzlbg commented Nov 21, 2018

The style checks are failing

@alexcrichton
Copy link
Member Author

@bors: r=gnzlbg

@bors
Copy link
Contributor

bors commented Nov 21, 2018

📌 Commit aa5304f has been approved by gnzlbg

@alexcrichton
Copy link
Member Author

@bors: r=gnzlbg

@bors
Copy link
Contributor

bors commented Nov 21, 2018

📌 Commit 05ff162 has been approved by gnzlbg

@bors
Copy link
Contributor

bors commented Nov 21, 2018

🔒 Merge conflict

This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again.

How do I rebase?

Assuming self is your fork and upstream is this repository, you can resolve the conflict following these steps:

  1. git checkout rustc-test (switch to your branch)
  2. git fetch upstream master (retrieve the latest master)
  3. git rebase upstream/master -p (rebase on top of it)
  4. Follow the on-screen instruction to resolve conflicts (check git status if you got lost).
  5. git push self rustc-test --force-with-lease (update this PR)

You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial.

Please avoid the "Resolve conflicts" button on GitHub. It uses git merge instead of git rebase which makes the PR commit history more difficult to read.

Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Cargo.lock conflict is handled during merge and rebase. This is normal, and you should still perform step 5 to update this PR.

Error message
Auto-merging src/windows.rs
Auto-merging src/unix/mod.rs
Auto-merging src/lib.rs
CONFLICT (content): Merge conflict in src/lib.rs
Auto-merging libc-test/build.rs
Automatic merge failed; fix conflicts and then commit the result.

@bors
Copy link
Contributor

bors commented Nov 21, 2018

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

This commit prepares the `libc` crate to be included directly into the
standard library via crates.io. More details about this can be found on
rust-lang/rust#56092, but the main idea is that this crate now depends
on core/compiler-builtins explicitly (but off-by-default).

The main caveat here is that this activates `no_core` when building as
part of libstd, which means that it needs to explicitly have an `iter`
and `option` module for the expansion of `for` loops to work.
@alexcrichton
Copy link
Member Author

@bors: r=gnzlbg

@bors
Copy link
Contributor

bors commented Nov 21, 2018

📌 Commit 91bd079 has been approved by gnzlbg

@bors
Copy link
Contributor

bors commented Nov 21, 2018

⌛ Testing commit 91bd079 with merge 03310f8...

bors added a commit that referenced this pull request Nov 21, 2018
Prepare for being included via crates.io into std

This commit prepares the `libc` crate to be included directly into the
standard library via crates.io. More details about this can be found on
rust-lang/rust#56092, but the main idea is that this crate now depends
on core/compiler-builtins explicitly (but off-by-default).

The main caveat here is that this activates `no_core` when building as
part of libstd, which means that it needs to explicitly have an `iter`
and `option` module for the expansion of `for` loops to work.
@bors
Copy link
Contributor

bors commented Nov 22, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: gnzlbg
Pushing 03310f8 to master...

@bors bors merged commit 91bd079 into rust-lang:master Nov 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants