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

Remove impl Add<&Prefix> for String #68

Closed
erenon opened this issue Jul 1, 2022 · 1 comment · Fixed by #69
Closed

Remove impl Add<&Prefix> for String #68

erenon opened this issue Jul 1, 2022 · 1 comment · Fixed by #69

Comments

@erenon
Copy link
Contributor

erenon commented Jul 1, 2022

Because of rust-lang/rust#77143, the impl Add<&Prefix> for String can prevent the compilation of unrelated, previously working programs, if they use string concat. This prevents adding this library to such a project, or prevents adding other deps to a project that already uses prometheus. The resulting error message is also cryptict.

Please consider removing the trait impl, thanks.

@mxinden
Copy link
Member

mxinden commented Jul 4, 2022

I am fine removing it, especially since Prefix is private. Want to propose a patch @erenon?

erenon added a commit to erenon/client_rust that referenced this issue Jul 4, 2022
They interact with builtin implementation in confusing ways:
rust-lang/rust#77143

Fixes prometheus#68
erenon added a commit to erenon/client_rust that referenced this issue Jul 4, 2022
They interact with builtin implementation in confusing ways:
rust-lang/rust#77143

Fixes prometheus#68

Signed-off-by: Benedek Thaler <erenon2@gmail.com>
erenon added a commit to erenon/client_rust that referenced this issue Jul 10, 2022
They interact with builtin implementation in confusing ways:
rust-lang/rust#77143

Fixes prometheus#68

Signed-off-by: Benedek Thaler <erenon2@gmail.com>
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 a pull request may close this issue.

2 participants