Skip to content
This repository was archived by the owner on Dec 17, 2025. It is now read-only.

Allow adding generics to impl and trait name#90

Merged
VictorKoenders merged 4 commits intobincode-org:trunkfrom
branchseer:with_impl_generics
Nov 8, 2024
Merged

Allow adding generics to impl and trait name#90
VictorKoenders merged 4 commits intobincode-org:trunkfrom
branchseer:with_impl_generics

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
/// - `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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants