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

2020-09-05 Nightly type ascription errors on macOS/Linux/Windows #76428

Closed
CleanCut opened this issue Sep 7, 2020 · 4 comments
Closed

2020-09-05 Nightly type ascription errors on macOS/Linux/Windows #76428

CleanCut opened this issue Sep 7, 2020 · 4 comments
Labels
A-proc-macros Area: Procedural macros C-bug Category: This is a bug. regression-from-stable-to-nightly Performance or correctness regression from stable to nightly.

Comments

@CleanCut
Copy link
Contributor

CleanCut commented Sep 7, 2020

Amethyst game engine's CI crashes with type ascription errors on rustc 1.48.0-nightly (cdc8f0606 2020-09-05)

# macOS
cargo test --workspace --features=metal,tiles

# Linux, Windows
cargo test --workspace --features=vulkan,tiles

I expected to see this happen: Relatively the same result as stable/beta.

Instead, nightly failed while both beta and stable passed. See this run

error: expected type, found `:`
  --> C:\Users\runneradmin\.cargo\registry\src\gitpro.ttaallkk.top-1ecc6299db9ec823\rendy-texture-0.4.1\src\format\image.rs:85:10
   |
85 | #[derive(Derivative, Debug, Clone, PartialEq, Eq)]
   |          ^^^^^^^^^^
   |          |
   |          expected type
   |          tried to parse a type due to this type ascription
   |          while parsing this struct
   |
   = note: `#![feature(type_ascription)]` lets you annotate an expression with a type: `<expr>: <type>`
   = note: see issue #23416 <https://github.com/rust-lang/rust/issues/23416> for more information

error: expected expression, found `:`
  --> C:\Users\runneradmin\.cargo\registry\src\gitpro.ttaallkk.top-1ecc6299db9ec823\rendy-texture-0.4.1\src\format\image.rs:85:10
   |
85 | #[derive(Derivative, Debug, Clone, PartialEq, Eq)]
   |          ^^^^^^^^^^
   |          |
   |          expected expression
   |          while parsing this struct

error: proc-macro derive produced unparseable tokens
  --> C:\Users\runneradmin\.cargo\registry\src\gitpro.ttaallkk.top-1ecc6299db9ec823\rendy-texture-0.4.1\src\format\image.rs:85:10
   |
85 | #[derive(Derivative, Debug, Clone, PartialEq, Eq)]
   |          ^^^^^^^^^^

error[E0560]: struct `ImageTextureConfig` has no field named `gfx_hal`
  --> C:\Users\runneradmin\.cargo\registry\src\gitpro.ttaallkk.top-1ecc6299db9ec823\rendy-texture-0.4.1\src\format\image.rs:85:10
   |
85 | #[derive(Derivative, Debug, Clone, PartialEq, Eq)]
   |          ^^^^^^^^^^ `ImageTextureConfig` does not have this field
   |
   = note: available fields are: `format`, `repr`, `kind`, `sampler_info`, `generate_mips`, `premultiply_alpha`

error: aborting due to 4 previous errors

For more information about this error, try `rustc --explain E0560`.
error: could not compile `rendy-texture`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
##[error]Process completed with exit code 1.
@CleanCut CleanCut added the C-bug Category: This is a bug. label Sep 7, 2020
@jyn514
Copy link
Member

jyn514 commented Sep 7, 2020

Are you sure this is because of type ascription? It looks like something is going wrong in the proc macro.

Does cargo expand work if the project doesn't compile? I'd be interested to see what changed on nightly.

@CleanCut
Copy link
Contributor Author

CleanCut commented Sep 8, 2020

Are you sure this is because of type ascription? It looks like something is going wrong in the proc macro.

No, I'm not at all sure. I'm just pulling that out of the first error: tried to parse a type due to this type ascription.

Does cargo expand work if the project doesn't compile? I'd be interested to see what changed on nightly.

cargo expand run under rustc 1.48.0-nightly (73dc675b9 2020-09-06) appears to fail with the same error (attached).

@jyn514
Copy link
Member

jyn514 commented Sep 8, 2020

Might be related to #76399

@jyn514 jyn514 added A-proc-macros Area: Procedural macros regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. labels Sep 8, 2020
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Sep 8, 2020
@jyn514 jyn514 removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Sep 8, 2020
@jyn514
Copy link
Member

jyn514 commented Sep 8, 2020

Going to close this as a duplicate of #76399 since it looks like the same issue.

@jyn514 jyn514 closed this as completed Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-proc-macros Area: Procedural macros C-bug Category: This is a bug. regression-from-stable-to-nightly Performance or correctness regression from stable to nightly.
Projects
None yet
Development

No branches or pull requests

3 participants