Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Bootstrap Errors from Rust Clippy #818

Closed
ryan-moreno opened this issue Sep 14, 2021 · 1 comment · Fixed by #819
Closed

Bootstrap Errors from Rust Clippy #818

ryan-moreno opened this issue Sep 14, 2021 · 1 comment · Fixed by #819
Labels
bug Something isn't working needs triage An initial review by a maintainer is needed

Comments

@ryan-moreno
Copy link

ryan-moreno commented Sep 14, 2021

Describe the bug

Running bootstrap.ps1 results in errors that prevent the simulators from being built properly. This appears to be related to a new release of rust clippy adding new warnings.

To Reproduce

Clone qsharp-runtime repo
Install listed pre-requisites and Powershell 7
Run boostrap.ps1

Expected behavior

boostrap runs without errors

Actual behavior

Errors from rust clippy (pasted below)

System information

OS: Windows
rustc/rust-clippy version: 1.55.0

Error messages

Compiling qdk_sim_experimental v0.0.1-alpha
Checking num_enum v0.5.4
error[E0658]: custom inner attributes are unstable
 --> src/lib.rs:4:4
  |
4 | #![clippy::allow(needless_borrow)] // because of strange rust clippy error
  |    ^^^^^^^^^^^^^
  |
  = note: see issue #54726 <https://github.com/rust-lang/rust/issues/54726> for more information

error: usage of unknown attribute
 --> src/lib.rs:4:12
  |
4 | #![clippy::allow(needless_borrow)] // because of strange rust clippy error
  |            ^^^^^

For more information about this error, try `rustc --explain E0658`.
error: could not compile `qdk_sim_experimental` due to 2 previous errors

...
Compiling qdk_sim_experimental v0.0.1-alpha 
...

error[E0658]: custom inner attributes are unstable
 --> src/lib.rs:4:4
  |
4 | #![clippy::allow(needless_borrow)] // because of strange rust clippy error
  |    ^^^^^^^^^^^^^
  |
  = note: see issue #54726 <https://github.com/rust-lang/rust/issues/54726> for more information
  = help: add `#![feature(custom_inner_attributes)]` to the crate attributes 
to enable

For more information about this error, try `rustc --explain E0658`.
error: could not compile `qdk_sim_experimental` due to previous error

...
Compiling qdk_sim_experimental v0.0.1-alpha
Documenting qdk_sim_experimental v0.0.1-alpha 
...

warning: lint `missing_doc_code_examples` has been renamed to `rustdoc::missing_doc_code_examples`
  --> src/lib.rs:22:23
   |
22 | #![cfg_attr(doc, warn(missing_doc_code_examples))]
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: 
`rustdoc::missing_doc_code_examples`
   |
   = note: `#[warn(renamed_and_removed_lints)]` on by default

error[E0658]: custom inner attributes are unstable
 --> src/lib.rs:4:4
  |
4 | #![clippy::allow(needless_borrow)] // because of strange rust clippy error
  |    ^^^^^^^^^^^^^
  |
  = note: see issue #54726 <https://github.com/rust-lang/rust/issues/54726> for more information
  = help: add `#![feature(custom_inner_attributes)]` to the crate attributes 
to enable

error: Compilation failed, aborting rustdoc

For more information about this error, try `rustc --explain E0658`.
warning: `qdk_sim_experimental` (lib doc) generated 1 warning
error: could not document `qdk_sim_experimental`
@ryan-moreno ryan-moreno added bug Something isn't working needs triage An initial review by a maintainer is needed labels Sep 14, 2021
@cgranade
Copy link
Contributor

Thanks for filing this, @ryan-moreno! It looks like cargo clippy recently added a few new checks, but our build has clippy warnings promoted to errors by default. Thankfully, the six new linting issues are pretty straightforward to resolve, so let me go do that. Thanks!

cgranade added a commit that referenced this issue Sep 14, 2021
@cgranade cgranade mentioned this issue Sep 14, 2021
cgranade pushed a commit that referenced this issue Sep 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working needs triage An initial review by a maintainer is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants