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

Cleaning up core crates dependencies on libextra #12255

Closed
wants to merge 1 commit into from
Closed

Cleaning up core crates dependencies on libextra #12255

wants to merge 1 commit into from

Conversation

HeroesGrave
Copy link
Contributor

A key part of splitting, and therefore removing libextra (#8784) would be to remove other core crates' dependencies on it.

I've started off with libsyntax, which didn't even require anything from libextra.

When I went to go and cleanup librustc, I came across a few requirements, and I'm not sure how these should be handled. Some just don't seem like they need to be in their own crate:

  • extra::time. My initial thought would be a libtime, but perhaps it could go in libstd?
  • extra::tempfile. I think this should be part of std::io::fs, but I wanted to check first.
  • extra::enum_set. I honestly have no idea where this would belong.

Any input on where those three should go?

@alexcrichton
Copy link
Member

I think that with some polish we may be able to add the tempfile module under std::io::tempfile, but we should think carefully about the api before moving it.

We do indeed need some form of time abstraction in a few places throughout libstd, but extra::time may not be the best abstraction (unknown).

Perhaps enum_set could move to libcollections?

@HeroesGrave HeroesGrave deleted the cleanup-extra-deps branch February 14, 2014 21:39
flip1995 pushed a commit to flip1995/rust that referenced this pull request Feb 26, 2024
Take lifetime extension into account in `ref_as_ptr`

fixes rust-lang#12255

This should be merged upstream as well. Changing `let x = &temp as *const _` into `let x = from_ref(&temp)` is UB.

changelog: `ref_as_ptr`: Take lifetime extension into account
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.

2 participants