about summary refs log tree commit diff
path: root/src/doc
AgeCommit message (Collapse)AuthorLines
2020-07-27mv std libs to library/mark-5/+0
2020-07-25Fix rustc docs typo.16yuki0702-1/+1
2020-07-22Rollup merge of #74589 - ehuss:update-books, r=ehussManish Goregaokar-0/+0
Update books ## reference 5 commits in 0ea7bc494f1289234d8800bb9185021e0ad946f0..b329ce37424874ad4db94f829a55807c6e21d2cb 2020-07-02 15:33:04 -0700 to 2020-07-20 08:54:08 -0700 - this '*' is unnecessary, and reduces readability (rust-lang-nursery/reference#853) - Tiny typo fix (rust-lang-nursery/reference#849) - Update const eval chapter to latest changes (rust-lang-nursery/reference#842) - Document #[track_caller]. (rust-lang-nursery/reference#742) - Document shebang restriction. (rust-lang-nursery/reference#823) ## book 2 commits in 84a31397b34f9d405df44f2899ff17a4828dba18..a914f2c7e5cdb771fa465de142381a51c53b580e 2020-07-04 10:50:18 -0500 to 2020-07-21 09:20:05 -0500 - Change misleading wording (rust-lang/book#2399) - Improve wording to include Windows versions (rust-lang/book#2395) ## edition-guide 3 commits in 82bec5877c77cfad530ca11095db4456d757f668..bd6e4a9f59c5c1545f572266af77f5c7a5bad6d1 2020-06-03 08:56:02 -0500 to 2020-07-12 17:37:08 -0500 - update guide for 1.36 and 1.37 (rust-lang/edition-guide#217) - Add contents for Rust 1.35 (rust-lang/edition-guide#216) - update edition guide for Rust 1.34 (rust-lang/edition-guide#215)
2020-07-22Rollup merge of #73893 - ajpaverd:cfguard-stabilize, r=nikomatsakisManish Goregaokar-0/+12
Stabilize control-flow-guard codegen option This is the stabilization PR discussed in #68793. It converts the `-Z control-flow-guard` debugging option into a codegen option (`-C control-flow-guard`), and changes the associated tests.
2020-07-21Update booksEric Huss-0/+0
2020-07-19Document AddressSanitizer memory leak detection defaultsTomasz Miąsko-0/+3
2020-07-19Remove CC & CFLAGS from MemorySanitizer exampleTomasz Miąsko-4/+0
They are now unnecessary for projects written in Rust, since backtrace-rs used by the standard library has only Rust dependencies.
2020-07-16Revert "Remove "important traits" feature"Manish Goregaokar-0/+51
This reverts commit 1244ced9580b942926afc06815e0691cf3f4a846.
2020-07-14Stabilize control-flow-guard codegen optionAndrew Paverd-0/+12
2020-07-10Rollup merge of #74135 - ehuss:update-books, r=ehussManish Goregaokar-0/+0
Update books ## book 3 commits in 4e7c00bece1544d409312ec93467beb62b5bd0cb..84a31397b34f9d405df44f2899ff17a4828dba18 2020-06-19 09:39:12 -0400 to 2020-07-04 10:50:18 -0500 - Update Windows install instructions (rust-lang/book#2389) - Update ch01-02-hello-world.md (rust-lang/book#2386) - bump mdbook version in github action (rust-lang/book#2380) ## reference 2 commits in 04d5d5d7ba624b6f5016298451f3a63d557f3260..0ea7bc494f1289234d8800bb9185021e0ad946f0 2020-06-16 15:08:05 -0700 to 2020-07-02 15:33:04 -0700 - Fix mis-capitalization of type name. (rust-lang-nursery/reference#844) - Fix name of trait for array indexing. (rust-lang-nursery/reference#840) ## embedded-book 1 commits in 616962ad0dd80f34d8b802da038d0aed9dd691bb..94d9ea8460bcbbbfef1877b47cb930260b5849a7 2020-06-23 16:03:45 +0000 to 2020-07-05 14:17:40 +0000 - Note on transformation of static variables by attribute exception (rust-embedded/book#251) ## rust-by-example 1 commits in 6f94ccb48da6fa4ed0031290f21411cf789f7d5e..229c6945a26a53a751ffa4f9cb418388c00029d3 2020-06-20 17:51:30 -0300 to 2020-07-06 10:13:15 -0300 - Modify comments (rust-lang/rust-by-example#1359)
2020-07-09Rollup merge of #74184 - Manishearth:doc-intra-doc, r=GuillaumeGomezManish Goregaokar-30/+42
Add docs for intra-doc-links Fixes https://github.com/rust-lang/rust/issues/66000 Hmm, for some reason my push closed the previous PR
2020-07-09Move to unstable sectionManish Goregaokar-89/+42
2020-07-09Update src/doc/rustdoc/src/intra-doc-links.mdManish Goregaokar-1/+0
2020-07-09Add docs for intra-doc-linksManish Goregaokar-0/+60
2020-07-08Fix broken link in rustdocdocYuki Okushi-1/+1
2020-07-07Update booksEric Huss-0/+0
2020-07-05Rollup merge of #73787 - pickfire:rustc-attrs, r=RalfJungManish Goregaokar-0/+53
Add unstable docs for rustc_attrs r? @RalfJung
2020-07-03Rollup merge of #73670 - davidhewitt:format-args-capture, r=varkorManish Goregaokar-0/+47
Add `format_args_capture` feature This is the initial implementation PR for [RFC 2795](https://github.com/rust-lang/rfcs/pull/2795). Note that, as dicussed in the tracking issue (#67984), the feature gate has been called `format_args_capture`. Next up I guess I need to add documentation for this feature. I've not written any docs before for rustc / std so I would appreciate suggestions on where I should add docs.
2020-06-30Stabilize `#[track_caller]`.Adam Perry-5/+0
Does not yet make its constness stable, though. Use of `Location::caller` in const contexts is still gated by `#![feature(const_caller_location)]`.
2020-06-29Ignore example compile in rustc-attrs docIvan Tham-2/+2
2020-06-28Remove `const_if_match` from unstable bookDylan MacKenzie-14/+0
2020-06-28Add preamable on rustc-attrs doc discussionIvan Tham-0/+3
2020-06-27Add `format_args_capture` to the unstable bookDavid Hewitt-0/+47
2020-06-28Update src/doc/unstable-book/src/language-features/rustc-attrs.mdIvan Tham-1/+1
Co-authored-by: Ralf Jung <post@ralfj.de>
2020-06-27fix typo in self-profile.mdTakuto Ikuta-1/+1
2020-06-27Add unstable docs for rustc_attrsIvan Tham-0/+50
2020-06-26Rollup merge of #73588 - Amanieu:thumb-fp, r=nagisaManish Goregaokar-2/+6
Fix handling of reserved registers for ARM inline asm `r6` is now disallowed as an operand since LLVM sometimes uses it as a base pointer. The check against using the frame pointer as an operand now takes the platform into account and will block either `r7` or `r11` as appropriate. Fixes #73450 cc @cbiffle
2020-06-23Update booksEric Huss-0/+0
2020-06-22Update asm! documentationAmanieu d'Antras-2/+6
2020-06-20Clarify --extern documentation.Adrian Taylor-2/+10
Fixes #64731, #73531. See also #64402#issuecomment-530852886
2020-06-20Rollup merge of #73404 - ajpaverd:cfguard_syntax, r=Mark-SimulacrumRalf Jung-5/+5
Update CFGuard syntax Update the naming and syntax of the control-flow-guard option, as discussed in #68793. r? @Mark-Simulacrum
2020-06-19Rollup merge of #73347 - tmiasko:incompatible-sanitizers, r=nikicManish Goregaokar-2/+1
Diagnose use of incompatible sanitizers Emit an error when incompatible sanitizer are configured through command line options. Previously the last one configured prevailed and others were silently ignored. Additionally use a set to represent configured sanitizers, making it possible to enable multiple sanitizers at once. At least in principle, since currently all of them are considered to be incompatible with others.
2020-06-19Rollup merge of #73364 - joshtriplett:inline-asm, r=AmanieuManish Goregaokar-21/+36
asm: Allow multiple template string arguments; interpret them as newline-separated Allow the `asm!` macro to accept a series of template arguments, and interpret them as if they were concatenated with a '\n' between them. This allows writing an `asm!` where each line of assembly appears in a separate template string argument. This syntax makes it possible for rustfmt to reliably format and indent each line of assembly, without risking changes to the inside of a template string. It also avoids the complexity of having the user carefully format and indent a multi-line string (including where to put the surrounding quotes), and avoids the extra indentation and lines of a call to `concat!`. For example, rewriting the second example from the [blog post on the new inline assembly syntax](https://blog.rust-lang.org/inside-rust/2020/06/08/new-inline-asm.html) using multiple template strings: ```rust fn main() { let mut bits = [0u8; 64]; for value in 0..=1024u64 { let popcnt; unsafe { asm!( " popcnt {popcnt}, {v}", "2:", " blsi rax, {v}", " jz 1f", " xor {v}, rax", " tzcnt rax, rax", " stosb", " jmp 2b", "1:", v = inout(reg) value => _, popcnt = out(reg) popcnt, out("rax") _, // scratch inout("rdi") bits.as_mut_ptr() => _, ); } println!("bits of {}: {:?}", value, &bits[0..popcnt]); } } ``` Note that all the template strings must appear before all other arguments; you cannot, for instance, provide a series of template strings intermixed with the corresponding operands.
2020-06-19Rollup merge of #73214 - androm3da:hex_inline_asm_00, r=AmanieuManish Goregaokar-3/+10
Add asm!() support for hexagon
2020-06-16Update CFGuard syntaxAndrew Paverd-5/+5
2020-06-16Add initial asm!() support for hexagonBrian Cain-3/+10
GPRs only
2020-06-15asm: Update chapter in unstable book for multiple template string argumentsJosh Triplett-21/+36
Update all examples to use the new formatting, and update explanations to document it.
2020-06-14Diagnose use of incompatible sanitizersTomasz Miąsko-2/+1
Emit an error when incompatible sanitizer are configured through command line options. Previously the last one configured prevailed and others were silently ignored. Additionally use a set to represent configured sanitizers, making it possible to enable multiple sanitizers at once. At least in principle, since currently all of them are considered to be incompatible with others.
2020-06-11Rollup merge of #73230 - Amanieu:asm-unused2, r=petrochenkovDylan DPC-2/+4
Suggest including unused asm arguments in a comment to avoid error We require all arguments to an `asm!` to be used in the template string, just like format strings. However in some cases (e.g. `black_box`) it may be desirable to have `asm!` arguments that are not used in the template string. Currently this is a hard error rather than a lint since `#[allow]` does not work on macros (#63221), so this PR suggests using the unused arguments in an asm comment as a workaround. r? @petrochenkov
2020-06-11Rollup merge of #73080 - ertos-rs:sean.wilson/devel/external_doc-ref-fix, ↵Dylan DPC-1/+1
r=ollie27 doc/rustdoc: Fix incorrect external_doc feature flag
2020-06-11Cleanup docsAmanieu d'Antras-2/+4
2020-06-10Rollup merge of #73149 - cuviper:awailable, r=steveklabnikDylan DPC-1/+1
typo: awailable -> available
2020-06-08typo: awailable -> availableJosh Stone-1/+1
2020-06-08Rollup merge of #73143 - ehuss:update-books, r=ehussDylan DPC-0/+0
Update books ## nomicon 3 commits in d1517d4e3f29264c5c67bce2658516bb5202c800..bfe1ab96d717d1dda50e499b360f2e2f57e1750a 2020-05-12 13:47:00 -0400 to 2020-06-05 13:19:42 -0400 - Clarify that str data must still be initialized - Remove language-level UB for non-UTF-8 str - fix Nomicon transmute UB ## reference 5 commits in becdca9477c9eafa96a4eea5156fe7a2730d9dd2..5d40ba5c2515caffa7790cda621239dc21ef5a72 2020-05-21 21:08:02 +0100 to 2020-06-06 20:25:36 -0700 - Add some links to Disambiguating Function Calls. (rust-lang-nursery/reference#829) - change bash to sh as shell code blocks language indentifier (rust-lang-nursery/reference#827) - Fix sentence mistake in array-expr.md (rust-lang-nursery/reference#826) - removed the word "Second" form the beginning of the 2nd list item and labelled it as `2` (rust-lang-nursery/reference#822) - Update fn-like proc-macro invocation restrictions. (rust-lang-nursery/reference#816) ## book 14 commits in e8a4714a9d8a6136a59b8e63544e149683876e36..30cd9dfe71c446de63826bb4472627af45acc9db 2020-05-25 10:29:27 -0500 to 2020-06-07 23:07:19 -0500 - Unnecessarily long type name in Ch 13 (rust-lang/book#2362) - Tweak example in chapter 10 (rust-lang/book#2363) - Mention that to_lowercase isn't perfect (rust-lang/book#2364) - fix typo in CONTRIBUTING.md (rust-lang/book#2360) - Link German translation in appendix F (rust-lang/book#2347) - Updates wording on Box example (rust-lang/book#2332) - fix: match 15-24 with 15-18 (rust-lang/book#2324) - Reword ch01-03 recap paragraph (rust-lang/book#2305) - Remove some confusing wording. (rust-lang/book#2358) - Clarify some wording a bit (rust-lang/book#2357) - Update ch12-05 PowerShell note (rust-lang/book#2348) - text -&gt; console (rust-lang/book#2352) - Improve wording around drop (rust-lang/book#2350) - Make some statements about crates more correct (rust-lang/book#2349) ## edition-guide 1 commits in 0a8ab5046829733eb03df0738c4fafaa9b36b348..82bec5877c77cfad530ca11095db4456d757f668 2020-05-18 08:34:23 -0500 to 2020-06-03 08:56:02 -0500 - Add stuff for Rust 1.33 (rust-lang/edition-guide#214)
2020-06-08Update booksEric Huss-0/+0
2020-06-08Rollup merge of #73001 - ilya-bobyr:master, r=dtolnayRalf Jung-0/+45
Free `default()` forwarding to `Default::default()` It feels a bit redundant to have to say `Default::default()` every time I need a new value of a type that has a `Default` instance. Especially so, compared to Haskell, where the same functionality is called `def`. Providing a free `default()` function that forwards to `Default::default()` seems to improve the situation. The trait is still there, so if someone wants to be explicit and to say `Default::default()` - it still works, but if imported as `std::default::default;`, then the free function reduces typing and visual noise.
2020-06-08Rollup merge of #72615 - jschwe:fix-Zprofile-documentation, r=steveklabnikRalf Jung-1/+7
Fix documentation example for gcov profiling closes #72546 Improves the documentation for the unstable Rustflag `-Zprofile` by: - stating that Incremental compilation must be turned off. - Adding the other `RUSTFLAGS` that should/need to be turned on (taken from [grcov documentation](https://github.com/mozilla/grcov#example-how-to-generate-gcda-files-for-a-rust-project)) - Mentioning `RUSTC_WRAPPER` to prevent everything getting instrumented. r? @steveklabnik
2020-06-07unstable book: default_free_fnIlya Bobyr-0/+45
2020-06-06doc/rustdoc: Fix incorrect external_doc feature flagSean Wilson-1/+1
2020-06-03Updated documentation for Control Flow GuardAndrew Paverd-7/+31