Skip to content

Commit

Permalink
Merge pull request #15 from dtolnay/fnregression
Browse files Browse the repository at this point in the history
Work around rustc fn ptr parsing regression
  • Loading branch information
dtolnay authored Oct 29, 2020
2 parents cef4078 + 9794097 commit 79e3530
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ fn trivial_fields(fields: &Fields) -> Result<Vec<&Type>> {
Ok(trivial)
}

fn decide_trivial(fields: &Fields) -> Result<fn(&Field) -> Result<bool>> {
// FIXME: https://github.com/rust-lang/rust/issues/78507
type Workaround = fn(&Field) -> Result<bool>;
fn decide_trivial(fields: &Fields) -> Result<Workaround> {
for field in fields {
if is_explicit_trivial(field)? {
return Ok(is_explicit_trivial);
Expand Down

0 comments on commit 79e3530

Please sign in to comment.