]> git.lizzy.rs Git - rust.git/commitdiff
Added some simple documentation.
authorkennytm <kennytm@gmail.com>
Sat, 5 May 2018 19:29:19 +0000 (03:29 +0800)
committerkennytm <kennytm@gmail.com>
Sat, 5 May 2018 19:29:19 +0000 (03:29 +0800)
src/bootstrap/README.md
src/libcore/lib.rs

index 9ff681ac680874b09b35122160f7807025d4b1cc..98c353eb6ec8c3fa967b317693d261948d0ed0b3 100644 (file)
@@ -64,6 +64,10 @@ The script accepts commands, flags, and arguments to determine what to do:
   # execute tests in the standard library in stage0
   ./x.py test --stage 0 src/libstd
 
+  # execute tests in the core and standard library in stage0,
+  # without running doc tests (thus avoid depending on building the compiler)
+  ./x.py test --stage 0 --no-doc src/libcore src/libstd
+
   # execute all doc tests
   ./x.py test src/doc
   ```
index 37f9dcc7e32a055a9c6783b4290aa4856129f04e..54f35d17974fb2412db5e25bdcb802d350ef96e6 100644 (file)
 
 // Since libcore defines many fundamental lang items, all tests live in a
 // separate crate, libcoretest, to avoid bizarre issues.
+//
+// Here we explicitly #[cfg]-out this whole crate when testing. If we don't do
+// this, both the generated test artifact and the linked libtest (which
+// transitively includes libcore) will both define the same set of lang items,
+// and this will cause the E0152 "duplicate lang item found" error. See
+// discussion in #50466 for details.
+//
+// This cfg won't affect doc tests.
 #![cfg(not(test))]
 
 #![stable(feature = "core", since = "1.6.0")]