about summary refs log tree commit diff
path: root/src/doc
AgeCommit message (Collapse)AuthorLines
2023-05-26Convert html table to markdownWesley Wiser-82/+12
2023-05-25Rollup merge of #111152 - lukas-code:markdown-parsers-are-hard, r=GuillaumeGomezMichael Goulet-3/+3
update `pulldown-cmark` to `0.9.3` This PR updates `pulldown-cmark` to version `0.9.3`, which does two main things: * Pulls in https://github.com/raphlinus/pulldown-cmark/pull/643 to fix https://github.com/rust-lang/rust/issues/111117 * Allows parsing strikethrough with single tildes, e.g. `~foo~` -> ~foo~. This matches the [GFM spec](https://github.github.com/gfm/#strikethrough-extension-). Full changelog: https://github.com/raphlinus/pulldown-cmark/pull/646
2023-05-25rustdoc book: document single tilde strikethroughLukas Markeffsky-3/+3
2023-05-24Auto merge of #110936 - loongarch-rs:promote-tier2, r=Mark-Simulacrumbors-2/+2
Promote loongarch64-unknown-linux-gnu to Tier 2 with host tools This PR promotes `loongarch64-unknown-linux-gnu` to Tier 2 (with host tools). MCP: https://github.com/rust-lang/compiler-team/issues/518
2023-05-23Rollup merge of #111845 - rustbot:docs-update, r=ehussMatthias Krüger-0/+0
Update books ## rust-embedded/book 1 commits in d9eb4c3f75435b008881062ffa77bf0d1527b37d..f2aed2fe8e9f55508c86ba3aa4b6789b18a08a22 2023-05-12 12:26:37 UTC to 2023-05-12 12:26:37 UTC - Add link to Comprehensive Rust 🦀 (rust-embedded/book#354) ## rust-lang/nomicon 2 commits in b5f7500fc40775096c2bbd204eae096612cf9047..b5f018fb5930cb733b0a8aaf2eed975d4771e74d 2023-05-19 18:10:25 UTC to 2023-05-14 20:22:16 UTC - Expand unbounded lifetime example code and improve wording (rust-lang/nomicon#408) - Update to 2021 edition (rust-lang/nomicon#410) ## rust-lang/reference 5 commits in 28dc0f3576b55f5e57c5d6e65cd68ba3161e9fd5..553d99b02a53b4133a40d5bd2e19958c67487c00 2023-05-22 10:50:07 UTC to 2023-05-10 01:54:07 UTC - Update raw-dylib documentation for stabilization (rust-lang/reference#1345) - fix a typo (rust-lang/reference#1359) - fixed minor error in a comment that annotated output of a proc macro (rust-lang/reference#1358) - Fix example code in `impl` docs (rust-lang/reference#1360) - Add documentation for debugger_visualizer attribute (rust-lang/reference#1335) ## rust-lang/rustc-dev-guide 4 commits in 28dbeaf5c44bc7f5111ad412e99f2d7c5cec6c90..f1e637883fafeb83bdd5906ee7f467e4d35b7337 2023-05-18 02:44:05 UTC to 2023-05-11 09:59:23 UTC - Add note about shell completion scripts (rust-lang/rustc-dev-guide#1686) - filter out S-blocked issues in the "Getting Started" search (rust-lang/rustc-dev-guide#1687) - Rename InstCombine to InstSimplify (rust-lang/rustc-dev-guide#1684) - Use unpretty for debugging Hir (rust-lang/rustc-dev-guide#1685)
2023-05-23Promote loongarch64-unknown-linux-gnu to Tier 2 with host toolsWANG Rui-2/+2
MCP: https://github.com/rust-lang/compiler-team/issues/518
2023-05-22Update referenceEric Huss-0/+0
2023-05-22Update booksrustbot-0/+0
2023-05-21doc: Update exploit-mitigations.md, update image3.pngMarcin S-3/+3
2023-05-18Document stack-protector optionMarcin S-5/+6
Only updated `exploit-mitigations.md` to reflect that the option exists. Removed the alternatives mentioned as they are not actually implemented yet. As this is an unstable feature, should it be added to `unstable-book` also? I didn't do that because I couldn't find the tracking issue for it. (There should be one to track stabilization of the feature.)
2023-05-17Add note about shell completion scriptsclubby789-0/+10
2023-05-15filter out S-blocked issues in the "Getting Started" search (#1687)jyn-1/+1
2023-05-11Rename InstCombine to InstSimplify (#1684)Ben Kimock-1/+1
2023-05-11Use unpretty for debugging Hir (#1685)Yukang-1/+1
2023-05-11Rollup merge of #111389 - esp-rs:esp-idf-platform-support, r=jyn514Matthias Krüger-1/+43
Add esp-idf platform-support page As mentioned in https://github.com/rust-lang/rust/pull/111369#issuecomment-1539881848, the initial PR for esp-idf didn't include a platform support document which is required for the merge of https://github.com/rust-lang/rust/pull/111369.
2023-05-09Add esp-idf platform support pageScott Mabin-1/+43
2023-05-08Update booksrustbot-0/+0
2023-05-08asm: Stabilize loongarch64WANG Rui-16/+1
2023-05-08Rollup merge of #111331 - taiki-e:s390x-asm-cc, r=AmanieuYuki Okushi-2/+11
Mark s390x condition code register as clobbered in inline assembly Various s390x instructions (arithmetic operations, logical operations, comparisons, etc. see also "Condition Codes" section in [z/Architecture Reference Summary](https://www.ibm.com/support/pages/zarchitecture-reference-summary)) modify condition code register `cc`, but AFAIK there is currently no way to mark it as clobbered in `asm!`. `cc` register definition in LLVM: https://github.com/llvm/llvm-project/blob/main/llvm/lib/Target/SystemZ/SystemZRegisterInfo.td#L320 This PR also updates asm_experimental_arch docs in the unstable-book to mention s390x registers. cc `@uweigand` r? `@Amanieu`
2023-05-08Rollup merge of #110638 - nikarh:vita, r=Mark-SimulacrumYuki Okushi-14/+83
STD support for PSVita This PR adds std support for `armv7-sony-vita-newlibeabihf` target. The work here is fairly similar to #95897, just for a different target platform. This depends on the following pull requests: rust-lang/backtrace-rs#523 rust-lang/libc#3209
2023-05-08Rollup merge of #105354 - BlackHoleFox:apple-deployment-printer, r=oli-obkYuki Okushi-0/+6
Add deployment-target --print flag for Apple targets This is very useful for crates that need to know what the Apple OS deployment target is for their build scripts or inside of a build environment. Right now, the defaults just get copy/pasted around the ecosystem since they've been stable for so long. But with #104385 in progress, that won't be true anymore and everything will need to move. Ideally whenever it happens again, this could be less painful as everything can ask the compiler what its default is instead. To show examples of the copy/paste proliferation, here's some crates and/or apps that do: - [cc](https://github.com/rust-lang/cc-rs/pull/708/files), Soon - [mac-notification-sys](https://github.com/h4llow3En/mac-notification-sys/pull/46/files#diff-d0d98998092552a1d3259338c2c71e118a5b8343dd4703c0c7f552ada7f9cb42R10-R12) - [PyO3](https://github.com/PyO3/maturin/blob/ccb02d1aa1cc41e82a3572a3c8b35cace15f3e78/src/target.rs#L755-L758) - [Anki](https://github.com/ankitects/anki/blob/613b5c1034cc9943f3f68d818ae22b2e0acec877/build/runner/src/bundle/artifacts.rs#L49-L54) - [jsc-rs](https://github.com/Brooooooklyn/jsc-rs/blob/37767267568fb2de62fc441473e7d158dd980520/xtask/src/build.rs#L402-L405) ... and probably more that a simple GitHub codesearch didn't see
2023-05-08Mark s390x condition code register as clobbered in inline assemblyTaiki Endo-2/+11
2023-05-07PS Vita std supportNikolay Arhipov-14/+83
2023-05-06update Rust Unstable Book docs for `--extern force`Matt Hammerly-0/+2
2023-05-06Rollup merge of #109677 - dpaoliello:rawdylib, r=michaelwoerister,wesleywiserYuki Okushi-34/+8
Stabilize raw-dylib, link_ordinal, import_name_type and -Cdlltool This stabilizes the `raw-dylib` feature (#58713) for all architectures (i.e., `x86` as it is already stable for all other architectures). Changes: * Permit the use of the `raw-dylib` link kind for x86, the `link_ordinal` attribute and the `import_name_type` key for the `link` attribute. * Mark the `raw_dylib` feature as stable. * Stabilized the `-Zdlltool` argument as `-Cdlltool`. * Note the path to `dlltool` if invoking it failed (we don't need to do this if `dlltool` returns an error since it prints its path in the error message). * Adds tests for `-Cdlltool`. * Adds tests for being unable to find the dlltool executable, and dlltool failing. * Fixes a bug where we were checking the exit code of dlltool to see if it failed, but dlltool always returns 0 (indicating success), so instead we need to check if anything was written to `stderr`. NOTE: As previously noted (https://github.com/rust-lang/rust/pull/104218#issuecomment-1315895618) using dlltool within rustc is temporary, but this is not the first time that Rust has added a temporary tool use and argument: https://github.com/rust-lang/rust/pull/104218#issuecomment-1318720482 Big thanks to ``````@tbu-`````` for the first version of this PR (#104218)
2023-05-05Add deployment-target --print flag for Apple targetsBlackHoleFox-0/+6
2023-05-04`--print target-cpus` shows default target cpu, updated docsJames Dietz-1/+2
2023-05-03Rollup merge of #105452 - rcvalle:rust-cfi-3, r=bjorn3Manish Goregaokar-17/+126
Add cross-language LLVM CFI support to the Rust compiler This PR adds cross-language LLVM Control Flow Integrity (CFI) support to the Rust compiler by adding the `-Zsanitizer-cfi-normalize-integers` option to be used with Clang `-fsanitize-cfi-icall-normalize-integers` for normalizing integer types (see https://reviews.llvm.org/D139395). It provides forward-edge control flow protection for C or C++ and Rust -compiled code "mixed binaries" (i.e., for when C or C++ and Rust -compiled code share the same virtual address space). For more information about LLVM CFI and cross-language LLVM CFI support for the Rust compiler, see design document in the tracking issue #89653. Cross-language LLVM CFI can be enabled with -Zsanitizer=cfi and -Zsanitizer-cfi-normalize-integers, and requires proper (i.e., non-rustc) LTO (i.e., -Clinker-plugin-lto). Thank you again, ``@bjorn3,`` ``@nikic,`` ``@samitolvanen,`` and the Rust community for all the help!
2023-05-03Update documentation for LLVM CFI supportRamon de C Valle-17/+126
This commit updates the documentation for the LLVM Control Flow Integrity (CFI) support in the Rust compiler.
2023-05-02Rollup merge of #108668 - gibbyfree:stabilizedebuggervisualizer, r=wesleywiserDylan DPC-27/+0
Stabilize debugger_visualizer This stabilizes the `debugger_visualizer` attribute (#95939). * Marks the `debugger_visualizer` feature as `accepted`. * Marks the `debugger_visualizer` attribute as `ungated`. * Deletes feature gate test, removes feature gate from other tests. Closes #95939
2023-05-02Add unset-exec-env compiletest header.Eric Huss-0/+3
This header was added in https://github.com/rust-lang/rust/pull/110644/.
2023-04-29Add `rustdoc::unescaped_backtick` lintLukas Markeffsky-0/+38
2023-04-28Auto merge of #110837 - scottmcm:offset-for-add, r=compiler-errorsbors-1/+1
Use MIR's `Offset` for pointer `add` too ~~Status: draft while waiting for #110822 to land, since this is built atop that.~~ ~~r? `@ghost~~` Canonical Rust code has mostly moved to `add`/`sub` on pointers, which take `usize`, instead of `offset` which takes `isize`. (And, relatedly, when `sub_ptr` was added it turned out it replaced every single in-tree use of `offset_from`, because `usize` is just so much more useful than `isize` in Rust.) Unfortunately, `intrinsics::offset` could only accept `*const` and `isize`, so there's a *huge* amount of type conversions back and forth being done. They're identity conversions in the backend, but still end up producing quite a lot of unhelpful MIR. This PR changes `intrinsics::offset` to accept `*const` *and* `*mut` along with `isize` *and* `usize`. Conveniently, the backends and CTFE already handle this, since MIR's `BinOp::Offset` [already supports all four combinations](https://github.com/rust-lang/rust/blob/adaac6b166df57ea5a20d56e4cce503b55aca927/compiler/rustc_const_eval/src/transform/validate.rs#L523-L528). To demonstrate the difference, I added some `mir-opt/pre-codegen/` tests around slice indexing. Here's the difference to `[T]::get_mut`, since it uses `<*mut _>::add` internally: ```diff `@@` -79,30 +70,21 `@@` fn slice_get_mut_usize(_1: &mut [u32], _2: usize) -> Option<&mut u32> { StorageLive(_12); // scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL StorageLive(_9); // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL _9 = _8 as *mut u32 (PtrToPtr); // scope 11 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL - StorageLive(_13); // scope 13 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL - _13 = _2 as isize (IntToInt); // scope 13 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL - StorageLive(_14); // scope 15 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL - StorageLive(_15); // scope 15 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL - _15 = _9 as *const u32 (Pointer(MutToConstPointer)); // scope 15 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL - _14 = Offset(move _15, _13); // scope 15 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL - StorageDead(_15); // scope 15 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL - _7 = move _14 as *mut u32 (PtrToPtr); // scope 15 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL - StorageDead(_14); // scope 15 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL - StorageDead(_13); // scope 13 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL + _7 = Offset(_9, _2); // scope 13 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL StorageDead(_9); // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL StorageDead(_12); // scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL StorageDead(_11); // scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL ``` https://github.com/rust-lang/rust/pull/110837/commits/1c1c8e442add0f46905a57a25a6cba52b8b0c54d#diff-a841b6a4538657add3f39bc895744331453d0625e7aace128b1f604f0b63c8fdR80
2023-04-27Also use `mir::Offset` for pointer `add`Scott McMurray-1/+1
2023-04-27Rollup merge of #110905 - john-h-k:docs/cargo-flags, r=jyn514Matthias Krüger-2/+2
Remove invalid value from scraped-examples.md Fixes #110711
2023-04-27Remove invalid value from scraped-examples.mdJohn Kelly-2/+2
2023-04-27Rollup merge of #110426 - calebcartwright:style-let-else-examples, ↵Matthias Krüger-12/+25
r=compiler-errors docs(style): add more let-else examples Adding a few more examples for increased clarity based on subsequent discussion that arose after implementation work began. Will need approval from t-style, but also cc ```@ytmimi``` to make sure these examples don't contradict any examples we've been incorporating as part of the rustfmt implementation
2023-04-26Auto merge of #110861 - m-ou-se:thread-local-restructure, r=workingjubileebors-5/+0
Restructure and rename std thread_local internals to make it less of a maze Every time I try to work on std's thread local internals, it feels like I'm trying to navigate a confusing maze made of macros, deeply nested modules, and types with multiple names/aliases. Time to clean it up a bit. This PR: - Exports `Key` with its own name (`Key`), instead of `__LocalKeyInner` - Uses `pub macro` to put `__thread_local_inner` into a (unstable, hidden) module, removing `#[macro_export]`, removing it from the crate root. - Removes the `__` from `__thread_local_inner`. - Removes a few unnecessary `allow_internal_unstable` features from the macros - Removes the `libstd_thread_internals` feature. (Merged with `thread_local_internals`.) - And removes it from the unstable book - Gets rid of the deeply nested modules for the `Key` definitions (`mod fast` / `mod os` / `mod statik`). - Turns a `#[cfg]` mess into a single `cfg_if`, now that there's no `#[macro_export]` anymore that breaks with `cfg_if`. - Simplifies the `cfg_if` conditions to not repeat the conditions. - Removes useless `normalize-stderr-test`, which were left over from when the `Key` types had different names on different platforms. - Removes a seemingly unnecessary `realstd` re-export on `cfg(test)`. This PR changes nothing about the thread local implementation. That's for a later PR. (Which should hopefully be easier once all this stuff is a bit cleaned up.)
2023-04-26docs(style): add more let-else examplesCaleb Cartwright-12/+25
Co-authored-by: Michael Goulet <michael@errs.io>
2023-04-26typolcnr-1/+1
2023-04-26extend the sixth requirementlcnr-0/+4
2023-04-26Remove libstd_thread_internals from unstable book.Mara Bos-5/+0
2023-04-26Rollup merge of #110641 - GuillaumeGomez:rustdoc-in-doc-settings, r=notriddleMatthias Krüger-6/+66
Add new rustdoc book chapter to describe in-doc settings Fixes #55165. I continue going through old rustdoc issues. This one made a lot of sense so decided to add the missing chapter. r? ``@notriddle``
2023-04-26Rollup merge of #110418 - jsoref:spelling-rustdoc, r=jyn514jyn-5/+5
Spelling rustdoc Split per https://github.com/rust-lang/rust/pull/110392#issuecomment-1510148682
2023-04-25Auto merge of #101069 - zhaixiaojuan:loongarch64-inline-asm, r=Amanieubors-1/+16
Add loongarch64 asm! support
2023-04-25Add loongarch64 asm! supportzhaixiaojuan-1/+16
2023-04-24Update booksrustbot-0/+0
2023-04-22Add new rustdoc book chapter to describe in-doc settingsGuillaume Gomez-6/+66
2023-04-22Add docs for compare-output-lines-by-subset flag (#1677)Lukas Wirth-0/+5
2023-04-22fix typo (#1674)Tshepang Mbambo-1/+1