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 adding generics to impl and trait name #90

Merged
merged 4 commits into from
Nov 8, 2024

Conversation

branchseer
Copy link
Contributor

Prerequisites of bincode-org/bincode#710.

This PR allows

  • adding generics after the trait name: impl<'a> Foo<&'a str> for StructOrEnum<'a>
  • adding generics after the impl keyword: impl<T1, T2, Bar> Foo for StructOrEnum<T1, T2>

@branchseer branchseer marked this pull request as draft November 6, 2024 14:59
@branchseer branchseer marked this pull request as ready for review November 6, 2024 15:07
@@ -364,6 +364,7 @@ pub struct EnumVariant {
/// - `Baz = 5`
/// - `Baz(i32) = 5`
/// - `Baz { a: i32} = 5`
///
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fix error raised by rust-clippy 0.1.81:

error: doc list item without indentation
   --> src/parse/body.rs:367:9
    |
367 |     /// In either case this value will be `Some(Literal::i32(5))`
    |         ^
    |

@VictorKoenders
Copy link
Contributor

VictorKoenders commented Nov 8, 2024

One minor formatting issue:

Diff in /home/runner/work/virtue/virtue/src/parse/body.rs:364:
     /// - `Baz = 5`
     /// - `Baz(i32) = 5`
     /// - `Baz { a: i32} = 5`
-    /// 
+    ///
     /// In either case this value will be `Some(Literal::i32(5))`
     pub value: Option<Literal>,
     /// The attributes of this variant

Other than that LGTM

@VictorKoenders VictorKoenders merged commit c640323 into bincode-org:trunk Nov 8, 2024
6 of 7 checks passed
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