Skip to content

Cannot import same impls from two numeric types at once #2716

@bstrie

Description

@bstrie

There are three impls in int-template.rs and uint-template.rs that apply to all numeric types. Until recently, if you tried to do this:

import int::num;
import i8::num;

you'd receive "error: duplicate definition of type num". d14d415 fixed this for the particular case of the num impl, but trying to duplicate the process for the eq and ord impls gives weird errors in libstd/sort.rs that I'm hoping the resolve rewrite will, er, resolve. It won't be possible to automatically export the eq and ord impls on numeric types until this is fixed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-resolveArea: Name/path resolution done by `rustc_resolve` specifically

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions