3

Suggest adding a `#[cfg(test)]` to to a test module by TaKO8Ki · Pull Request #9...

 2 years ago
source link: https://github.com/rust-lang/rust/pull/91770
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.

Copy link

Collaborator

rust-highfive commented on Dec 11, 2021

r? @matthewjasper

(rust-highfive has picked a reviewer for you, use r? to override)

TaKO8Ki

changed the title Suggest adding #[cfg(test)] to to a test module

Suggest adding a #[cfg(test)] to to a test module

on Dec 11, 2021

help: consider adding a `#[cfg(test)]` to the parent module

--> $DIR/unused-imports-in-test-module.rs:8:1

|

LL | mod test {

| ^^^^^^^^

Seems like it'd be good to add tests for out-of-line modules too (i.e,, mod test;). But I'm not sure how feasible it is to test that.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK