about summary refs log tree commit diff
path: root/src/doc
AgeCommit message (Collapse)AuthorLines
2019-08-22Update single-use-lifetimesNaja Melan-1/+1
When using this, rustc emits a warning that the lint has been renamed (to having an 's' at the end)
2019-08-22Auto merge of #63175 - jsgf:argsfile, r=jsgfbors-0/+7
rustc: implement argsfiles for command line Many tools, such as gcc and gnu-ld, support "args files" - that is, being able to specify @file on the command line. This causes `file` to be opened and parsed for command line options. They're separated with whitespace; whitespace can be quoted with double or single quotes, and everything can be \\-escaped. Args files may recursively include other args files via `@file2`. See https://sourceware.org/binutils/docs/ld/Options.html#Options for the documentation of gnu-ld's @file parameters. This is useful for very large command lines, or when command lines are being generated into files by other tooling.
2019-08-21Auto merge of #63705 - mark-i-m:fix-guide-1, r=ehussbors-0/+0
Update rustc-guide Should fix toolstate failure r? @ehuss
2019-08-21update rustc-guideMark Mansi-0/+0
2019-08-20Update booksEric Huss-0/+0
2019-08-19rustc: implement argsfiles for command lineJeremy Fitzhardinge-0/+7
This makes `rustc` support `@path` arguments on the command line. The `path` is opened and the file is interpreted as new command line options which are logically inserted at that point in the command-line. The options in the file are one per line. The file is UTF-8 encoded, and may have either Unix or Windows line endings. It does not support recursive use of `@path`. This is useful for very large command lines, or when command-lines are being generated into files by other tooling.
2019-08-20Deprecate using rustc_plugin without the rustc_driver dylib.Simon Sapin-6/+6
CC https://github.com/rust-lang/rust/pull/59800 https://github.com/rust-lang/rust/commit/7198687bb2df13a3298ef1e8f594753073d6b9e8 Fix https://github.com/rust-lang/rust/issues/62717
2019-08-17initial implementation of or-pattern parsingDan Robertson-0/+36
Initial implementation of parsing or-patterns e.g., `Some(Foo | Bar)`. This is a partial implementation of RFC 2535.
2019-08-08Rollup merge of #63353 - ehuss:update-books, r=ehussMazdak Farrokhzad-0/+0
Update books ## nomicon 1 commits in b7f0aba2f88a8feade70595efcfa3438e54e96c0..8a7d05615e5bc0a7fb961b4919c44f5221ee54da 2019-07-11 15:11:36 -0400 to 2019-08-07 07:46:59 -0500 - s/railguard/guardrail/ (rust-lang-nursery/nomicon#156) ## reference 5 commits in 8e7d614303b0dec7492e048e63855fcd3b944ec8..b4b3536839042a6743fc76f0d9ad2a812020aeaa 2019-07-16 21:02:33 +0100 to 2019-08-07 02:29:50 +0200 - Update partially initialized values in drop documentation. (rust-lang-nursery/reference#648) - Define sound and unsound (rust-lang-nursery/reference#647) - Fix a type in the modules section: functions => modules (rust-lang-nursery/reference#645) - Fix some links. (rust-lang-nursery/reference#642) - Update recursion_limit default limit (rust-lang-nursery/reference#633) ## rust-by-example 14 commits in e3679e214d8db44586aca9b20aa27517007d1923..f2c15ba5ee89ae9469a2cf60494977749901d764 2019-07-15 11:13:44 -0300 to 2019-08-07 10:14:25 -0300 - Remove redundant semicolons (rust-lang/rust-by-example#1239) - Rename "Read Lines" chapter title (rust-lang/rust-by-example#1230) - Added space between word and inline code block in unit_testing.md (rust-lang/rust-by-example#1237) - [typo] fix unit_testing wrong output (rust-lang/rust-by-example#1210) - flow_control/match/binding.md: `...' -> `..=' (rust-lang/rust-by-example#1233) - generics/impl.md: follow rustfmt style (rust-lang/rust-by-example#1236) - freeze.md: Incorrect example (rust-lang/rust-by-example#1226) - Make `point` consistent (rust-lang/rust-by-example#1229) - Fix typo at error -> panic (rust-lang/rust-by-example#1227) - Snake didn't deserve to die 🐍 (rust-lang/rust-by-example#1228) - Reorder links in destructuring.md (rust-lang/rust-by-example#1225) - Rename variable names for consistent in iter_result.md (rust-lang/rust-by-example#1224) - Fix several shell output and code highlights. (rust-lang/rust-by-example#1222) - Add new example for Rc. (rust-lang/rust-by-example#1223) ## edition-guide 5 commits in f6c8b92d4e63edd28e862be952f33861f35956f8..e58bc4ca104e890ac56af846877c874c432a64b5 2019-07-06 22:10:32 +0200 to 2019-07-31 20:14:12 +0200 - Hide extraneous `use` in anonymous lifetime example. (rust-lang-nursery/edition-guide#190) - Attempt to clarify "no more mod.rs". (rust-lang-nursery/edition-guide#187) - Remove -preview for rustup components. (rust-lang-nursery/edition-guide#188) - rust-lang-nursery/edition-guide#184 More clear explanation and Title. (rust-lang-nursery/edition-guide#185) - More clear table headers (rust-lang-nursery/edition-guide#186) ## embedded-book 2 commits in ff334e74fdb9f197e621efa6d7c3105be892e888..c5da1e11915d3f28266168baaf55822f7e3fe999 2019-07-16 13:47:34 +0000 to 2019-08-05 23:02:10 +0000 - install/verify: fix next section link (rust-embedded/book#202) - Syst small fix (rust-embedded/book#198)
2019-08-08Rollup merge of #63334 - mark-i-m:fix-guide, r=ehussMazdak Farrokhzad-0/+0
Update to rustc-guide that passes toolstate r? @ehuss Sorry for the trouble. I've been somewhat hard to reach lately. Thanks for your help!
2019-08-07Update booksEric Huss-0/+0
2019-08-06passify tidyMark Mansi-0/+0
2019-08-06redox: convert to target_family unixJeremy Soller-5/+0
2019-08-06update to rustc-guide that passes toolstateMark Mansi-0/+0
2019-07-31Replace AstBuilder with inherent methodsMark Rousskov-8/+0
2019-07-30Auto merge of #62766 - alexcrichton:stabilize-pipelined-compilation, r=oli-obkbors-0/+33
rustc: Stabilize options for pipelined compilation This commit stabilizes options in the compiler necessary for Cargo to enable "pipelined compilation" by default. The concept of pipelined compilation, how it's implemented, and what it means for rustc are documented in #60988. This PR is coupled with a PR against Cargo (rust-lang/cargo#7143) which updates Cargo's support for pipelined compliation to rustc, and also enables support by default in Cargo. (note that the Cargo PR cannot land until this one against rustc lands). The technical changes performed here were to stabilize the functionality proposed in #60419 and #60987, the underlying pieces to enable pipelined compilation support in Cargo. The issues have had some discussion during stabilization, but the newly stabilized surface area here is: * A new `--json` flag was added to the compiler. * The `--json` flag can be passed multiple times. * The value of the `--json` flag is a comma-separated list of directives. * The `--json` flag cannot be combined with `--color` * The `--json` flag must be combined with `--error-format=json` * The acceptable list of directives to `--json` are: * `diagnostic-short` - the `rendered` field of diagnostics will have a "short" rendering matching `--error-format=short` * `diagnostic-rendered-ansi` - the `rendered` field of diagnostics will be colorized with ansi color codes embedded in the string field * `artifacts` - JSON blobs will be emitted for artifacts being emitted by the compiler The unstable `-Z emit-artifact-notifications` and `--json-rendered` flags have also been removed during this commit as well. Closes #60419 Closes #60987 Closes #60988
2019-07-29Rollup merge of #63077 - petrochenkov:nolangfeat, r=petrochenkovMazdak Farrokhzad-0/+0
cleanup: Remove some language features related to built-in macros They are now library features. Cleanup after https://github.com/rust-lang/rust/pull/62086. The unstable book files are moved because tidy complained.
2019-07-28cleanup: Remove some language features related to built-in macrosVadim Petrochenkov-0/+0
They are now library features.
2019-07-28Update unstable book wrt. subslice patterns.Mazdak Farrokhzad-1/+1
2019-07-27Remove run-pass test suitesVadim Petrochenkov-1/+1
2019-07-26rustc: Stabilize options for pipelined compilationAlex Crichton-0/+33
This commit stabilizes options in the compiler necessary for Cargo to enable "pipelined compilation" by default. The concept of pipelined compilation, how it's implemented, and what it means for rustc are documented in #60988. This PR is coupled with a PR against Cargo (rust-lang/cargo#7143) which updates Cargo's support for pipelined compliation to rustc, and also enables support by default in Cargo. (note that the Cargo PR cannot land until this one against rustc lands). The technical changes performed here were to stabilize the functionality proposed in #60419 and #60987, the underlying pieces to enable pipelined compilation support in Cargo. The issues have had some discussion during stabilization, but the newly stabilized surface area here is: * A new `--json` flag was added to the compiler. * The `--json` flag can be passed multiple times. * The value of the `--json` flag is a comma-separated list of directives. * The `--json` flag cannot be combined with `--color` * The `--json` flag must be combined with `--error-format=json` * The acceptable list of directives to `--json` are: * `diagnostic-short` - the `rendered` field of diagnostics will have a "short" rendering matching `--error-format=short` * `diagnostic-rendered-ansi` - the `rendered` field of diagnostics will be colorized with ansi color codes embedded in the string field * `artifacts` - JSON blobs will be emitted for artifacts being emitted by the compiler The unstable `-Z emit-artifact-notifications` and `--json-rendered` flags have also been removed during this commit as well. Closes #60419 Closes #60987 Closes #60988
2019-07-25Rollup merge of #60938 - jonas-schievink:doc-include-paths, r=petrochenkovMazdak Farrokhzad-3/+2
rustdoc: make #[doc(include)] relative to the containing file This matches the behavior of other in-source paths like `#[path]` and the `include_X!` macros. Fixes https://github.com/rust-lang/rust/pull/58373#issuecomment-462349380 Also addresses https://github.com/rust-lang/rust/issues/44732#issuecomment-467660239 cc #44732 This is still missing a stdsimd change (https://github.com/jonas-schievink/stdsimd/commit/42ed30e0b5fb5e2d11765b5d1e1f36234af85984), so CI will currently fail. I'll land that change once I get initial feedback for this PR.
2019-07-23Normalize use of backticks in compiler messages for docSamy Kacimi-22/+22
https://github.com/rust-lang/rust/issues/60532
2019-07-23Adjust docs to new #[doc(include)] behaviourJonas Schievink-3/+2
2019-07-18Auto merge of #61749 - davidtwco:rfc-2203-const-array-repeat-exprs, r=eddybbors-0/+11
rustc/rustc_mir: Implement RFC 2203. This PR implements RFC 2203, allowing constants in array repeat expressions. Part of #49147. r? @eddyb
2019-07-17Update mdbook, cargo, booksEric Huss-13/+13
This updates the last of the books using mdbook 0.1, finally removing it from the build.
2019-07-14Add newlineCaio-1/+1
2019-07-14Chapter for param_attrsCaio-0/+27
2019-07-11hygiene: Fix wording of desugaring descriptionsVadim Petrochenkov-1/+2
Use variant names rather than descriptions for identifying desugarings in `#[rustc_on_unimplemented]`. Both are highly unstable, but variant name is at least a single identifier.
2019-07-09Rollup merge of #60458 - KodrAus:debug_map_entry, r=alexcrichtonMazdak Farrokhzad-0/+9
Add key and value methods to DebugMap Implementation PR for an active (not approved) RFC: https://github.com/rust-lang/rfcs/pull/2696. Add two new methods to `std::fmt::DebugMap` for writing the key and value part of a map entry separately: ```rust impl<'a, 'b: 'a> DebugMap<'a, 'b> { pub fn key(&mut self, key: &dyn Debug) -> &mut Self; pub fn value(&mut self, value: &dyn Debug) -> &mut Self; } ``` I want to do this so that I can write a `serde::Serializer` that forwards to our format builders, so that any `T: Serialize` can also be treated like a `T: Debug`.
2019-07-08add key and value methods to DebugMapAshley Mannix-0/+9
2019-07-07syntax: Add feature gate.David Wood-0/+11
This commit adds a `const_in_array_repeat_expressions` feature gate and only create `Candidate::Repeat` if it is enabled.
2019-07-06rustdoc: set cfg(doctest) when collecting doctestsQuietMisdreavus-0/+30
2019-07-06Update rustc-guideYuki Okushi-0/+0
2019-07-03Rollup merge of #62255 - Centril:slice-patterns-change-issue, r=varkorMark Rousskov-2/+2
Switch tracking issue for `#![feature(slice_patterns)]` Switches the tracking issue for `#![feature(slice_patterns)]` to a fresh one in https://github.com/rust-lang/rust/issues/62254 due to new RFCs. Closes https://github.com/rust-lang/rust/issues/23121. r? @varkor
2019-07-03Auto merge of #61775 - ↵bors-0/+29
nikomatsakis:issue-56238-multiple-lifetimes-async-fn-region-solver, r=MatthewJasper generalize impl trait to permit multiple lifetime bounds Generalizes the region solver to support "pick constraints". These have the form: ``` pick R0 from [R1..Rn] ``` where `R1..Rn` are called the "option regions". The idea is that `R0` must be equal to *some* region in the set `R1..Rn`. These constraints are then used to handle cases like this: ```rust fn foo<'a, 'b>(...) -> impl Trait<'a, 'b> { .. } ``` The problem here is that every region R in the hidden type must be equal to *either* `'a` *or* `'b` (or `'static`) -- in the past, the only kinds of constraints we had were outlives constraints, and since `'a` and `'b` are unrelated, there was no outlives constraint we could issue that would enforce that (`R: 'a` and `R: 'b` are both too strict, for example). But now we can issue a pick constraint: `pick R from ['a, 'b]`. In general, solving pick constraints is tricky. We integrate them into the solver as follows. In general, during the propagation phase, we are monotonically growing a set of inference regions. To handle a case like `pick R from [O...]`, where `O...` represents the option regions, we do the following: - Look for all the *lower bounds* of the region R -- that is, every region LB such that `R: LB` must hold. - Look for all the *upper bounds* of the region R -- that is, every region UB such that `UB: R` must hold. - Let the *viable options* be each option region O such that `UB: O` and `O: LB` for each UB, LB bound. - Find the *minimal viable option* M, where `O: M` holds for every option region O. If there is such a *minimal viable option*, then we make `R: M`. (This may in turn influence other bits of inference.) If there is no minimal viable option, either because all options were eliminated or because none of the remaining options are minimal, we do nothing. Ultimately, if the pick constraint is not satisfied, an error is reported. For this logic, we currently require that the option regions O are always lifetime parameters. To determine the bounds, we walk the various outlives edges that were otherwise introduced. r? @matthewjasper cc @cramertj Fixes #56238 TODO: - [ ] Error messages include region variable info sometimes, how to fix? - [ ] Tests for bare `existential type` and other impl Trait usage
2019-07-02Auto merge of #61268 - michaelwoerister:stabilize-pgo, r=alexcrichtonbors-0/+154
Stabilize support for Profile-guided Optimization This PR makes profile-guided optimization available via the `-C profile-generate` / `-C profile-use` pair of commandline flags and adds end-user documentation for the feature to the [rustc book](https://doc.rust-lang.org/rustc/). The PR thus ticks the last two remaining checkboxes of the [stabilization tracking issue](https://github.com/rust-lang/rust/issues/59913). From the tracking issue: > Profile-guided optimization (PGO) is a common optimization technique for ahead-of-time compilers. It works by collecting data about a program's typical execution (e.g. probability of branches taken, typical runtime values of variables, etc) and then uses this information during program optimization for things like inlining decisions, machine code layout, or indirect call promotion. If you are curious about how this can be used, there is a rendered version of the documentation this PR adds available [here]( https://github.com/michaelwoerister/rust/blob/stabilize-pgo/src/doc/rustc/src/profile-guided-optimization.md). r? @alexcrichton cc @rust-lang/compiler
2019-07-02Update src/doc/unstable-book/src/language-features/member-constraints.mdNiko Matsakis-1/+1
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-07-02feature-gate member constraints outside of async-awaitNiko Matsakis-0/+29
Minimizes risk.
2019-07-01Revert "implicit `Option`-returning doctests"Guillaume Gomez-13/+0
This reverts commit 6bb6c001be34d0932a014df981ee18f165c43374.
2019-07-01Auto merge of #61682 - Centril:stabilize-type_alias_enum_variants, ↵bors-36/+0
r=petrochenkov Stabilize `type_alias_enum_variants` in Rust 1.37.0 Stabilize `#![feature(type_alias_enum_variants)]` which allows type-relative resolution with highest priority to `enum` variants in both expression and pattern contexts. For example, you may now write: ```rust enum Option<T> { None, Some(T), } type OptAlias<T> = Option<T>; fn work_on_alias(x: Option<u8>) -> u8 { match x { OptAlias::Some(y) => y + 1, OptAlias::None => 0, } } ``` Closes https://github.com/rust-lang/rfcs/issues/2218 Closes https://github.com/rust-lang/rust/issues/52118 r? @petrochenkov
2019-06-30Switch tracking issue for 'slice_patterns'.Mazdak Farrokhzad-2/+2
2019-06-27Rollup merge of #62156 - ehuss:update-books, r=ehussMazdak Farrokhzad-0/+0
Update books Update nomicon, reference, book, rust-by-example, rustc-guide ## nomicon 2 commits in c656171b749b7307f21371dd0d3278efee5573b8..341c221116a8b9f1010cf1eece952b80c5ec7f54 2019-04-25 15:31:26 -0400 to 2019-06-19 09:08:47 -0700 - Fix some links. - cleanup the intro, and clarify how it relates to the reference (rust-lang-nursery/nomicon#140) ## reference 2 commits in 08ae27a4921ca53967656a7391c82f6c0ddd1ccc..7a5aab5fd50d6290679beb4cf42fa5f46ed22aec 2019-06-17 11:24:13 -0700 to 2019-06-20 17:38:52 +0200 - Update for cfg on generic parameter. (rust-lang-nursery/reference#624) - Link to "const functions" section from constant expressions list (rust-lang-nursery/reference#623) ## book 2 commits in 9aacfcc4c5b102c8cda195932addefd32fe955d2..6c0d83499c8e77e06a71d28c5e1adccec278d4f3 2019-06-16 21:27:26 -0400 to 2019-06-23 20:25:30 -0400 - fancy quotes - Edits made in copyedit ## rust-by-example 2 commits in b27472962986e85c94f4183b1a6d2207660d3ed6..62b3ff2cb44dd8b648c3ef2a9347c3706d148014 2019-06-17 15:52:07 -0300 to 2019-06-24 09:17:21 -0300 - A couple of fixes for the `Box, stack and heap` chapter. (rust-lang/rust-by-example#1206) - [typo] Note, that it is -&gt; Note that, it is (rust-lang/rust-by-example#1207) ## rustc-guide 38 commits in f55e97c145cf37fd664db2e0e2f2d05df328bf4f..abf512fc9cc969dcbea69aa15b44586bbeb13c2d 2019-06-15 17:29:12 -0500 to 2019-06-26 11:05:58 -0500 - fix long line - add `point` to the glossary and link a use of it - fix indentation - Update src/borrow_check/region_inference/placeholders_and_universes.md - Update src/borrow_check/region_inference/placeholders_and_universes.md - Update src/borrow_check/region_inference/placeholders_and_universes.md - Update src/borrow_check/region_inference/member_constraints.md - Update src/borrow_check/region_inference/constraint_propagation.md - Update src/borrow_check/region_inference/member_constraints.md - Update src/borrow_check/region_inference/constraint_propagation.md - Update src/borrow_check/region_inference/member_constraints.md - Update src/borrow_check/region_inference/member_constraints.md - Update src/borrow_check/region_inference/lifetime_parameters.md - Update src/borrow_check/region_inference/member_constraints.md - Update src/borrow_check/region_inference/constraint_propagation.md - Update src/borrow_check/region_inference/constraint_propagation.md - Update src/borrow_check/region_inference/constraint_propagation.md - Update src/borrow_check/region_inference/constraint_propagation.md - Update src/borrow_check/region_inference/constraint_propagation.md - Update src/borrow_check/region_inference/constraint_propagation.md - Update src/borrow_check/region_inference/constraint_propagation.md - Update src/borrow_check/region_inference/lifetime_parameters.md - Update src/borrow_check/region_inference/lifetime_parameters.md - Update src/borrow_check/region_inference/lifetime_parameters.md - Update src/borrow_check/region_inference/constraint_propagation.md - adjust overview slightly - describe region inference and member constraints in some detail - start filling out the constraint propagation chapter in more detail - break out parts of the region inference chapter into sub-chapters - fix typo - avoid ftp links - fix broken links - add bibligraphy appendix - Update to mdbook-linkcheck 0.3.0 - Update mdbook - Change stage0 cfg_attr to bootstrap - fix compiler-team - Added Rustc Debugger Support Chapter
2019-06-27Rollup merge of #62043 - Centril:remove-fnbox, r=cramertjMazdak Farrokhzad-35/+1
Remove `FnBox` Remove `FnBox` since we now have `Box<dyn FnOnce>`. Closes https://github.com/rust-lang/rust/issues/28796. r? @cramertj
2019-06-26Update booksEric Huss-0/+0
2019-06-25Auto merge of #60732 - jswrenn:arbitrary_enum_discriminant, r=pnkfelixbors-0/+37
Implement arbitrary_enum_discriminant Implements RFC rust-lang/rfcs#2363 (tracking issue #60553).
2019-06-22Remove FnBox.Mazdak Farrokhzad-35/+1
2019-06-22Rollup merge of #61267 - michaelwoerister:update-xlto-table, r=alexcrichtonMazdak Farrokhzad-2/+3
rustc-book: Update the rustc/clang compatibility table for xLTO. Firefox is using these combinations successfully.
2019-06-21Implement arbitrary_enum_discriminantJohn Wrenn-0/+37
2019-06-21rustc-book: Add documentation on how to use PGO.Michael Woerister-0/+154