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

Allow legacy custom derive authors to disable warnings in downstream crates #38533

Merged
merged 1 commit into from
Dec 23, 2016

Conversation

jseyfried
Copy link
Contributor

This PR allows legacy custom derive authors to use a pre-deprecated method registry.register_custom_derive() instead of registry.register_syntax_extension() to avoid downstream deprecation warnings.

r? @nrc

@jseyfried
Copy link
Contributor Author

cc @SergioBenitez

Copy link
Member

@nrc nrc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r = me with some docs

@@ -115,6 +118,17 @@ impl<'a> Registry<'a> {
}));
}

#[unstable(feature = "rustc_private", issue = "27812")]
#[rustc_deprecated(since = "1.15.0", reason = "replaced by macros 1.1 (RFC 1861)")]
pub fn register_custom_derive(&mut self, name: ast::Name, extension: SyntaxExtension) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you document here when an author should use this and what its effects are please?

@jseyfried jseyfried force-pushed the legacy_custom_derive_deprecation branch from b0243d6 to fa3e910 Compare December 23, 2016 05:44
@jseyfried jseyfried force-pushed the legacy_custom_derive_deprecation branch from fa3e910 to c12fc66 Compare December 23, 2016 05:49
@jseyfried
Copy link
Contributor Author

@bors r=nrc

@bors
Copy link
Contributor

bors commented Dec 23, 2016

📌 Commit c12fc66 has been approved by nrc

@bors
Copy link
Contributor

bors commented Dec 23, 2016

⌛ Testing commit c12fc66 with merge 467a7f0...

bors added a commit that referenced this pull request Dec 23, 2016
Allow legacy custom derive authors to disable warnings in downstream crates

This PR allows legacy custom derive authors to use a pre-deprecated method `registry.register_custom_derive()` instead of `registry.register_syntax_extension()` to avoid downstream deprecation warnings.

r? @nrc
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.

3 participants