Skip to content

Commit

Permalink
avoid ambiguous associated item in TryFrom implementations
Browse files Browse the repository at this point in the history
This was previously accepted by the compiler but is being
phased out; it will become a hard error in a future release!

See also: rust-lang/rust#57644
  • Loading branch information
hunts authored and Hunts Chen committed Jan 30, 2023
1 parent c1b4c3a commit 991aca3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion capnpc/src/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1937,7 +1937,7 @@ fn generate_node(
))),
Indent(Box::new(Branch(vec![
Line(
"fn try_from(value: u16) -> ::core::result::Result<Self, Self::Error> {"
"fn try_from(value: u16) -> ::core::result::Result<Self, <{last_name} as ::core::convert::TryFrom<u16>>::Error> {"
.to_string(),
),
Indent(Box::new(Branch(vec![
Expand Down

0 comments on commit 991aca3

Please sign in to comment.