Skip to content

Commit 73aa070

Browse files
committed
Guide new users to add use super::*;
1 parent 11d4599 commit 73aa070

File tree

15 files changed

+35
-5
lines changed

15 files changed

+35
-5
lines changed

src/cargo/ops/cargo_new.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,8 @@ fn main() {
811811
b"\
812812
#[cfg(test)]
813813
mod tests {
814+
// Uncomment this to use items from the containing module.
815+
// use super::*;
814816
#[test]
815817
fn it_works() {
816818
let result = 2 + 2;

tests/testsuite/init/auto_git/out/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#[cfg(test)]
22
mod tests {
3+
// Uncomment this to use items from the containing module.
4+
// use super::*;
35
#[test]
46
fn it_works() {
57
let result = 2 + 2;
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
#[cfg(test)]
22
mod tests {
3-
#[test]
4-
fn it_works() {
5-
let result = 2 + 2;
6-
assert_eq!(result, 4);
7-
}
3+
// Uncomment this to use items from the containing module.
4+
// use super::*;
5+
#[test]
6+
fn it_works() {
7+
let result = 2 + 2;
8+
assert_eq!(result, 4);
9+
}
810
}

tests/testsuite/init/fossil_autodetect/out/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#[cfg(test)]
22
mod tests {
3+
// Uncomment this to use items from the containing module.
4+
// use super::*;
35
#[test]
46
fn it_works() {
57
let result = 2 + 2;

tests/testsuite/init/git_autodetect/out/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#[cfg(test)]
22
mod tests {
3+
// Uncomment this to use items from the containing module.
4+
// use super::*;
35
#[test]
46
fn it_works() {
57
let result = 2 + 2;

tests/testsuite/init/git_ignore_exists_no_conflicting_entries/out/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#[cfg(test)]
22
mod tests {
3+
// Uncomment this to use items from the containing module.
4+
// use super::*;
35
#[test]
46
fn it_works() {
57
let result = 2 + 2;

tests/testsuite/init/ignores_failure_to_format_source/out/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#[cfg(test)]
22
mod tests {
3+
// Uncomment this to use items from the containing module.
4+
// use super::*;
35
#[test]
46
fn it_works() {
57
let result = 2 + 2;

tests/testsuite/init/mercurial_autodetect/out/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#[cfg(test)]
22
mod tests {
3+
// Uncomment this to use items from the containing module.
4+
// use super::*;
35
#[test]
46
fn it_works() {
57
let result = 2 + 2;

tests/testsuite/init/pijul_autodetect/out/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#[cfg(test)]
22
mod tests {
3+
// Uncomment this to use items from the containing module.
4+
// use super::*;
35
#[test]
46
fn it_works() {
57
let result = 2 + 2;

tests/testsuite/init/simple_git/out/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#[cfg(test)]
22
mod tests {
3+
// Uncomment this to use items from the containing module.
4+
// use super::*;
35
#[test]
46
fn it_works() {
57
let result = 2 + 2;

0 commit comments

Comments
 (0)