Skip to content

Build regression on nightly #60835

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

Closed
Disasm opened this issue May 14, 2019 · 1 comment
Closed

Build regression on nightly #60835

Disasm opened this issue May 14, 2019 · 1 comment

Comments

@Disasm
Copy link
Contributor

Disasm commented May 14, 2019

Consider the program with the following main.rs:

#![deny(warnings)]
#[no_mangle]
static mut PERIPHERALS: bool = false;

fn main() {
    println!("Hello, world!");
}
$ cargo check
    Checking cargo-bug v0.1.0 (/tmp/cargo-bug)
    Finished dev [unoptimized + debuginfo] target(s) in 0.22s
$ cargo check
    Finished dev [unoptimized + debuginfo] target(s) in 0.01s
$ touch src/main.rs
$ cargo check      
    Checking cargo-bug v0.1.0 (/tmp/cargo-bug)
error: unused attribute
 --> src/main.rs:3:1
  |
3 | #[no_mangle]
  | ^^^^^^^^^^^^
  |
note: lint level defined here
 --> src/main.rs:1:9
  |
1 | #![deny(warnings)]
  |         ^^^^^^^^
  = note: #[deny(unused_attributes)] implied by #[deny(warnings)]

error: aborting due to previous error

error: Could not compile `cargo-bug`.

To learn more, run the command again with --verbose.

This behavior causes almost every CI build with cache to fail for crates with such no-mangle static mut variable. First experienced with nightly ~10 days ago.

@jonas-schievink
Copy link
Contributor

Duplicate of #60050

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants