about summary refs log tree commit diff
path: root/src/doc/rustc
AgeCommit message (Collapse)AuthorLines
2019-10-22Target-feature documented as unsafe. rustc book and rustc -C help have been ↵togiberlin-1/+23
modified.
2019-10-21Rollup merge of #62330 - SimonSapin:no-drop-in-union-fields, r=RalfJungMazdak Farrokhzad-24/+0
Change untagged_unions to not allow union fields with drop This is a rebase of #56440, massaged to solve merge conflicts and make the test suite pass. Change untagged_unions to not allow union fields with drop Union fields may now never have a type with attached destructor. This for example allows unions to use arbitrary field types only by wrapping them in `ManuallyDrop` (or similar). The stable rule remains, that union fields must be `Copy`. We use the new rule for the `untagged_union` feature. Tracking issue: https://github.com/rust-lang/rust/issues/55149
2019-10-18Auto merge of #64925 - ehuss:document-json, r=Mark-Simulacrumbors-1/+240
Document JSON message output. This documents the JSON messages in the rustc book.
2019-10-14Add troubleshooting section to PGO chapter in rustc book.Michael Woerister-0/+11
2019-10-13Rollup merge of #65039 - HeroicKatora:deny-by-default-book, r=GuillaumeGomezMazdak Farrokhzad-0/+25
Document missing deny by default lints
2019-10-11Remove unions_with_drop_fields lintSimon Sapin-24/+0
Cases where it would trigger are now hard errors.
2019-10-03Document current deny by default lintsAndreas Molzer-0/+25
2019-10-02rustc book: nitpick SLP vectorizationRobin Kruppe-1/+1
SLP vectorization (in general and as implemented in LLVM) is not limited to loops.
2019-09-30Document JSON message output.Eric Huss-1/+240
2019-09-02Update xLTO compatibility table in rustc book.Michael Woerister-0/+1
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-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-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-23Normalize use of backticks in compiler messages for docSamy Kacimi-22/+22
https://github.com/rust-lang/rust/issues/60532
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-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-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-21rustc-book: Add documentation on how to use PGO.Michael Woerister-0/+154
2019-06-08Remove some more `#![feature(custom_attribute)]`sVadim Petrochenkov-6/+4
2019-05-28rustc-book: Update the rustc/clang compatibility table for xLTO.Michael Woerister-2/+3
2019-05-24Fixed type-alias-bounds lint docCerberuser-4/+7
The example code under type-alias-bounds lint produced two warnings - one from the lint itself and another from the dead_code lint, and only the second one was in the doc. This looked like an error, so I've added `#[allow(dead_code)]` and replaced the example output with the expected one. [Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&code=%23%5Ballow(dead_code)%5D%0Atype%20SendVec%3CT%3A%20Send%3E%20%3D%20Vec%3CT%3E%3B)
2019-05-17Auto merge of #49799 - hdhoang:46205_deny_incoherent_fundamental_impls, ↵bors-43/+2
r=nikomatsakis lint: convert incoherent_fundamental_impls into hard error *Summary for affected authors:* If your crate depends on one of the following crates, please upgrade to a newer version: - gtk-rs: upgrade to at least 0.4 - rusqlite: upgrade to at least 0.14 - nalgebra: upgrade to at least 0.15, or the last patch version of 0.14 - spade: upgrade or refresh the Cargo.lock file to use version 1.7 - imageproc: upgrade to at least 0.16 (newer versions no longer use nalgebra) implement #46205 r? @nikomatsakis
2019-05-12Update rustc book CLI docs.Eric Huss-11/+156
2019-04-16lint: convert incoherent_fundamental_impls into hard errorHoàng Đức Hiếu-43/+2
Also remove it from lint listings.
2019-04-10Updated the description of -Z in the rustc book.Christian-4/+5
2019-04-03Add documentation on the -Z flag on the command-line arguments section in ↵Christian-0/+6
the rustc book.
2019-02-25Rollup merge of #55632 - ollie27:deny_overflowing_literals, r=CentrilMazdak Farrokhzad-20/+20
Deny the `overflowing_literals` lint for all editions The `overflowing_literals` was made deny by default for the 2018 edition by #54507, however I'm not aware of any reason it can't be made deny by default for the 2015 edition as well.
2019-02-20Rollup merge of #58544 - TheBiggerGuy:rustc-doc-cli-args, r=TimNNkennytm-2/+2
Fix doc for rustc "-g" flag The rustc `-g` CLI flag was miss documented to be a synonym of `-C debug-level=2` and not `-C debuglevel=2`. Also add links to the codegen docs for each synonym. I am unsure of this will conflict with work on #52938
2019-02-17Add links to codegen docs for rustc synonym flagsGuy Taylor-2/+2
The rustc "-g" and "-o" fags are synonyms of the "-c" codegen flags. This adds a link to the codegen docs for each synonym.
2019-02-17Fix doc for rustc "-g" flagGuy Taylor-1/+1
The rustc "-g" CLI flag was miss documented to be a synonym of "-C debug-level=2" and not the correct "-C debuginfo=2".
2019-02-17Mention capping forbid lintsDale Wijnand-1/+3
I felt the description of forbid was misleading/incomplete without mentioning how --cap-lints interacts with it.
2019-02-12Add documentation about -Clinker-plugin-lto to rustc book.Michael Woerister-1/+110
2019-01-18Rollup merge of #57212 - phansch:improve_rustc_book_contributing, r=steveklabnikMazdak Farrokhzad-1/+7
docs(rustc): Link to the book's source in rustc This makes the source of [the rustc book](https://doc.rust-lang.org/rustc/what-is-rustc.html) book a bit more discoverable.
2019-01-18Rollup merge of #57132 - daxpedda:master, r=steveklabnikMazdak Farrokhzad-1/+1
Document that `-C opt-level=0` implies `-C debug-assertions`. I couldn't find it stated anywhere else (https://doc.rust-lang.org/nightly/rustc/codegen-options/index.html#opt-level). It was a problem before here: https://github.com/rust-lang/rust/issues/39449, it got lost in the migration to the new documentation I assume. On a sidenote: I think that `-C opt-level=0` having a sideeffect on another flag should be changed. Having compiler flags affecting others doesn't make much sense to me, they are used to fine tune anyway. In any case, this plays no role in this PR.
2019-01-17Deny the `overflowing_literals` lint for all editionsOliver Middleton-20/+20
2019-01-03Fix repeated word typosWiktor Kuchta-13/+13
Found with `git grep -P '\b([a-z]+)\s+\1\b'`
2018-12-30docs(rustc): Link to the book's source in rustcPhilipp Hansch-1/+7
2018-12-26Document that `-C opt-level=0` implies `-C debug-assertions`.daxpedda-1/+1
2018-12-24Auto merge of #56770 - satyarohith:patch-1, r=Centrilbors-2/+2
docs(rustc): make hello() public Running the example code [here](https://doc.rust-lang.org/rustc/what-is-rustc.html#basic-usage) throws error: ``` error[E0603]: function `hello` is private --> src/main.rs:4:10 | 4 | foo::hello(); | ^^^^^ ``` Making `hello()` public fixes the problem.
2018-12-14Fixes broken linksRoberto Vidal-2/+2
2018-12-13fix: make hello publicSatya Rohith-2/+2
2018-12-13Stabilize `linker-flavor` flag.David Wood-0/+7
This commit moves the linker-flavor flag from a debugging option to a codegen option, thus stabilizing it. There are no feature flags associated with this flag.
2018-11-26rustc-guide has movedMark Mansi-2/+2
2018-10-16[Rustc Book] Quotes around value in --cfg exampleHavvy (Ryan Scheel)-1/+1
2018-10-15[Rustc Book] Explain --cfg's argumentsHavvy (Ryan Scheel)-0/+5
2018-10-14Unused result warning: "X which must" ↦ "X that must"varkor-3/+3
2018-09-08docs: Use dollar sign for all bash promptsBehnam Esfahbod-7/+10
Making it consistent across the board, as most of them already use `$`. Also split one continues bash run into two, to make it easier see different runs: one with warning and another with error.
2018-09-07Rollup merge of #53550 - brson:recurring, r=estebankkennytm-2/+2
librustc_lint: In recursion warning, change 'recurring' to 'recursing' The existing wording seems incorrect. Aside: This warning, 'function cannot return without recursing' is not perfectly clear - it implies that the function _can_ return, it's just got to recurse. But really the fn cannot return period. Clearer wording: 'function recurses infinitely; it cannot return'; or 'function is infinitely self-recursive; it cannot return, and this is probably an error'. I like that.
2018-08-20librustc_lint: In recursion warning, change 'recurring' to 'recursing'Brian Anderson-2/+2
2018-08-19Fix typos found by codespell.Matthias Krüger-3/+3