Skip to content

Commit 169f58b

Browse files
committed
Added some simple documentation.
1 parent 02f6a03 commit 169f58b

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/bootstrap/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ The script accepts commands, flags, and arguments to determine what to do:
6464
# execute tests in the standard library in stage0
6565
./x.py test --stage 0 src/libstd
6666
67+
# execute tests in the core and standard library in stage0,
68+
# without running doc tests (thus avoid depending on building the compiler)
69+
./x.py test --stage 0 --no-doc src/libcore src/libstd
70+
6771
# execute all doc tests
6872
./x.py test src/doc
6973
```

src/libcore/lib.rs

+8
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@
5050
5151
// Since libcore defines many fundamental lang items, all tests live in a
5252
// separate crate, libcoretest, to avoid bizarre issues.
53+
//
54+
// Here we explicitly #[cfg]-out this whole crate when testing. If we don't do
55+
// this, both the generated test artifact and the linked libtest (which
56+
// transitively includes libcore) will both define the same set of lang items,
57+
// and this will cause the E0152 "duplicate lang item found" error. See
58+
// discussion in #50466 for details.
59+
//
60+
// This cfg won't affect doc tests.
5361
#![cfg(not(test))]
5462

5563
#![stable(feature = "core", since = "1.6.0")]

0 commit comments

Comments
 (0)