Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_lint/src/context/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ pub(super) fn builtin(
if let Some(span) = in_test_module {
db.span_help(
sess.source_map().guess_head_span(span),
"consider adding a `#[cfg(test)]` to the containing module",
"if this is a test module, consider adding a `#[cfg(test)]` to the containing module",
);
}
}
Expand Down
12 changes: 6 additions & 6 deletions tests/ui/imports/unused-imports-in-test-module.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ error: unused import: `super::a`
LL | use super::a;
| ^^^^^^^^
|
help: consider adding a `#[cfg(test)]` to the containing module
help: if this is a test module, consider adding a `#[cfg(test)]` to the containing module
--> $DIR/unused-imports-in-test-module.rs:8:1
|
LL | mod test {
Expand All @@ -28,7 +28,7 @@ error: unused import: `super::a`
LL | use super::a;
| ^^^^^^^^
|
help: consider adding a `#[cfg(test)]` to the containing module
help: if this is a test module, consider adding a `#[cfg(test)]` to the containing module
--> $DIR/unused-imports-in-test-module.rs:18:1
|
LL | mod tests {
Expand All @@ -40,7 +40,7 @@ error: unused import: `super::a`
LL | use super::a;
| ^^^^^^^^
|
help: consider adding a `#[cfg(test)]` to the containing module
help: if this is a test module, consider adding a `#[cfg(test)]` to the containing module
--> $DIR/unused-imports-in-test-module.rs:28:1
|
LL | mod test_a {
Expand All @@ -52,7 +52,7 @@ error: unused import: `super::a`
LL | use super::a;
| ^^^^^^^^
|
help: consider adding a `#[cfg(test)]` to the containing module
help: if this is a test module, consider adding a `#[cfg(test)]` to the containing module
--> $DIR/unused-imports-in-test-module.rs:38:1
|
LL | mod a_test {
Expand All @@ -64,7 +64,7 @@ error: unused import: `super::a`
LL | use super::a;
| ^^^^^^^^
|
help: consider adding a `#[cfg(test)]` to the containing module
help: if this is a test module, consider adding a `#[cfg(test)]` to the containing module
--> $DIR/unused-imports-in-test-module.rs:48:1
|
LL | mod tests_a {
Expand All @@ -76,7 +76,7 @@ error: unused import: `super::a`
LL | use super::a;
| ^^^^^^^^
|
help: consider adding a `#[cfg(test)]` to the containing module
help: if this is a test module, consider adding a `#[cfg(test)]` to the containing module
--> $DIR/unused-imports-in-test-module.rs:58:1
|
LL | mod a_tests {
Expand Down