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

Move field type bounds into where clauses #119

Merged
merged 1 commit into from
Nov 3, 2022
Merged

Conversation

djkoloski
Copy link
Member

This cleans up some of the error messages without introducing any functional changes. This will also make it easier to enable deriving on generic types in the future.

Copy link
Member

@joshlf joshlf left a comment

Choose a reason for hiding this comment

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

Nice, this is so much simpler!

@joshlf joshlf merged commit 48b3240 into google:main Nov 3, 2022
joshlf added a commit that referenced this pull request Sep 9, 2023
Clean up the implementation, especially in `fn impl_block`. Make the
following notable changes:
- Previously, `syn` didn't support parsing macro invocations in const
  generics without the `full` feature enabled. To avoid the compile-time
  overhead of that feature, we worked around it by constructing AST
  nodes manually. `syn` has since added support for this without
  requiring the `full` feature, so we make use of it.
- We used to need to split types into those that transatively depended
  upon type generics (like `[T; 2]`) and those that didn't (like
  `[u8; 2]`). We made a change in #119 that made this distinction
  irrelevant, but we never removed the code to perform the split. In
  this commit, we remove that code. That code was the only reason we
  needed to enable `syn`'s `visit` feature, so we are also able to
  remove that feature dependency.
joshlf added a commit that referenced this pull request Sep 9, 2023
Clean up the implementation, especially in `fn impl_block`. Make the
following notable changes:
- Previously, `syn` didn't support parsing macro invocations in const
  generics without the `full` feature enabled. To avoid the compile-time
  overhead of that feature, we worked around it by constructing AST
  nodes manually. `syn` has since added support for this without
  requiring the `full` feature, so we make use of it.
- We used to need to split types into those that transatively depended
  upon type generics (like `[T; 2]`) and those that didn't (like
  `[u8; 2]`). We made a change in #119 that made this distinction
  irrelevant, but we never removed the code to perform the split. In
  this commit, we remove that code. That code was the only reason we
  needed to enable `syn`'s `visit` feature, so we are also able to
  remove that feature dependency.
joshlf added a commit that referenced this pull request Sep 9, 2023
Clean up the implementation, especially in `fn impl_block`. Make the
following notable changes:
- Previously, `syn` didn't support parsing macro invocations in const
  generics without the `full` feature enabled. To avoid the compile-time
  overhead of that feature, we worked around it by constructing AST
  nodes manually. `syn` has since added support for this without
  requiring the `full` feature, so we make use of it.
- We used to need to split types into those that transatively depended
  upon type generics (like `[T; 2]`) and those that didn't (like
  `[u8; 2]`). We made a change in #119 that made this distinction
  irrelevant, but we never removed the code to perform the split. In
  this commit, we remove that code. That code was the only reason we
  needed to enable `syn`'s `visit` feature, so we are also able to
  remove that feature dependency.
joshlf added a commit that referenced this pull request Sep 9, 2023
Clean up the implementation, especially in `fn impl_block`. Make the
following notable changes:
- Previously, `syn` didn't support parsing macro invocations in const
  generics without the `full` feature enabled. To avoid the compile-time
  overhead of that feature, we worked around it by constructing AST
  nodes manually. `syn` has since added support for this without
  requiring the `full` feature, so we make use of it.
- We used to need to split types into those that transatively depended
  upon type generics (like `[T; 2]`) and those that didn't (like
  `[u8; 2]`). We made a change in #119 that made this distinction
  irrelevant, but we never removed the code to perform the split. In
  this commit, we remove that code. That code was the only reason we
  needed to enable `syn`'s `visit` feature, so we are also able to
  remove that feature dependency.
joshlf added a commit that referenced this pull request Sep 10, 2023
Clean up the implementation, especially in `fn impl_block`. Make the
following notable changes:
- Previously, `syn` didn't support parsing macro invocations in const
  generics without the `full` feature enabled. To avoid the compile-time
  overhead of that feature, we worked around it by constructing AST
  nodes manually. `syn` has since added support for this without
  requiring the `full` feature, so we make use of it.
- We used to need to split types into those that transatively depended
  upon type generics (like `[T; 2]`) and those that didn't (like
  `[u8; 2]`). We made a change in #119 that made this distinction
  irrelevant, but we never removed the code to perform the split. In
  this commit, we remove that code. That code was the only reason we
  needed to enable `syn`'s `visit` feature, so we are also able to
  remove that feature dependency.
joshlf added a commit that referenced this pull request Sep 10, 2023
Clean up the implementation, especially in `fn impl_block`. Make the
following notable changes:
- Previously, `syn` didn't support parsing macro invocations in const
  generics without the `full` feature enabled. To avoid the compile-time
  overhead of that feature, we worked around it by constructing AST
  nodes manually. `syn` has since added support for this without
  requiring the `full` feature, so we make use of it.
- We used to need to split types into those that transatively depended
  upon type generics (like `[T; 2]`) and those that didn't (like
  `[u8; 2]`). We made a change in #119 that made this distinction
  irrelevant, but we never removed the code to perform the split. In
  this commit, we remove that code. That code was the only reason we
  needed to enable `syn`'s `visit` feature, so we are also able to
  remove that feature dependency.
joshlf added a commit that referenced this pull request Sep 10, 2023
Clean up the implementation, especially in `fn impl_block`. Make the
following notable changes:
- Previously, `syn` didn't support parsing macro invocations in const
  generics without the `full` feature enabled. To avoid the compile-time
  overhead of that feature, we worked around it by constructing AST
  nodes manually. `syn` has since added support for this without
  requiring the `full` feature, so we make use of it.
- We used to need to split types into those that transatively depended
  upon type generics (like `[T; 2]`) and those that didn't (like
  `[u8; 2]`). We made a change in #119 that made this distinction
  irrelevant, but we never removed the code to perform the split. In
  this commit, we remove that code. That code was the only reason we
  needed to enable `syn`'s `visit` feature, so we are also able to
  remove that feature dependency.
joshlf added a commit that referenced this pull request Sep 11, 2023
Clean up the implementation, especially in `fn impl_block`. Make the
following notable changes:
- Previously, `syn` didn't support parsing macro invocations in const
  generics without the `full` feature enabled. To avoid the compile-time
  overhead of that feature, we worked around it by constructing AST
  nodes manually. `syn` has since added support for this without
  requiring the `full` feature, so we make use of it.
- We used to need to split types into those that transatively depended
  upon type generics (like `[T; 2]`) and those that didn't (like
  `[u8; 2]`). We made a change in #119 that made this distinction
  irrelevant, but we never removed the code to perform the split. In
  this commit, we remove that code. That code was the only reason we
  needed to enable `syn`'s `visit` feature, so we are also able to
  remove that feature dependency.
joshlf added a commit that referenced this pull request Sep 11, 2023
Clean up the implementation, especially in `fn impl_block`. Make the
following notable changes:
- Previously, `syn` didn't support parsing macro invocations in const
  generics without the `full` feature enabled. To avoid the compile-time
  overhead of that feature, we worked around it by constructing AST
  nodes manually. `syn` has since added support for this without
  requiring the `full` feature, so we make use of it.
- We used to need to split types into those that transatively depended
  upon type generics (like `[T; 2]`) and those that didn't (like
  `[u8; 2]`). We made a change in #119 that made this distinction
  irrelevant, but we never removed the code to perform the split. In
  this commit, we remove that code. That code was the only reason we
  needed to enable `syn`'s `visit` feature, so we are also able to
  remove that feature dependency.
joshlf added a commit that referenced this pull request Sep 11, 2023
Clean up the implementation, especially in `fn impl_block`. Make the
following notable changes:
- Previously, `syn` didn't support parsing macro invocations in const
  generics without the `full` feature enabled. To avoid the compile-time
  overhead of that feature, we worked around it by constructing AST
  nodes manually. `syn` has since added support for this without
  requiring the `full` feature, so we make use of it.
- We used to need to split types into those that transatively depended
  upon type generics (like `[T; 2]`) and those that didn't (like
  `[u8; 2]`). We made a change in #119 that made this distinction
  irrelevant, but we never removed the code to perform the split. In
  this commit, we remove that code. That code was the only reason we
  needed to enable `syn`'s `visit` feature, so we are also able to
  remove that feature dependency.
joshlf added a commit that referenced this pull request Sep 11, 2023
Clean up the implementation, especially in `fn impl_block`. Make the
following notable changes:
- Previously, `syn` didn't support parsing macro invocations in const
  generics without the `full` feature enabled. To avoid the compile-time
  overhead of that feature, we worked around it by constructing AST
  nodes manually. `syn` has since added support for this without
  requiring the `full` feature, so we make use of it.
- We used to need to split types into those that transatively depended
  upon type generics (like `[T; 2]`) and those that didn't (like
  `[u8; 2]`). We made a change in #119 that made this distinction
  irrelevant, but we never removed the code to perform the split. In
  this commit, we remove that code. That code was the only reason we
  needed to enable `syn`'s `visit` feature, so we are also able to
  remove that feature dependency.
joshlf added a commit that referenced this pull request Sep 11, 2023
Clean up the implementation, especially in `fn impl_block`. Make the
following notable changes:
- Previously, `syn` didn't support parsing macro invocations in const
  generics without the `full` feature enabled. To avoid the compile-time
  overhead of that feature, we worked around it by constructing AST
  nodes manually. `syn` has since added support for this without
  requiring the `full` feature, so we make use of it.
- We used to need to split types into those that transatively depended
  upon type generics (like `[T; 2]`) and those that didn't (like
  `[u8; 2]`). We made a change in #119 that made this distinction
  irrelevant, but we never removed the code to perform the split. In
  this commit, we remove that code. That code was the only reason we
  needed to enable `syn`'s `visit` feature, so we are also able to
  remove that feature dependency.
joshlf added a commit that referenced this pull request Sep 11, 2023
Clean up the implementation, especially in `fn impl_block`. Make the
following notable changes:
- Previously, `syn` didn't support parsing macro invocations in const
  generics without the `full` feature enabled. To avoid the compile-time
  overhead of that feature, we worked around it by constructing AST
  nodes manually. `syn` has since added support for this without
  requiring the `full` feature, so we make use of it.
- We used to need to split types into those that transatively depended
  upon type generics (like `[T; 2]`) and those that didn't (like
  `[u8; 2]`). We made a change in #119 that made this distinction
  irrelevant, but we never removed the code to perform the split. In
  this commit, we remove that code. That code was the only reason we
  needed to enable `syn`'s `visit` feature, so we are also able to
  remove that feature dependency.
joshlf added a commit that referenced this pull request Sep 11, 2023
Clean up the implementation, especially in `fn impl_block`. Make the
following notable changes:
- Previously, `syn` didn't support parsing macro invocations in const
  generics without the `full` feature enabled. To avoid the compile-time
  overhead of that feature, we worked around it by constructing AST
  nodes manually. `syn` has since added support for this without
  requiring the `full` feature, so we make use of it.
- We used to need to split types into those that transatively depended
  upon type generics (like `[T; 2]`) and those that didn't (like
  `[u8; 2]`). We made a change in #119 that made this distinction
  irrelevant, but we never removed the code to perform the split. In
  this commit, we remove that code. That code was the only reason we
  needed to enable `syn`'s `visit` feature, so we are also able to
  remove that feature dependency.
joshlf added a commit that referenced this pull request Sep 12, 2023
Clean up the implementation, especially in `fn impl_block`. Make the
following notable changes:
- Previously, `syn` didn't support parsing macro invocations in const
  generics without the `full` feature enabled. To avoid the compile-time
  overhead of that feature, we worked around it by constructing AST
  nodes manually. `syn` has since added support for this without
  requiring the `full` feature, so we make use of it.
- We used to need to split types into those that transatively depended
  upon type generics (like `[T; 2]`) and those that didn't (like
  `[u8; 2]`). We made a change in #119 that made this distinction
  irrelevant, but we never removed the code to perform the split. In
  this commit, we remove that code. That code was the only reason we
  needed to enable `syn`'s `visit` feature, so we are also able to
  remove that feature dependency.
joshlf added a commit that referenced this pull request Sep 12, 2023
Clean up the implementation, especially in `fn impl_block`. Make the
following notable changes:
- Previously, `syn` didn't support parsing macro invocations in const
  generics without the `full` feature enabled. To avoid the compile-time
  overhead of that feature, we worked around it by constructing AST
  nodes manually. `syn` has since added support for this without
  requiring the `full` feature, so we make use of it.
- We used to need to split types into those that transatively depended
  upon type generics (like `[T; 2]`) and those that didn't (like
  `[u8; 2]`). We made a change in #119 that made this distinction
  irrelevant, but we never removed the code to perform the split. In
  this commit, we remove that code. That code was the only reason we
  needed to enable `syn`'s `visit` feature, so we are also able to
  remove that feature dependency.
joshlf added a commit that referenced this pull request Sep 12, 2023
Clean up the implementation, especially in `fn impl_block`. Make the
following notable changes:
- Previously, `syn` didn't support parsing macro invocations in const
  generics without the `full` feature enabled. To avoid the compile-time
  overhead of that feature, we worked around it by constructing AST
  nodes manually. `syn` has since added support for this without
  requiring the `full` feature, so we make use of it.
- We used to need to split types into those that transatively depended
  upon type generics (like `[T; 2]`) and those that didn't (like
  `[u8; 2]`). We made a change in #119 that made this distinction
  irrelevant, but we never removed the code to perform the split. In
  this commit, we remove that code. That code was the only reason we
  needed to enable `syn`'s `visit` feature, so we are also able to
  remove that feature dependency.
joshlf added a commit that referenced this pull request Sep 12, 2023
Clean up the implementation, especially in `fn impl_block`. Make the
following notable changes:
- Previously, `syn` didn't support parsing macro invocations in const
  generics without the `full` feature enabled. To avoid the compile-time
  overhead of that feature, we worked around it by constructing AST
  nodes manually. `syn` has since added support for this without
  requiring the `full` feature, so we make use of it.
- We used to need to split types into those that transatively depended
  upon type generics (like `[T; 2]`) and those that didn't (like
  `[u8; 2]`). We made a change in #119 that made this distinction
  irrelevant, but we never removed the code to perform the split. In
  this commit, we remove that code. That code was the only reason we
  needed to enable `syn`'s `visit` feature, so we are also able to
  remove that feature dependency.
joshlf added a commit that referenced this pull request Sep 12, 2023
Clean up the implementation, especially in `fn impl_block`. Make the
following notable changes:
- Previously, `syn` didn't support parsing macro invocations in const
  generics without the `full` feature enabled. To avoid the compile-time
  overhead of that feature, we worked around it by constructing AST
  nodes manually. `syn` has since added support for this without
  requiring the `full` feature, so we make use of it.
- We used to need to split types into those that transatively depended
  upon type generics (like `[T; 2]`) and those that didn't (like
  `[u8; 2]`). We made a change in #119 that made this distinction
  irrelevant, but we never removed the code to perform the split. In
  this commit, we remove that code. That code was the only reason we
  needed to enable `syn`'s `visit` feature, so we are also able to
  remove that feature dependency.
joshlf added a commit that referenced this pull request Sep 12, 2023
Clean up the implementation, especially in `fn impl_block`. Make the
following notable changes:
- Previously, `syn` didn't support parsing macro invocations in const
  generics without the `full` feature enabled. To avoid the compile-time
  overhead of that feature, we worked around it by constructing AST
  nodes manually. `syn` has since added support for this without
  requiring the `full` feature, so we make use of it.
- We used to need to split types into those that transatively depended
  upon type generics (like `[T; 2]`) and those that didn't (like
  `[u8; 2]`). We made a change in #119 that made this distinction
  irrelevant, but we never removed the code to perform the split. In
  this commit, we remove that code. That code was the only reason we
  needed to enable `syn`'s `visit` feature, so we are also able to
  remove that feature dependency.
joshlf added a commit that referenced this pull request Sep 12, 2023
Clean up the implementation, especially in `fn impl_block`. Make the
following notable changes:
- Previously, `syn` didn't support parsing macro invocations in const
  generics without the `full` feature enabled. To avoid the compile-time
  overhead of that feature, we worked around it by constructing AST
  nodes manually. `syn` has since added support for this without
  requiring the `full` feature, so we make use of it.
- We used to need to split types into those that transatively depended
  upon type generics (like `[T; 2]`) and those that didn't (like
  `[u8; 2]`). We made a change in #119 that made this distinction
  irrelevant, but we never removed the code to perform the split. In
  this commit, we remove that code. That code was the only reason we
  needed to enable `syn`'s `visit` feature, so we are also able to
  remove that feature dependency.
joshlf added a commit that referenced this pull request Sep 12, 2023
Clean up the implementation, especially in `fn impl_block`. Make the
following notable changes:
- Previously, `syn` didn't support parsing macro invocations in const
  generics without the `full` feature enabled. To avoid the compile-time
  overhead of that feature, we worked around it by constructing AST
  nodes manually. `syn` has since added support for this without
  requiring the `full` feature, so we make use of it.
- We used to need to split types into those that transatively depended
  upon type generics (like `[T; 2]`) and those that didn't (like
  `[u8; 2]`). We made a change in #119 that made this distinction
  irrelevant, but we never removed the code to perform the split. In
  this commit, we remove that code. That code was the only reason we
  needed to enable `syn`'s `visit` feature, so we are also able to
  remove that feature dependency.
joshlf added a commit that referenced this pull request Sep 12, 2023
Clean up the implementation, especially in `fn impl_block`. Make the
following notable changes:
- Previously, `syn` didn't support parsing macro invocations in const
  generics without the `full` feature enabled. To avoid the compile-time
  overhead of that feature, we worked around it by constructing AST
  nodes manually. `syn` has since added support for this without
  requiring the `full` feature, so we make use of it.
- We used to need to split types into those that transatively depended
  upon type generics (like `[T; 2]`) and those that didn't (like
  `[u8; 2]`). We made a change in #119 that made this distinction
  irrelevant, but we never removed the code to perform the split. In
  this commit, we remove that code. That code was the only reason we
  needed to enable `syn`'s `visit` feature, so we are also able to
  remove that feature dependency.
joshlf added a commit that referenced this pull request Sep 12, 2023
Clean up the implementation, especially in `fn impl_block`. Make the
following notable changes:
- Previously, `syn` didn't support parsing macro invocations in const
  generics without the `full` feature enabled. To avoid the compile-time
  overhead of that feature, we worked around it by constructing AST
  nodes manually. `syn` has since added support for this without
  requiring the `full` feature, so we make use of it.
- We used to need to split types into those that transatively depended
  upon type generics (like `[T; 2]`) and those that didn't (like
  `[u8; 2]`). We made a change in #119 that made this distinction
  irrelevant, but we never removed the code to perform the split. In
  this commit, we remove that code. That code was the only reason we
  needed to enable `syn`'s `visit` feature, so we are also able to
  remove that feature dependency.
joshlf added a commit that referenced this pull request Sep 12, 2023
Clean up the implementation, especially in `fn impl_block`. Make the
following notable changes:
- Previously, `syn` didn't support parsing macro invocations in const
  generics without the `full` feature enabled. To avoid the compile-time
  overhead of that feature, we worked around it by constructing AST
  nodes manually. `syn` has since added support for this without
  requiring the `full` feature, so we make use of it.
- We used to need to split types into those that transatively depended
  upon type generics (like `[T; 2]`) and those that didn't (like
  `[u8; 2]`). We made a change in #119 that made this distinction
  irrelevant, but we never removed the code to perform the split. In
  this commit, we remove that code. That code was the only reason we
  needed to enable `syn`'s `visit` feature, so we are also able to
  remove that feature dependency.
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.

2 participants