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

Failed Compilation #337

Closed
iamwacko opened this issue Sep 3, 2022 · 5 comments
Closed

Failed Compilation #337

iamwacko opened this issue Sep 3, 2022 · 5 comments
Labels
bug Something isn't working ci Changes to continuous integration

Comments

@iamwacko
Copy link
Collaborator

iamwacko commented Sep 3, 2022

Describe the bug
Nightly changed it's API so .chain() is now .sources(). This broke compilation.

To Reproduce
Steps to reproduce the behavior:

  1. cargo +nightly build --bin synth
  2. See error
|
44 |         let mut chain = original.chain().collect::<Vec<_>>();
   |                                  ^^^^^ `&(dyn StdError + 'static)` is not an iterator
   |
  ::: /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/error.rs:31:1
   |
31 | pub trait Error: Debug + Display {
   | -------------------------------- doesn't satisfy `(dyn StdError + 'static): Iterator`
   |
   = note: the following trait bounds were not satisfied:
           `&(dyn StdError + 'static): Iterator`
           which is required by `&mut &(dyn StdError + 'static): Iterator`
           `(dyn StdError + 'static): Iterator`
           which is required by `&mut (dyn StdError + 'static): Iterator`

Expected behavior
Successful compilation.

Additional context
This can be fixed easily by changing .chain() to .sources(). I will make a PR fixing this soon.

@tjni
Copy link

tjni commented Nov 9, 2022

Is the patch in the related PR valid? I'm seeing this failure now when building synth using Rust 1.65.

   Compiling synth v0.6.8 (/private/tmp/nix-build-synth-0.6.8.drv-0/source/synth)
error[E0599]: `&(dyn StdError + 'static)` is not an iterator
  --> synth/src/error.rs:44:34
   |
44 |         let mut chain = original.chain().collect::<Vec<_>>();
   |                                  ^^^^^ `&(dyn StdError + 'static)` is not an iterator
   |
   = note: the following trait bounds were not satisfied:
           `&(dyn StdError + 'static): Iterator`
           which is required by `&mut &(dyn StdError + 'static): Iterator`
           `(dyn StdError + 'static): Iterator`
           which is required by `&mut (dyn StdError + 'static): Iterator`

@iamwacko
Copy link
Collaborator Author

iamwacko commented Nov 9, 2022

The patch in #338 doesn't work for some unrelated reasons. I'm working on another PR, so hopefully this will be fixed in a couple hours.

@iamwacko
Copy link
Collaborator Author

Looks like this will take longer than expected, thanks to some weird compiler errors

@tjni
Copy link

tjni commented Nov 12, 2022

@iamwacko I want to acknowledge and thank you for taking the time to look into this. This is also the first time I learned about synth, and I love what it's aiming to do to facilitate easier testing.

@iamwacko
Copy link
Collaborator Author

iamwacko commented Nov 20, 2022

@tjni The latest release of Synth should work with the latest Rust version now.

@iamwacko iamwacko added the ci Changes to continuous integration label Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ci Changes to continuous integration
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants