about summary refs log tree commit diff
path: root/src/doc
AgeCommit message (Collapse)AuthorLines
2023-11-19Auto merge of #117888 - notriddle:notriddle/releases, r=Mark-Simulacrumbors-8/+10
doc: add release notes to standalone doc bundle Preview: http://notriddle.com/rustdoc-html-demo-5/release-notes/releases.html This is a workaround for #101714 on top of being a useful addition in its own right. It is intended to change the "canonical URL" for viewing the release notes from GitHub, which is relatively slow, to a pre-rendered HTML file that loads from the same CDN as the standard library docs. It also means you get a copy of the release notes when installing the rust-docs with rustup.
2023-11-18Remove --check-cfg checking of --cfg argsUrgau-0/+3
2023-11-17Rollup merge of #117338 - workingjubilee:asmjs-meets-thanatos, r=b-naberMatthias Krüger-1/+0
Remove asmjs Fulfills [MCP 668](https://github.com/rust-lang/compiler-team/issues/668). `asmjs-unknown-emscripten` does not work as-specified, and lacks essential upstream support for generating asm.js, so it should not exist at all.
2023-11-15Add arm64e-apple-darwin targetArtyom Tetyukhin-0/+38
2023-11-15Add arm64e-apple-ios targetArtyom Tetyukhin-0/+39
2023-11-13doc: add release notes to standalone doc bundleMichael Howell-8/+10
This is a workaround for #101714 on top of being a useful addition in its own right. It is intended to change the "canonical URL" for viewing the release notes from GitHub, which is relatively slow, to a pre-rendered HTML file that loads from the same CDN as the standard library docs. It also means you get a copy of the release notes when installing the rust-docs with rustup.
2023-11-11Add -Z llvm_module_flagPaul Menage-0/+12
Allow adding values to the `!llvm.module.flags` metadata for a generated module. The syntax is `-Z llvm_module_flag=<name>:<type>:<value>:<behavior>` Currently only u32 values are supported but the type is required to be specified for forward compatibility. The `behavior` element must match one of the named LLVM metadata behaviors.viors. This flag is expected to be perma-unstable.
2023-11-11Auto merge of #117799 - erickt:fuchsia, r=tmandrybors-1/+3
Switch `fuchsia-test-runner.py` to `ffx product` The subcommand `ffx product-bundle` has been removed, and replaced with the subcommand `ffx product`. This changes `fuchsia-test-runner.py` to use it to download the SDK and product bundle for the latest release of Fuchsia.
2023-11-10Switch `fuchsia-test-runner.py` to `ffx product`Erick Tryzelaar-1/+3
The subcommand `ffx product-bundle` has been removed, and replaced with the subcommand `ffx product`. This changes `fuchsia-test-runner.py` to use it to download the SDK and product bundle for the latest release of Fuchsia.
2023-11-10Rollup merge of #114191 - rcvalle:rust-exploit-mitigations, r=cuviperMatthias Krüger-209/+195
Update exploit mitigations documentation Updates the rustc book with most up to date information about exploit mitigations supported by the Rust compiler.
2023-11-08Update exploit mitigations documentationRamon de C Valle-60/+62
Updates the rustc book with most up to date information about exploit mitigations supported by the Rust compiler.
2023-11-08Add AIX platform-support docQiu Chaofan-1/+28
2023-11-06Update booksrustbot-0/+0
2023-11-04Remove support for compiler plugins.Nicholas Nethercote-116/+1
They've been deprecated for four years. This commit includes the following changes. - It eliminates the `rustc_plugin_impl` crate. - It changes the language used for lints in `compiler/rustc_driver_impl/src/lib.rs` and `compiler/rustc_lint/src/context.rs`. External lints are now called "loaded" lints, rather than "plugins" to avoid confusion with the old plugins. This only has a tiny effect on the output of `-W help`. - E0457 and E0498 are no longer used. - E0463 is narrowed, now only relating to unfound crates, not plugins. - The `plugin` feature was moved from "active" to "removed". - It removes the entire plugins chapter from the unstable book. - It removes quite a few tests, mostly all of those in `tests/ui-fulldeps/plugin/`. Closes #29597.
2023-11-04Update rust-lang/book.Nicholas Nethercote-0/+0
To 5b6c1ceaa62ecbd6caef08df39b33b3938e99deb, for this commit: - Prepare for removal of compiler plugin support. (rust-lang/book#3764)
2023-10-29Add support for mipsel-unknown-netbsd, 32-bit LE mips.Havard Eidnes-0/+1
2023-10-28Officially remove asmjs platform supportJubilee Young-1/+0
2023-10-29Auto merge of #117336 - workingjubilee:rollup-6negquv, r=workingjubileebors-0/+1
Rollup of 4 pull requests Successful merges: - #117170 (Add support for i586-unknown-netbsd as target.) - #117259 (Declare rustc_target's dependency on object/macho) - #117322 (change default output mode of `BootstrapCommand`) - #117325 (Small ty::print cleanups) r? `@ghost` `@rustbot` modify labels: rollup
2023-10-28Rollup merge of #117170 - he32:netbsd-i586, r=bjorn3Jubilee-0/+1
Add support for i586-unknown-netbsd as target. This restricts instructions to those offered by Pentium, to support e.g. AMD Geode. There is already an entry for this target in the NetBSD platform support page at src/doc/rustc/src/platform-support/netbsd.md ...so this should forestall its removal. Additional fixes are needed for some vendored modules, this is the changes in the rust compiler core itself.
2023-10-28Rollup merge of #115773 - simlay:arch64-apple-tvos-sim-for-rustc, r=thomccJubilee-1/+4
tvOS simulator support on Apple Silicon for rustc Closes or is a subtask of #115692. # Tier 3 Target Policy At this tier, the Rust project provides no official support for a target, so we place minimal requirements on the introduction of targets. > * A tier 3 target must have a designated developer or developers (the "target maintainers") on record to be CCed when issues arise regarding the target. (The mechanism to track and CC such developers may evolve over time.) See [`src/doc/rustc/src/platform-support/apple-tvos.md`](https://github.com/rust-lang/rust/blob/4ab4d48ee59968d8d519ccda5e12c9d200cc092f/src/doc/rustc/src/platform-support/apple-tvos.md) > * Targets must use naming consistent with any existing targets; for instance, a target for the same CPU or OS as an existing Rust target should use the same name for that CPU or OS. Targets should normally use the same names and naming conventions as used elsewhere in the broader ecosystem beyond Rust (such as in other toolchains), unless they have a very good reason to diverge. Changing the name of a target can be highly disruptive, especially once the target reaches a higher tier, so getting the name right is important even for a tier 3 target. > * Target names should not introduce undue confusion or ambiguity unless absolutely necessary to maintain ecosystem compatibility. For example, if the name of the target makes people extremely likely to form incorrect beliefs about what it targets, the name should be changed or augmented to disambiguate it. > * If possible, use only letters, numbers, dashes and underscores for the name. Periods (.) are known to cause issues in Cargo. This naming scheme matches `$ARCH-$VENDOR-$OS-$ABI` (I think `sim` is the ABI here) which is matches the iOS apple silicon simulator (`aarch64-apple-ios-sim`). [There is some discussion about renaming some apple simulator targets](https://github.com/rust-lang/rust/issues/115692#issuecomment-1712931910) to match the `-sim` suffix but that is outside the scope of this PR. > * Tier 3 targets may have unusual requirements to build or use, but must not create legal issues or impose onerous legal terms for the Rust project or for Rust developers or users. > > * The target must not introduce license incompatibilities. > * Anything added to the Rust repository must be under the standard Rust license (MIT OR Apache-2.0). > * The target must not cause the Rust tools or libraries built for any other host (even when supporting cross-compilation to the target) to depend on any new dependency less permissive than the Rust licensing policy. This applies whether the dependency is a Rust crate that would require adding new license exceptions (as specified by the tidy tool in the rust-lang/rust repository), or whether the dependency is a native library or binary. In other words, the introduction of the target must not cause a user installing or running a version of Rust or the Rust tools to be subject to any new license requirements. > * Compiling, linking, and emitting functional binaries, libraries, or other code for the target (whether hosted on the target itself or cross-compiling from another target) must not depend on proprietary (non-FOSS) libraries. Host tools built for the target itself may depend on the ordinary runtime libraries supplied by the platform and commonly used by other applications built for the target, but those libraries must not be required for code generation for the target; cross-compilation to the target must not require such libraries at all. For instance, rustc built for the target may depend on a common proprietary C runtime library or console output library, but must not depend on a proprietary code generation library or code optimization library. Rust's license permits such combinations, but the Rust project has no interest in maintaining such combinations within the scope of Rust itself, even at tier 3. > * "onerous" here is an intentionally subjective term. At a minimum, "onerous" legal/licensing terms include but are not limited to: non-disclosure requirements, non-compete requirements, contributor license agreements (CLAs) or equivalent, "non-commercial"/"research-only"/etc terms, requirements conditional on the employer or employment of any particular Rust developers, revocable terms, any requirements that create liability for the Rust project or its developers or users, or any requirements that adversely affect the livelihood or prospects of the Rust project or its developers or users. This contribution is fully available under the standard Rust license with no additional legal restrictions whatsoever. This PR does not introduce any new dependency less permissive than the Rust license policy. The new targets do not depend on proprietary libraries. > * Tier 3 targets should attempt to implement as much of the standard libraries as possible and appropriate (core for most targets, alloc for targets that can support dynamic memory allocation, std for targets with an operating system or equivalent layer of system-provided functionality), but may leave some code unimplemented (either unavailable or stubbed out as appropriate), whether because the target makes it impossible to implement or challenging to implement. The authors of pull requests are not obligated to avoid calling any portions of the standard library on the basis of a tier 3 target not implementing those portions. This new target implements as much of the standard library as the other tvOS targets do. > * The target must provide documentation for the Rust community explaining how to build for the target, using cross-compilation if possible. If the target supports running binaries, or running tests (even if they do not pass), the documentation must explain how to run such binaries or tests for the target, using emulation if possible or dedicated hardware if necessary. I have added the target to the other tvOS targets in [`src/doc/rustc/src/platform-support/apple-tvos.md`](https://github.com/rust-lang/rust/blob/4ab4d48ee59968d8d519ccda5e12c9d200cc092f/src/doc/rustc/src/platform-support/apple-tvos.md) > * Neither this policy nor any decisions made regarding targets shall create any binding agreement or estoppel by any party. If any member of an approving Rust team serves as one of the maintainers of a target, or has any legal or employment requirement (explicit or implicit) that might affect their decisions regarding a target, they must recuse themselves from any approval decisions regarding the target's tier status, though they may otherwise participate in discussions. > * This requirement does not prevent part or all of this policy from being cited in an explicit contract or work agreement (e.g. to implement or maintain support for a target). This requirement exists to ensure that a developer or team responsible for reviewing and approving a target does not face any legal threats or obligations that would prevent them from freely exercising their judgment in such approval, even if such judgment involves subjective matters or goes beyond the letter of these requirements. > * Tier 3 targets must not impose burden on the authors of pull requests, or other developers in the community, to maintain the target. In particular, do not post comments (automated or manual) on a PR that derail or suggest a block on the PR based on a tier 3 target. Do not send automated messages or notifications (via any medium, including via ``@)`` to a PR author or others involved with a PR regarding a tier 3 target, unless they have opted into such messages. > * Backlinks such as those generated by the issue/PR tracker when linking to an issue or PR are not considered a violation of this policy, within reason. However, such messages (even on a separate repository) must not generate notifications to anyone involved with a PR who has not requested such notifications. > * Patches adding or updating tier 3 targets must not break any existing tier 2 or tier 1 target, and must not knowingly break another tier 3 target without approval of either the compiler team or the maintainers of the other tier 3 target. > * In particular, this may come up when working on closely related targets, such as variations of the same architecture with different features. Avoid introducing unconditional uses of features that another variation of the target may not have; use conditional compilation or runtime detection, as appropriate, to let each target run code supported by that target. I acknowledge these requirements and intend to ensure that they are met. This target does not touch any existing tier 2 or tier 1 targets and should not break any other targets.
2023-10-28i586-unknown-netbsd platform-support.md: fix typo.Havard Eidnes-1/+1
2023-10-28i586-unknown-netbsd: add entry in platform-support.md.Havard Eidnes-0/+1
2023-10-28Rollup merge of #117025 - Urgau:cleanup-improve-check-cfg-impl, r=petrochenkovJubilee-1/+1
Cleanup and improve `--check-cfg` implementation This PR removes some indentation in the code, as well as preventing some bugs/misusages and fix a nit in the doc. r? ```@petrochenkov``` (maybe)
2023-10-27Rollup merge of #114998 - meysam81:meysam/feat/add-cargo-pgo-to-docs, r=ehussMatthias Krüger-0/+23
feat(docs): add cargo-pgo to PGO documentation 📝 fixes #114995
2023-10-26Fix residual (never merged) check-cfg syntax in docUrgau-1/+1
2023-10-25Auto merge of #117180 - matthiaskrgr:rollup-rxhl6ep, r=matthiaskrgrbors-2/+8
Rollup of 7 pull requests Successful merges: - #117111 (Remove support for alias `-Z instrument-coverage`) - #117141 (Require target features to match exactly during inlining) - #117152 (Fix unwrap suggestion for async fn) - #117154 (implement C ABI lowering for CSKY) - #117159 (Work around the fact that `check_mod_type_wf` may spuriously return `ErrorGuaranteed`) - #117163 (compiletest: Display compilation errors in mir-opt tests) - #117173 (Make `Iterator` a lang item) r? `@ghost` `@rustbot` modify labels: rollup
2023-10-25Fix some coroutine sentences that don't make sense anymore.Oli Scherer-1/+1
These happened during the `generator` -> `coroutine` rename.
2023-10-25implement C ABI lowering for CSKYdirreke-2/+8
2023-10-25Update profile-guided-optimization.mdMeysam-2/+3
2023-10-25Update src/doc/rustc/src/profile-guided-optimization.mdMeysam-1/+1
Co-authored-by: Jakub Beránek <berykubik@gmail.com>
2023-10-25Update src/doc/rustc/src/profile-guided-optimization.mdMeysam-1/+1
Co-authored-by: Jakub Beránek <berykubik@gmail.com>
2023-10-24Rollup merge of #117093 - rustbot:docs-update, r=ehussMatthias Krüger-0/+0
Update books ## rust-lang/book 1 commits in 72187f5cd0beaaa9c6f584156bcd88f921871e83..3dca2fc50b922a8efb94903b9fee8bb42ab48f38 2023-10-19 18:01:47 UTC to 2023-10-19 18:01:47 UTC - Fix cargo doc links (rust-lang/book#3751) ## rust-embedded/book 1 commits in eac173690b8cc99094e1d88bd49dd61127fbd285..22bca3d0f6e9b9b556689b54ce96f25b46ecd1b3 2023-10-16 22:47:38 UTC to 2023-10-16 22:47:38 UTC - Improved hardware.md chapter. (rust-embedded/book#361) ## rust-lang/nomicon 1 commits in ddfa4214487686e91b21aa29afb972c08a8f0d5b..1842257814919fa62e81bdecd5e8f95be2839dbb 2023-10-17 15:11:58 UTC to 2023-10-17 15:11:58 UTC - Fixed `Hole::get` marked as unsafe in `exception-safety.md` (rust-lang/nomicon#427) ## rust-lang/reference 2 commits in 142b2ed77d33f37a9973772bd95e6144ed9dce43..16fd3c06d9e558dae2d52000818274ae70c9e90a 2023-10-14 22:31:04 UTC to 2023-10-11 15:35:55 UTC - Adjust reference for return-position `impl Trait` in trait and `async fn` in trait (rust-lang/reference#1409) - Fix temporary drop scope for last expression. (rust-lang/reference#1416) ## rust-lang/rust-by-example 1 commits in 8eb3a01ab74c567b7174784892fb807f2c632d6b..6709beeb7d0fbc5ffc91ac4893a24434123b9bfa 2023-10-20 19:11:21 UTC to 2023-10-20 19:11:21 UTC - docs: fix a typo (rust-lang/rust-by-example#1752) ## rust-lang/rustc-dev-guide 5 commits in b98af7d661e4744baab81fb8dc7a049e44a4a998..b0ee9ec8fa59a6c7620165e061f4747202377a62 2023-10-22 03:18:44 UTC to 2023-10-11 06:30:26 UTC - Add WF to glossary (rust-lang/rustc-dev-guide#1810) - recommend `unpretty=hir` alongside `unpretty=hir-tree` (rust-lang/rustc-dev-guide#1804) - Start a chapter about the evolving const effect system (rust-lang/rustc-dev-guide#1808) - Document subtle implied bounds issue in RPITIT inference (rust-lang/rustc-dev-guide#1807) - [suggested.md] `changelog-seen` -> `change-id` in `shell.nix` (rust-lang/rustc-dev-guide#1806)
2023-10-23Update booksrustbot-0/+0
2023-10-23fix typos in commentsGoodDaisy-1/+1
2023-10-22tidy docsdirreke-3/+3
2023-10-22add target csky-unknown-linux-gnuabiv2hfdirreke-3/+14
2023-10-21fix what-to-include doc exampleCameron Ditchfield-1/+1
Fixes the second example in the Examples section of what-to-include.md by marking main as a function.
2023-10-21fix broken link to ayu theme in the rustdoc bookRyan Mehri-1/+1
2023-10-20Replace all uses of `generator` in markdown documentation with `coroutine`Oli Scherer-11/+11
2023-10-20s/generator/coroutine/Oli Scherer-246/+246
2023-10-19Auto merge of #115214 - Urgau:rfc-3127-trim-paths, r=compiler-errorsbors-0/+24
Implement rustc part of RFC 3127 trim-paths This PR implements (or at least tries to) [RFC 3127 trim-paths](https://github.com/rust-lang/rust/issues/111540), the rustc part. That is `-Zremap-path-scope` with all of it's components/scopes. `@rustbot` label: +F-trim-paths
2023-10-17Rollup merge of #111072 - Urgau:check-cfg-new-syntax, r=petrochenkovMatthias Krüger-85/+135
Add new simpler and more explicit syntax for check-cfg <details> <summary> Old proposition (before the MCP) </summary> This PR adds a new simpler and more explicit syntax for check-cfg. It consist of two new form: - `exhaustive(names, values)` - `configure(name, "value1", "value2", ... "valueN")` The preview forms `names(...)` and `values(...)` have implicit meaning that are not strait-forward. In particular `values(foo)`&`values(bar)` and `names(foo, bar)` are not equivalent which has created [some confusions](https://github.com/rust-lang/rust/pull/98080). Also the `names()` and `values()` form are not clear either and again created some confusions where peoples believed that `values()`&`values(foo)` could be reduced to just `values(foo)`. To fix that the two new forms are made to be explicit and simpler. See the table of correspondence: - `names()` -> `exhaustive(names)` - `values()` -> `exhaustive(values)` - `names(foo)` -> `exhaustive(names)`&`configure(foo)` - `values(foo)` -> `configure(foo)` - `values(feat, "foo", "bar")` -> `configure(feat, "foo", "bar")` - `values(foo)`&`values(bar)` -> `configure(foo, bar)` - `names()`&`values()`&`values(my_cfg)` -> `exhaustive(names, values)`&`configure(my_cfg)` Another benefits of the new syntax is that it allow for further options (like conditional checking for --cfg, currently always on) without syntax change. The two previous forms are deprecated and will be removed once cargo and beta rustc have the necessary support. </details> This PR is the first part of the implementation of [MCP636 - Simplify and improve explicitness of the check-cfg syntax](https://github.com/rust-lang/compiler-team/issues/636). ## New `cfg` form It introduces the new [`cfg` form](https://github.com/rust-lang/compiler-team/issues/636) and deprecate the other two: ``` rustc --check-cfg 'cfg(name1, ..., nameN, values("value1", "value2", ... "valueN"))' ``` ## Default built-in names and values It also changes the default for the built-in names and values checking. - Built-in values checking would always be activated as long as a `--check-cfg` argument is present - Built-in names checking would always be activated as long as a `--check-cfg` argument is present **unless** if any `cfg(any())` arg is passed ~~**Note: depends on https://github.com/rust-lang/rust/pull/111068 but is reviewable (last two commits)!**~~ Resolve https://github.com/rust-lang/compiler-team/issues/636 r? `@petrochenkov`
2023-10-17Auto merge of #116518 - vita-rust:vita, r=workingjubileebors-104/+35
Updated libc and doc for Vita target Doc changes: - Updated Vita target readme. The recommended approach to build artifacts for the platform now is [cargo-vita](https://crates.io/crates/cargo-vita) which wraps all the convoluted steps previously described in a yaml for `cargo-make` - Updated maintainer list for Vita target. (`@ZetaNumbers` `@pheki` please agree to be added to the list, `@amg98` please let us know if you're still planning on actively maintaining target support) Code changes: - ~Updated libc for rust-lang/libc#3284 and rust-lang/libc#3366~ (Already merged in #116527) - In dupfd changed the flag same as for esp target, there is no CLOEXEC on Vita - Enabled `new_pair` since we've implemented `socketpair` in Vita newlib
2023-10-17[RFC 3127 - Trim Paths]: Add documentation for -Zremap-path-scopeUrgau-0/+24
2023-10-17Updated libc and doc for Vita targetNikolay Arhipov-104/+35
2023-10-16Update docs tooJeremy Fitzhardinge-6/+6
2023-10-15Rollup merge of #116341 - Ayush1325:uefi-args, r=Mark-SimulacrumMatthias Krüger-0/+2
Implement sys::args for UEFI - Uses `EFI_LOADED_IMAGE_PROTOCOL`, which is implemented for all loaded images. Tested on qemu with OVMF cc ``@nicholasbishop`` cc ``@dvdhrm``
2023-10-15Implement args for UEFIAyush Singh-0/+2
- Uses `EFI_LOADED_IMAGE_PROTOCOL` - verify that cli args are valid UTF-16 - Update Docs Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
2023-10-15Rollup merge of #116741 - mejrs:string_pat, r=fee1-deadMatthias Krüger-0/+45
Document `string_deref_patterns` feature Rendered: ![image](https://github.com/rust-lang/rust/assets/59372212/aa3ef9e7-080d-4979-a363-3c24fe299c00)
2023-10-14Document `string_deref_patterns` featuremejrs-0/+45