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

Compilation failure after #92472 merged in #95569

Closed
TDHolmes opened this issue Apr 1, 2022 · 2 comments · Fixed by #95571
Closed

Compilation failure after #92472 merged in #95569

TDHolmes opened this issue Apr 1, 2022 · 2 comments · Fixed by #95571
Assignees
Labels
C-bug Category: This is a bug. regression-from-stable-to-nightly Performance or correctness regression from stable to nightly.

Comments

@TDHolmes
Copy link

TDHolmes commented Apr 1, 2022

As of nightly-2022-03-28, some of our code utilizing macros in atsamd started to fail to compile. The code that is failing is some macro magic for making nice pin name aliases for microcontrollers, so it's not surprising that #92472 broke it. I see that some other repos were broken as well and that @petrochenkov helped fix it, but I'm really not sure how to do the fix in our repo.

Code

To reproduce:

  1. clone the atsamd repo
  2. rustup default nightly-2022-03-28 && rustup target add thumbv6m-none-eabi
  3. cd atsamd/boards/feather_m0
  4. cargo check --example=blinky_basic

I expect this to compile properly like on stable, instead it fails to compile with:

error: no rules expected the token `red_led`
  --> examples/blinky_basic.rs:30:52
   |
30 |     let mut red_led: bsp::RedLed = pin_alias!(pins.red_led).into();
   |                                                    ^^^^^^^ no rules expected this token in macro call

Version it worked on

It most recently worked on: nightly-2022-03-27

Version with regression

Regressed to 551b4fa with cargo-bisect-rustc (cargo bisect-rustc --start=1d9c262eea411ec5230f8a4c9ba50b3647064da4 --end=ab0c2e18dceb7140626a158affb983ae81039bd0 --target thumbv6m-none-eabi -- check --example=blinky_basic)

rustc --version --verbose:

rustc --version --verbose
rustc 1.61.0-nightly (ab0c2e18d 2022-03-27)
binary: rustc
commit-hash: ab0c2e18dceb7140626a158affb983ae81039bd0
commit-date: 2022-03-27
host: x86_64-apple-darwin
release: 1.61.0-nightly
LLVM version: 14.0.0
installed targets for active toolchain
--------------------------------------
thumbv6m-none-eabi
x86_64-apple-darwin

active toolchain
----------------
nightly-2022-03-28-x86_64-apple-darwin (default)
rustc 1.61.0-nightly (ab0c2e18d 2022-03-27)

@rustbot modify labels: +regression-from-stable-to-nightly -regression-untriaged

@TDHolmes TDHolmes added C-bug Category: This is a bug. regression-untriaged Untriaged performance or correctness regression. labels Apr 1, 2022
@rustbot rustbot added regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. I-prioritize Issue: Indicates that prioritization has been requested for this issue. and removed regression-untriaged Untriaged performance or correctness regression. labels Apr 1, 2022
@petrochenkov petrochenkov self-assigned this Apr 1, 2022
@petrochenkov
Copy link
Contributor

Fixed in #95571.

@bors bors closed this as completed in 07a461a Apr 2, 2022
@TDHolmes
Copy link
Author

TDHolmes commented Apr 2, 2022

Thanks @petrochenkov for the quick fix!

@apiraino apiraino removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. regression-from-stable-to-nightly Performance or correctness regression from stable to nightly.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants