5

Fix manual_assert and match_wild_err_arm for `#![no_std]` and Rust 2021 by nbdd0...

 2 years ago
source link: https://github.com/rust-lang/rust-clippy/pull/7851
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

@@ -0,0 +1,56 @@

// run-rustfix

Copy link

Collaborator

@camsteffen camsteffen on Oct 21

I don't think we should duplicate tests for lints, but instead create tests like core_macros or 2018_macros, etc. We only need to test different variations of the macro, not different cases of lints.

Copy link

Contributor

Author

@nbdd0121 nbdd0121 27 days ago

Or maybe just run the test twice in different editions? I am not sure how to do it though.

Copy link

Collaborator

@camsteffen camsteffen 27 days ago

Yeah that sounds better. I think you can do it like this:

// revisions: edition2015 edition2018
// [edition2015] edition:2015
// [edition2018] edition:2018

Copy link

Contributor

Author

@nbdd0121 nbdd0121 27 days ago

It seems that revisions didn't quite work... It expects me to have a "if_then_panic.edition2021.rs" because I have a "if_then_panic.edition2021.stderr".


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK