Diesel: syn 0.15.22 breaks diesel_derives

Created on 26 Nov 2018  ·  4Comments  ·  Source: diesel-rs/diesel

Setup

Versions

  • Rust: 1.30.1
  • Diesel: 1.33
  • Database: PostgreSQL
  • Operating System macOS 10.14.1

Feature Flags

  • diesel: default

Problem Description

The latest version of the syn crate exports a new Result type alias, which collides with std::result::Result and makes diesel_derives fail to compile.

What are you trying to accomplish?

Use diesel_derives.

What is the expected output?

diesel_derives compiles successfully.

What is the actual output?

error[E0107]: wrong number of type arguments: expected 1, found 2
  --> diesel_derives/src/util.rs:48:84
   |
48 | pub fn ty_for_foreign_derive(item: &DeriveInput, flags: &MetaItem) -> Result<Type, Diagnostic> {

Are you seeing any additional errors?

No

Steps to reproduce

Compile diesel_derives from master.

Checklist

  • [x] I have already looked over the issue tracker for similar issues.
  • [x] This issue can be reproduced on Rust's stable channel. (Your issue will be
    closed if this is not the case)

Most helpful comment

Thanks for the ping. This is why you should only glob import from modules that are documented for glob importing, like preludes. Neither the standard library nor I am going to consider something like this a breaking change for affecting glob imports.

All 4 comments

cc @dtolnay because potential breaking change in syn.

Thanks for the ping. This is why you should only glob import from modules that are documented for glob importing, like preludes. Neither the standard library nor I am going to consider something like this a breaking change for affecting glob imports.

@dtolnay See this comment on the corresponding PR. I do not consider that as major breaking change that requires some action from your side. The ping was to just let you know that this issue exists :wink:

Fixed on master

Was this page helpful?
0 / 5 - 0 ratings

Related issues

orionz picture orionz  ·  3Comments

jimmycuadra picture jimmycuadra  ·  3Comments

mkroman picture mkroman  ·  3Comments

astraw picture astraw  ·  4Comments

killercup picture killercup  ·  4Comments