about summary refs log tree commit diff
path: root/src/doc/unstable-book
AgeCommit message (Collapse)AuthorLines
2020-07-31Some fixes for `plugin.md` in unstable-bookTakayuki Nakata-16/+14
- sample codes not working - broken link
2020-07-29Fix broken link in unstable book `plugin`Takayuki Nakata-1/+1
2020-07-27mv std libs to library/mark-5/+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/+30
This reverts commit 1244ced9580b942926afc06815e0691cf3f4a846.
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-22Update asm! documentationAmanieu d'Antras-2/+6
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-11Cleanup docsAmanieu d'Antras-2/+4
2020-06-08typo: awailable -> availableJosh Stone-1/+1
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-03Updated documentation for Control Flow GuardAndrew Paverd-7/+31
2020-06-03Doc: unstable book - profile.md: improve wordingJonathan Schwender-3/+4
- mention `--target` flag excludes RUSTFLAGS passing to build scripts and proc macros
2020-05-26Fix documentation example for gcov profilingJonathan Schwender-1/+6
Incremental compilation needs to be turned off. Also added the other RUSTFLAGS that should/need to be turned on.
2020-05-24Update src/doc/unstable-book/src/library-features/asm.mdMichal Sudwoj-1/+1
Co-authored-by: Amanieu d'Antras <amanieu@gmail.com>
2020-05-24Corrected statement about zero-extension in docs.Michal Sudwoj-1/+1
2020-05-24Updated documentationMichal Sudwoj-1/+12
2020-05-21Auto merge of #71718 - NeoRaider:ffi_const_pure, r=Amanieubors-0/+98
Experimentally add `ffi_const` and `ffi_pure` extern fn attributes Add FFI function attributes corresponding to clang/gcc/... `const` and `pure`. Rebased version of #58327 by @gnzlbg with the following changes: - Switched back from the `c_ffi_const` and `c_ffi_pure` naming to `ffi_const` and `ffi_pure`, as I agree with https://github.com/rust-lang/rust/pull/58327#issuecomment-462718772 and this nicely aligns with `ffi_returns_twice` - (Hopefully) took care of all of @hanna-kruppe's change requests in the original PR r? @hanna-kruppe
2020-05-21Rollup merge of #72111 - petrochenkov:docstrip, r=ehussRalf Jung-0/+17
rustc-book: Document `-Z strip=val` option cc https://github.com/rust-lang/rust/issues/72110
2020-05-21Auto merge of #70705 - lcnr:generic_discriminant, r=nikomatsakisbors-0/+1
Use `T`'s discriminant type in `mem::Discriminant<T>` instead of `u64`. fixes #70509 Adds the lang-item `discriminant_kind`. Updates the function signature of `intrinsics::discriminant_value`. Adds the *probably permanently unstable* trait `DiscriminantKind`. `mem::Discriminant` should now be smaller in some cases. r? @ghost
2020-05-20Document `#[ffi_const]` and `#[ffi_pure]` function attributes in unstable bookMatthias Schiffer-0/+98
Based on the work of gnzlbg <gonzalobg88@gmail.com>.
2020-05-19update libcore, add `discriminant_kind` lang-itemBastian Kauschke-0/+1
2020-05-18Update unstable book documentation with the latest RFC textAmanieu d'Antras-3/+10
2020-05-18Mark asm unstable book doctests as allow_fail since they don't work with ↵Amanieu d'Antras-14/+14
system LLVM
2020-05-18Fix docsAmanieu d'Antras-13/+27
2020-05-18Add documentation for asm!Amanieu d'Antras-0/+678
2020-05-11rustc-book: Document `-Z strip=val` optionVadim Petrochenkov-0/+17
2020-05-03Implement RFC 2523, `#[cfg(version(..))]`mibac138-0/+34
2020-04-28Rollup merge of #71637 - mibac138:cfg-sanitize, r=petrochenkovDylan DPC-10/+8
Minor formatting changes in `cfg-sanitize.md`
2020-04-26unstable-book: Document `-Z tls-model`Vadim Petrochenkov-0/+25
2020-04-24Minor formatting changes in `cfg-sanitize.md`mibac138-10/+8