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

Improve ergonomics of name_of!(type …) in Rust 2018 #1

Merged
merged 1 commit into from
Mar 25, 2019
Merged

Improve ergonomics of name_of!(type …) in Rust 2018 #1

merged 1 commit into from
Mar 25, 2019

Conversation

bash
Copy link
Contributor

@bash bash commented Mar 24, 2019

This PR improves the ergonomics of using name_of!(type …) in the 2018 edition.

By adding the $crate:: prefix to the invocation of the name_of_type!, users of the name_of! macro don't have to import name_of_type! macro too.

@SilentByte SilentByte merged commit dafc887 into SilentByte:master Mar 25, 2019
@SilentByte
Copy link
Owner

Good call, I merged the changes and published a new version on Cargo.

Cheers!

@bash bash deleted the rust-2018-imports branch March 25, 2019 06:18
@jeremystucki
Copy link

The release should have been a feature release, because a crate might depend on the new functionality introduced with 1.0.2 (being able to use name_of!(type ...) without importing name_of_type!).

This might be an issue in the following situation:

Given that crate A depends on crate B and the following versions:

crate Cargo.toml Cargo.lock
crate A - 1.0.1
crate B 1.0 -

When crate B uses the new feature from 1.0.2, crate A fails to build.

I recommend releasing two new versions:

  • 1.0.3 (Identical to 1.0.1)
  • 1.1.0 (Identical to 1.0.2)

Also 1.0.2 should be yanked from crates.io.


Co-written-by: @bash

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.

None yet

3 participants