Commit Graph

6365 Commits

Author SHA1 Message Date
Matthias Krüger
f840799385
Rollup merge of #107062 - tgross35:update-doc-index, r=ehuss
Do some cleanup of doc/index.md

I think a lot of people get to this landing page from `rustup doc`, and it's a bit tricky to find some useful information. I attempted to clean it up here a bit, from the commit message:

- Add quick link to API docs
- Add marker for external links, to help offline users
- Add information about using 'cargo doc' and the playground
- Clean up some of the wording
- Update body & header style to match rustdoc defaults
- Bump heading levels so main page header is 1, others are 2 (all were level 1 before)
2023-02-26 00:46:25 +01:00
Matthias Krüger
94a783524c
Rollup merge of #108354 - djkoloski:update_fuchsia_test_runner, r=djkoloski
Update `fuchsia-test-runner.py` and docs

This updates the test runner to the latest version of the SDK and fixes debugging support for Rust source code.

r? ``@tmandry``
2023-02-25 11:31:32 +01:00
David Koloski
6e7902bc3d Update fuchsia-test-runner.py and docs
This updates the test runner to the latest version of the SDK and fixes
debugging support for Rust source code.
2023-02-24 15:39:58 -05:00
Trevor Gross
4ecf14372f doc: cleanup of doc/index.md
- Add quick link to API docs
- Add marker for external links, to help offline users
- Add information about using 'cargo doc' and the playground
- Clean up some of the wording
- Update body & header style to match rustdoc defaults
2023-02-24 13:21:02 -05:00
bors
fabfd1fd93 Auto merge of #99679 - repnop:kernel-address-sanitizer, r=cuviper
Add `kernel-address` sanitizer support for freestanding targets

This PR adds support for KASan (kernel address sanitizer) instrumentation in freestanding targets. I included the minimal set of `x86_64-unknown-none`, `riscv64{imac, gc}-unknown-none-elf`, and `aarch64-unknown-none` but there's likely other targets it can be added to. (`linux_kernel_base.rs`?) KASan uses the address sanitizer attributes but has the `CompileKernel` parameter set to `true` in the pass creation.
2023-02-18 03:05:11 +00:00
Nicholas Nethercote
22a5125a36 Remove save-analysis.
Most tests involving save-analysis were removed, but I kept a few where
the `-Zsave-analysis` was an add-on to the main thing being tested,
rather than the main thing being tested.

For `x.py install`, the `rust-analysis` target has been removed.

For `x.py dist`, the `rust-analysis` target has been kept in a
degenerate form: it just produces a single file `reduced.json`
indicating that save-analysis has been removed. This is necessary for
rustup to keep working.

Closes #43606.
2023-02-16 15:14:45 +11:00
Wesley Norris
19714385e0 Add kernel-address sanitizer support for freestanding targets 2023-02-14 20:54:25 -05:00
Matthias Krüger
9bf807e7a1
Rollup merge of #108002 - rustbot:docs-update, r=ehuss
Update books

## rust-lang/book

2 commits in f2a78f64b668f63f581203c6bac509903f7c00ee..d94e03a18a2590ed3f1c67b859cb11528d2a2d5c
2023-02-10 16:01:09 UTC to 2023-02-10 15:55:43 UTC

- Update to Rust 1.67.1
- Update to Rust 1.66.1

## rust-embedded/book

1 commits in f1a4614aa41cc544b91b79760a709e113f3451d7..701d1551429da4cb609082c0ac99df569e336710
2023-01-31 12:32:49 UTC to 2023-01-31 12:32:49 UTC

- fix: Circled Image not visible on B&W E-Ink screen (rust-embedded/book#339)

## rust-lang/nomicon

2 commits in bd1829d235296952bf72ca55635e360584b8805e..79b53665a7c61d171fb8c5ad0b73b371f9ee6ba7
2023-02-13 08:40:24 UTC to 2023-02-07 09:43:03 UTC

- Fixes double bug in Send-Sync example (rust-lang/nomicon#401)
- Small language fix in subtyping.md (rust-lang/nomicon#399)

## rust-lang/reference

4 commits in 22882fb3f7b4d69fdc0d1731e8b9cfcb6910537d..e5adb99c04817b7fbe08f4ffce5b36702667345f
2023-02-08 18:09:03 UTC to 2023-02-01 03:49:46 UTC

- Eliminate 'half open' terminology from range pattern grammar (rust-lang/reference#1330)
- fix place expression context example (rust-lang/reference#1327)
- remove confusing words (rust-lang/reference#1324)
- Reword "expression for a match arm" (rust-lang/reference#1325)

## rust-lang/rust-by-example

5 commits in 134376872e8c387ef369507e0ee9b5a0e3272718..efe23c4fe12e06351b8dc8c3d18312c761455109
2023-02-06 11:32:23 UTC to 2023-01-31 16:38:03 UTC

- fix irrelevant comments (rust-lang/rust-by-example#1676)
- remove redudant code (rust-lang/rust-by-example#1675)
- Line comments: change 'inside' to 'after' (rust-lang/rust-by-example#1674)
- fix incorrect trait bound demonstration (rust-lang/rust-by-example#1673)
- fix "High Order Functions" typo (rust-lang/rust-by-example#1672)

## rust-lang/rustc-dev-guide

14 commits in e359ee27fc3da3356d71a732128c0a1abe02e53a..41a96ab971cb45e2a184df20619ad1829765c990
2023-02-11 06:41:56 UTC to 2023-01-31 18:42:30 UTC

- Add a citation file (rust-lang/rustc-dev-guide#1550)
- Improve git submodule help (rust-lang/rustc-dev-guide#1587)
- update examples for rustc 1.69.0-nightly (e1eaa2d5d 2023-02-06) (rust-lang/rustc-dev-guide#1590)
- Replace settings.json with x.py setup note (rust-lang/rustc-dev-guide#1588)
- Do not add accept header on linkcheck (rust-lang/rustc-dev-guide#1586)
- Fixed small grammar mistake in monomorph.md (rust-lang/rustc-dev-guide#1585)
- update bootstrap guide (rust-lang/rustc-dev-guide#1583)
- Use host symlink for custom rustup toolchain (rust-lang/rustc-dev-guide#1580)
- Fix broken links (rust-lang/rustc-dev-guide#1577)
- Add section on comparing types (rust-lang/rustc-dev-guide#1570)
- Update rustfmt path (rust-lang/rustc-dev-guide#1574)
- fix wrong heading level (rust-lang/rustc-dev-guide#1573)
- fix incorrect position of `Clarification of build command's stdout` (rust-lang/rustc-dev-guide#1572)
- extend bootstrap related documentations (rust-lang/rustc-dev-guide#1563)
2023-02-13 23:25:14 +01:00
Matthias Krüger
5c94f4a112
Rollup merge of #107913 - base0x10:master, r=compiler-errors
Update broken link in cargo style guide

Toml now uses [toml.io](https://toml.io) for released specifications and the github repo for development. Also the old link was for the 0.4 specification, while cargo uses toml_edit, which uses toml 1.0 (reference:
https://github.com/toml-rs/toml/blob/main/crates/toml_edit/CHANGELOG.md#030---2021-09-13). Finally the discussion of "Bare keys" vs "Quoted keys" has moved from the `#table` section to `#keys`.
2023-02-13 23:25:11 +01:00
rustbot
9dcad5a340 Update books 2023-02-13 12:01:05 -05:00
bors
d094016128 Auto merge of #106677 - tbu-:pr_less_doc_hidden_pub, r=scottmcm
Remove a couple of `#[doc(hidden)] pub fn` and their `#[feature]` gates
2023-02-11 23:57:05 +00:00
base0x10
20446bd92b Update broken link in cargo style guide
Toml now uses [toml.io](https://toml.io) for released specifications
and the github repo for development. Also the old link was for the 0.4
specification, while cargo uses toml_edit, which uses toml 1.0
(reference:
https://github.com/toml-rs/toml/blob/main/crates/toml_edit/CHANGELOG.md#030---2021-09-13).
Finally the discussion of "Bare keys" vs "Quoted keys" has moved from
the `#table` section to `#keys`.
2023-02-10 23:58:25 +00:00
Tobias Bucher
77c85e9cba Remove a couple of #[doc(hidden)] pub fn and their #[feature] gates 2023-02-10 08:06:35 +01:00
Matthias Krüger
8fc9ed51f0
Rollup merge of #107043 - Nilstrieb:true-and-false-is-false, r=wesleywiser
Support `true` and `false` as boolean flag params

Implements [MCP 577](https://github.com/rust-lang/compiler-team/issues/577).
2023-02-10 06:09:56 +01:00
Oleksii Lozovskyi
0e60df9ed1 Parse "-Z instrument-xray" codegen option
Recognize all bells and whistles that LLVM's XRay pass is capable of.
The always/never settings are a bit dumb without attributes but they're
still there. The default instruction count is chosen by the compiler,
not LLVM pass. We'll do it later.
2023-02-09 12:25:21 +09:00
Matthias Krüger
26b532f1ce
Rollup merge of #107750 - tshepang:readability, r=GuillaumeGomez
make more readable
2023-02-07 17:57:17 +01:00
Tshepang Mbambo
a002c05726 make more readable 2023-02-07 04:54:01 +02:00
Tshepang Mbambo
63dc0b86be allow quick-edit convenience 2023-02-07 04:41:13 +02:00
Joseph Ryan
eb5e9713b5 Use triple rather than arch for fuchsia test runner 2023-02-02 13:29:03 -08:00
Matthias Krüger
f838fa87b2
Rollup merge of #107312 - calebcartwright:style-let-else, r=joshtriplett
Add Style Guide rules for let-else statements

cc `@rust-lang/style` `@rust-lang/rustfmt`

[rendered](c694d07c64/src/doc/style-guide/src/statements.md (else-blocks-let-else-statements))
2023-02-02 06:52:13 +01:00
Caleb Cartwright
10b9c1d3ca docs(style-guide): add rules for let-else statements 2023-02-01 21:16:54 -06:00
rustbot
3e5e387318 Update books 2023-01-30 12:01:05 -05:00
Bryan Garza
eea42733ac Replace terminator-based const eval limit
- Remove logic that limits const eval based on terminators, and use the
  stable metric instead (back edges + fn calls)
- Add unstable flag `tiny-const-eval-limit` to add UI tests that do not
  have to go up to the regular 2M step limit
2023-01-23 23:56:22 +00:00
Nilstrieb
7605853b32 Change codegen documentation 2023-01-19 19:46:53 +01:00
Matthias Krüger
4fb9da1db5
Rollup merge of #106942 - rustbot:docs-update, r=ehuss
Update books

## rust-lang/book

1 commits in 2bd5d42c9956369132228da6409f0e68da56c51a..2cd1b5593d26dc6a03c20f8619187ad4b2485552
2023-01-12 14:47:47 UTC to 2023-01-12 14:47:47 UTC

- Typo (rust-lang/book#3457)

## rust-lang/nomicon

2 commits in 8ca261268068d80c0969260fff15199bad87b587..960d610e7f33889a2577f5f17c26f0d5c82b30df
2023-01-06 11:51:41 UTC to 2023-01-05 10:20:31 UTC

- vec/raw: Simplify `RawVec::grow` (rust-lang/nomicon#392)
- borrow-splitting: Use `take` instead of `replace` (rust-lang/nomicon#391)

## rust-lang/reference

4 commits in 3ae62681ff236d5528ef7c8c28ba7c6b2ecc6731..2cb0ed9ba56360949f492f9866afe8c293f9f9da
2023-01-13 03:16:35 UTC to 2023-01-07 00:08:06 UTC

- Update field-expr.md (rust-lang/reference#1318)
- Update documentation for arbitrary_enum_discriminant feature (rust-lang/reference#1055)
- Add links to definitions of terminology ... (rust-lang/reference#1315)
- Enable triagebot shortcuts (rust-lang/reference#1314)

## rust-lang/rust-by-example

2 commits in 8888f9428fe9a48f31de6bd2cef9b9bf80791edc..a9fb7d13eadfcc5f457962731f105b97f9a7474a
2023-01-14 10:25:39 UTC to 2023-01-11 18:25:42 UTC

- get_or_insert example: print my_fruit as intended (rust-lang/rust-by-example#1664)
- Update print.md (rust-lang/rust-by-example#1663)

## rust-lang/rustc-dev-guide

8 commits in b3e2a6e6c8a3aae5b5d950c63046f23bae07096d..7352353ae91c48b136d2ca7d03822e1448165e1e
2023-01-14 20:34:23 UTC to 2023-01-02 23:35:09 UTC

- fix examples for rustc 1.68.0-nightly (935dc0721 2022-12-19) (#1556) (rust-lang/rustc-dev-guide#1557)
- Update incremental-compilation-in-detail.md (rust-lang/rustc-dev-guide#1553)
- Link to the youtube recording of my talk, not the summary (rust-lang/rustc-dev-guide#1554)
- Change `src/test` to `tests` (rust-lang/rustc-dev-guide#1547)
- add full name for ICE (rust-lang/rustc-dev-guide#1552)
- Fix incorrect links (rust-lang/rustc-dev-guide#1549)
- fix rebase link (rust-lang/rustc-dev-guide#1546)
- Add a section for how to review code more easily (rust-lang/rustc-dev-guide#1538)
2023-01-16 20:29:40 +01:00
rustbot
db1ddef55e Update books 2023-01-16 12:01:00 -05:00
gftea
c1f1f60bcb Update instrument-coverage.md
Document the default for LLVM_PROFILE_FILE and add a recemmondation for setting
it for older versions of Rust which had a different default.
2023-01-16 06:27:29 -08:00
Yuki Okushi
b6b4429063
Rollup merge of #106605 - notriddle:notriddle/outdated-rustbook, r=GuillaumeGomez
rustdoc: fix outdated lint section of the book
2023-01-14 12:04:32 +09:00
Nicholas Bishop
46f9e878f6 Stabilize abi_efiapi feature
Tracking issue: https://github.com/rust-lang/rust/issues/65815
2023-01-11 20:42:13 -05:00
Albert Larsan
40ba0e84d5
Change src/test to tests in source files, fix tidy and tests 2023-01-11 09:32:13 +00:00
David Koloski
42aa075310 Accept old spelling of Fuchsia target triples
Because the old spelling is widely used, some projects may need time to
migrate their uses to the new triple spelling. The old spelling may
eventually be removed altogether.
2023-01-09 12:18:12 -05:00
Michael Howell
6dd1086ead rustdoc: fix outdated lint section of the book 2023-01-08 15:03:42 -07:00
David Koloski
f6ef039775 Add vendor to Fuchsia's target triple
Historically, Rust's Fuchsia targets have been labeled x86_64-fuchsia
and aarch64-fuchsia. However, they should technically contain vendor
information. This CL changes Fuchsia's target triples to include the
"unknown" vendor since Clang now does normalization and handles all
triple spellings.

This was previously attempted in #90510, which was closed due to
inactivity.
2023-01-05 09:34:22 -05:00
Michael Goulet
27292f5cbb
Rollup merge of #106464 - djkoloski:update_fuchsia_platform_support_docs, r=tmandry
Update Fuchsia walkthrough with new configs

The new `download-ci-llvm` configuration option dosn't work with `lld = true` (see #100853). The Fuchsia walkthrough should recommend setting it to `false`.

r? `@tmandry`
2023-01-04 20:36:28 -08:00
David Koloski
56eb7eeaaf Update Fuchsia walkthrough with new configs
The new `download-ci-llvm` configuration option dosn't work with `lld =
true` (see #100853). The Fuchsia walkthrough should recommend setting it
to `false`.
2023-01-04 15:55:48 -05:00
Matthias Krüger
fbfaeb6795
Rollup merge of #106274 - jyn514:dump-mono-stats, r=lqd
Add JSON output to -Zdump-mono-stats

Follow-up to https://github.com/rust-lang/rust/pull/105481

r? `@lqd` cc `@wesleywiser`
2023-01-04 07:28:54 +01:00
bors
fbe8292872 Auto merge of #105712 - amg98:feat/vita-support, r=wesleywiser
PlayStation Vita support

Just the compiler definitions for no-std projects and std support using newlib

Earlier PR: https://github.com/rust-lang/rust/pull/105606
2023-01-03 23:38:28 +00:00
Joshua Nelson
eb53eea609 Add json output to -Zdump-mono-stats
This allows analyzing the output programatically; for example, finding
the item with the highest `total_estimate`.

I also took the liberty of adding `untracked` tests to `rustc_session` and documentation to the unstable book for `dump-mono-items`.
2023-01-02 23:02:58 +00:00
rustbot
693399f7c2 Update books 2023-01-02 12:00:31 -05:00
Trevor Gross
a582919b66 Added link from Targets to Platform Support in the book 2022-12-30 18:06:13 -05:00
kraktus
ce1e6a4612 Fix doc comment parsing
This can actually make a difference for the user if they rely on unicode formating.

Prompted by https://github.com/dtolnay/syn/issues/771
2022-12-27 13:31:53 +01:00
rustbot
9ab04a6b0c Update books 2022-12-19 12:01:02 -05:00
bors
aef17b7ae6 Auto merge of #105421 - jacobbramley:jb/branch-prot-check, r=nagisa
Check AArch64 branch-protection earlier in the pipeline.

As suggested in #93516.

r? `@nagisa`
2022-12-17 12:10:27 +00:00
Ezra Shaw
9ea3550a26
remove relative links from rustc-book and unstable-book
Co-authored-by: Joshua Nelson <github@jyn.dev>
2022-12-16 11:44:07 +13:00
Andrés Martínez
76430c39f0 Added PlayStation Vita support 2022-12-14 19:39:16 +01:00
Alexis (Poliorcetics) Bourget
952bf87da1 doc: document remap matching behaviour in rustc flags 2022-12-10 16:04:00 +01:00
Matthias Krüger
947fe7e341
Rollup merge of #105109 - rcvalle:rust-kcfi, r=bjorn3
Add LLVM KCFI support to the Rust compiler

This PR adds LLVM Kernel Control Flow Integrity (KCFI) support to the Rust compiler. It initially provides forward-edge control flow protection for operating systems kernels for Rust-compiled code only by aggregating function pointers in groups identified by their return and parameter types. (See llvm/llvm-project@cff5bef.)

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) will be provided in later work as part of this project by identifying C char and integer type uses at the time types are encoded (see Type metadata in the design document in the tracking issue #89653).

LLVM KCFI can be enabled with -Zsanitizer=kcfi.

Thank you again, `@bjorn3,` `@eddyb,` `@nagisa,` and `@ojeda,` for all the help!
2022-12-10 09:24:43 +01:00
Ramon de C Valle
e1741baeed Add documentation for LLVM KCFI support
This commit adds initial documentation for LLVM Kernel Control Flow
Integrity (KCFI) support to the Rust compiler (see #105109 and #89653).

Co-authored-by: Miguel Ojeda <ojeda@users.noreply.github.com>
2022-12-08 17:24:43 -08:00
Nicholas Bishop
bc38c2ae67 unstable-book: Add ignore to abi_efiapi example code
This example doesn't compile on targets that don't support UEFI, as
reported here:
https://github.com/rust-lang/rust/pull/104793#issuecomment-1339783727
2022-12-06 14:45:38 -05:00
Jacob Bramley
f4d51b8ca9 Correct branch-protection documentation.
The branch-protection codegen option has always been treated as an error
for non-AArch64 targets.
2022-12-06 16:19:20 +00:00