Skip to content

Move Duration type to libcore #46520

@clarfonthey

Description

@clarfonthey
Contributor

Right now there isn't anything that requires keeping this type in libstd, and it may be useful for libraries that work with time in a no_std context. It makes sense to move this type to libcore.

Activity

added
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.
T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.
on Dec 5, 2017
bstrie

bstrie commented on Dec 5, 2017

@bstrie
Contributor

I thought that all types in libstd were there for a reason, is there a historical reason that this was left in? Should we audit libstd for other types that don't need to be there?

clarfonthey

clarfonthey commented on Dec 5, 2017

@clarfonthey
ContributorAuthor

@bstrie everything in libcore is also in libstd, more or less. libcore is just a smaller version of libstd that doesn't rely on platform-specific behaviour at all.

I do think that libstd should be audited for types that can be moved to libcore; this is just one case of that.

sfackler

sfackler commented on Dec 5, 2017

@sfackler
Member

AFAIK it's only in std because the rest of the time module was defined there, and Instant and SystemTime both need std. Seems fine to move Duration though.

Mark-Simulacrum

Mark-Simulacrum commented on Dec 6, 2017

@Mark-Simulacrum
Member

I think a PR for this would be reasonable. Marking as feature-accepted.

added
C-feature-acceptedCategory: A feature request that has been accepted pending implementation.
and removed
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.
on Dec 6, 2017
added a commit that references this issue on Jan 31, 2018
b8f2674
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-acceptedCategory: A feature request that has been accepted pending implementation.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @kennytm@bstrie@sfackler@Mark-Simulacrum@clarfonthey

        Issue actions

          Move `Duration` type to libcore · Issue #46520 · rust-lang/rust