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

Provide a predefined library definition of std out of the box #16

Open
dtolnay opened this issue Sep 10, 2019 · 2 comments
Open

Provide a predefined library definition of std out of the box #16

dtolnay opened this issue Sep 10, 2019 · 2 comments

Comments

@dtolnay
Copy link
Owner

dtolnay commented Sep 10, 2019

The user shouldn't have to write out their own reflect::library! description of extern crate std. A complete definition of everything in std should be built in to the reflect crate because practically all users will need it.

We still need to keep reflect::library! so that users can provide definitions of crates other than std, for example if serde_derive were implemented using reflect then it would need to contain a reflect::library! providing all the relevant signatures from the serde crate.

@eupn
Copy link
Contributor

eupn commented Nov 4, 2019

In core/std there are traits that are impl-ed with generic parameters for a generic type. Correct me if I wrong, but current library! syntax is not supporting generics and it's probably infeasible to perform trait solving to resolve generic traits implementations. So my question is, should we just ignore any impls that have generic parameters or traits that are implemented for the generic types?

@dtolnay
Copy link
Owner Author

dtolnay commented Nov 4, 2019

We'll fully support generic impls. It's not hard because the RUNTIME::std::path::to::Trait style makes the macro author do the method resolution for us.

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

No branches or pull requests

2 participants