-
Notifications
You must be signed in to change notification settings - Fork 925
deps: Update syntex_syntax to 0.31.0 #971
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
Conversation
Most of the churn on this bump comes from the `Visibility` enum changing from pub enum Visibility { Public, Inherited, } to pub enum Visibility { Public, Crate, Restricted { path: P<Path>, id: NodeId }, Inherited, } which require taking `Visibility` by reference in most places. The new variants are not handled at this point. Refs rust-lang#970
Visibility::Public => "pub ", | ||
Visibility::Inherited => "", | ||
// TODO(#970): Handle new visibility types. | ||
Visibility::Crate => unimplemented!(), | ||
Visibility::Restricted { .. } => unimplemented!(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we handle these by returning None and then skipping the item, falling back to the missing spans? That is better than panicking, I think.
Also, (nit) if there is an issue number, prefer FIXME
to TODO
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
All looks good, other than the comment on the panics, thanks! |
We can land this, but we need syntex 0.32 for the try shorthand. This heroic pull request by antrik includes the required changes. |
I'm happy to do another bump. I kind of enjoy the compiler-error chasing that goes with these bumps. Nice break from other stuff sometimes! |
Assuming this is acceptable as an approach for handling the |
This commit properly handles pub(restricted) as introduced in RFC 1422 [0]. The syntax support was added in rust-lang#971, but they were not correctly formatted. [0] https://github.com/rust-lang/rfcs/blob/master/text/1422-pub-restricted.md Fixes rust-lang#970
* Handle pub(restricted) This commit properly handles pub(restricted) as introduced in RFC 1422 [0]. The syntax support was added in #971, but they were not correctly formatted. [0] https://github.com/rust-lang/rfcs/blob/master/text/1422-pub-restricted.md Fixes #970 * Drop #[inline] attribute on format_visibility * Make newly non-failing functions return String The change to `format_visibiilty` means that `format_header` and `format_unit_struct` can no longer fail. Their return type is updated to reflect that.
Most of the churn on this bump comes from the
Visibility
enum changingfrom
to
which require taking
Visibility
by reference in most places. The newvariants are not handled at this point.
Refs #970