about summary refs log tree commit diff
path: root/src/doc
AgeCommit message (Collapse)AuthorLines
2022-03-30Stabilize native library modifier syntax and the `whole-archive` modifier ↵Vadim Petrochenkov-30/+25
specifically
2022-03-28Update booksEric Huss-0/+0
2022-03-25Remove hermitkernel targetsMartin Kröning-80/+0
RustyHermit now maintains custom json targets, which are distributed with the kernel. [1] [1]: https://github.com/hermitcore/libhermit-rs/pull/395
2022-03-21Rollup merge of #95166 - Urgau:check-cfg-values-unstable-book, r=petrochenkovMatthias Krüger-3/+5
Update the unstable book with the new `values()` form of check-cfg Forgot to update the unstable book in https://github.com/rust-lang/rust/pull/94362 r? ``@petrochenkov``
2022-03-21Update unstable book with the new `values()` form for check-cfgLoïc BRANSTETT-3/+5
2022-03-19Fix docs for default rmeta filename.Eric Huss-1/+1
2022-03-16resolve the conflict in compiler/rustc_session/src/parse.rscodehorseman-2/+2
Signed-off-by: codehorseman <cricis@yeah.net>
2022-03-15Update booksEric Huss-0/+0
2022-03-14Auto merge of #93749 - ridwanabdillahi:riscv32im_support, r=wesleywiserbors-0/+1
Add riscv32im-unknown-none-elf built-in target triple. * Add built-in target `riscv32im-unknown-none-elf`. * Update `platform-support.md` to list it as a Tier 3 target. Below are details on how this target meets the requirements for tier 3: > 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.) I would be willing to be a target maintainer, though I would appreciate if others with more experience around RISC-V volunteered to help with that as well. > 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. Uses the same naming as the LLVM target, and the same convention as many other bare-metal targets. > 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. I don't believe there is any ambiguity here. > 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. I don't see any legal issues here. > 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. > If the target supports building host tools (such as rustc or cargo), those host tools must not depend on proprietary (non-FOSS) libraries, other than ordinary runtime libraries supplied by the platform and commonly used by other binaries built for the target. 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. > Targets should not require proprietary (non-FOSS) components to link a functional binary or library. > "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. I see no issues with any of the above. > 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. Only relevant to those making approval decisions. > 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. `core` and `alloc` can be used. `std` cannot be used as this is a bare-metal target. > 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 tests (even if they do not pass), the documentation must explain how to run tests for the target, using emulation if possible or dedicated hardware if necessary. Use `--target=x86_64-unknown-none-elf` option to cross compile, just like any target. The target does not support running tests. > 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. I don't foresee this being a problem. > 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. No other targets should be affected by the pull request.
2022-03-13Rollup merge of #94777 - lancethepants:armv7-unknown-linux-uclibceabi, ↵Matthias Krüger-11/+21
r=Mark-Simulacrum Update armv7-unknown-linux-uclibceabi platform support page. A few edits and fixes to the support page for the armv7-unknown-linux-uclibceabi target.
2022-03-10Rollup merge of #93950 - T-O-R-U-S:use-modern-formatting-for-format!-macros, ↵Dylan DPC-7/+7
r=Mark-Simulacrum Use modern formatting for format! macros This updates the standard library's documentation to use the new format_args syntax. The documentation is worthwhile to update as it should be more idiomatic (particularly for features like this, which are nice for users to get acquainted with). The general codebase is likely more hassle than benefit to update: it'll hurt git blame, and generally updates can be done by folks updating the code if (and when) that makes things more readable with the new format. A few places in the compiler and library code are updated (mostly just due to already having been done when this commit was first authored). `eprintln!("{}", e)` becomes `eprintln!("{e}")`, but `eprintln!("{}", e.kind())` remains untouched.
2022-03-10Use implicit capture syntax in format_argsT-O-R-U-S-7/+7
This updates the standard library's documentation to use the new syntax. The documentation is worthwhile to update as it should be more idiomatic (particularly for features like this, which are nice for users to get acquainted with). The general codebase is likely more hassle than benefit to update: it'll hurt git blame, and generally updates can be done by folks updating the code if (and when) that makes things more readable with the new format. A few places in the compiler and library code are updated (mostly just due to already having been done when this commit was first authored).
2022-03-09Add support for targeting riscv32im-unknown-none-elfridwanabdillahi-0/+1
Update riscv32im-unknown-none-elf to Tier2 support. Downgrade to Tier 3 platform support.
2022-03-09Update armv7-unknown-linux-uclibceabi platform support page.lancethepants-11/+21
2022-03-09Improve rustdoc bookLoïc BRANSTETT-83/+106
2022-03-05Rollup merge of #94630 - ehuss:remove-tier-2-docs-note, r=Mark-SimulacrumRalf Jung-2/+4
Update note about tier 2 docs. As of #92800, docs are now available for tier-2 platforms.
2022-03-05Update note about tier 2 docs.Eric Huss-2/+4
2022-03-04Fix typo in c-variadicNebula-1/+1
2022-03-04Rollup merge of #93418 - ojeda:no-shortcut, r=camelidDylan DPC-3/+3
rustdoc & doc: no `shortcut` for `rel="icon"` According to https://html.spec.whatwg.org/multipage/links.html#rel-icon: > For historical reasons, the `icon` keyword may be preceded by the keyword "`shortcut`". And to https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types: > **Warning:** The `shortcut` link type is often seen before `icon`, but this link type is non-conforming, ignored and **web authors must not use it anymore.** While it was removed from the Rust logo case a while ago in commit 085679c ("Use theme-adaptive SVG favicon from other Rust sites"), it is still there for the custom logo case. Also updated a few other instances. Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2022-03-03Rollup merge of #94499 - RandomInsano:patch-1, r=Dylan-DPCDylan DPC-3/+3
Documentation was missed when demoting Windows XP to no_std only After a quick discussion on #81250 which removed special casing for mutexes added [here](https://github.com/rust-lang/rust/commit/10b103af48368c5df644fa61dc417a36083922c8) to support Windows XP, we can't say that the standard library can build for it. This change modifies the tier 3 non-ARM targets to show the standard library will no longer build for these and there is no work being done to change that.
2022-03-01Demote Windows XP to no_std onlyEdwin Amsler-3/+3
Modify the tier 3 non-ARM targets to show the standard library will no longer build for these and there is no work being done to change that.
2022-03-01Update booksEric Huss-0/+0
2022-02-28Rollup merge of #93413 - lsimons:patch-1, r=Dylan-DPCMatthias Krüger-1/+1
Fix broken link from rustdoc docs to ayu theme
2022-02-28Rollup merge of #92642 - avborhanian:master, r=Dylan-DPCMatthias Krüger-1/+1
Update search location from a relative path to absolute This should address issue #90311.
2022-02-27Auto merge of #94361 - nikic:s390x-update, r=Mark-Simulacrumbors-1/+1
Update dist-s390x-dist image Update to Ubuntu 20.04 and crosstool-ng 1.24.0. I've upgraded the ct-ng config and then manually reset the kernel and glibc versions to the oldest supported. Specifically, we're updating from kernel 2.6.32.68 to 2.6.32.71 and glibc 2.11.1 to 2.12.1 here. The compiler toolchain is also updated, but I don't think that's relevant for compatibility. I've also enabled LLD, so this fixes #94324. r? `@Mark-Simulacrum` cc `@uweigand`
2022-02-26Update dist-s390x-dist imageNikita Popov-1/+1
Update to Ubuntu 20.04 and crosstool-ng 1.24.0. I've updated the ct-ng config and then manually reset the kernel and glibc versions to the oldest supported. Specifically, we're updating from kernel 2.6.32.68 to 2.6.32.71 and glibc 2.11.1 to 2.12.1 here. The compiler toolchain is also updated, but I don't think that's relevant for compatibility.
2022-02-25Add documentation for `--check-cfg` in rustdoc bookLoïc BRANSTETT-0/+14
2022-02-24Rollup merge of #94175 - Urgau:check-cfg-improvements, r=petrochenkovDylan DPC-0/+221
Improve `--check-cfg` implementation This pull-request is a mix of improvements regarding the `--check-cfg` implementation: - Simpler internal representation (usage of `Option` instead of separate bool) - Add --check-cfg to the unstable book (based on the RFC) - Improved diagnostics: * List possible values when the value is unexpected * Suggest if possible a name or value that is similar - Add more tests (well known names, mix of combinations, ...) r? ```@petrochenkov```
2022-02-23Add compiler flag `--check-cfg` to the unstable bookLoïc BRANSTETT-0/+221
2022-02-22Typo fix: Close inline-code backtickAntti Korpi-1/+1
2022-02-19Rollup merge of #93658 - cchiw:issue-77443-fix, r=joshtriplettMatthias Krüger-38/+0
Stabilize `#[cfg(panic = "...")]` [Stabilization PR](https://rustc-dev-guide.rust-lang.org/stabilization_guide.html#stabilization-pr) for #77443
2022-02-18Rollup merge of #93497 - willcrichton:rustdoc-scrape-test, r=GuillaumeGomezMatthias Krüger-0/+3
Pass `--test` flag through rustdoc to rustc so `#[test]` functions can be scraped As a part of stabilizing the scrape examples extension in Cargo, I uncovered a bug where examples cannot be scraped from tests. See this test: https://github.com/rust-lang/cargo/pull/10343/files#diff-27aa4f012ebfebaaee61498d91d2370de460628405d136b05e77efe61e044679R2496 The issue is that when rustdoc is run on a test file, because `--test` is not passed as a rustc option, then functions annotated with `#[test]` are ignored by the compiler. So this PR changes rustdoc so when `--test` is passed in conjunction with a `--scrape-example-<suffix>` flag, then the `test` field of `rustc_interface::Config` is true. r? `@camelid`
2022-02-18Rollup merge of #91675 - ivanloz:memtagsan, r=nagisaMatthias Krüger-2/+18
Add MemTagSanitizer Support Add support for the LLVM [MemTagSanitizer](https://llvm.org/docs/MemTagSanitizer.html). On hardware which supports it (see caveats below), the MemTagSanitizer can catch bugs similar to AddressSanitizer and HardwareAddressSanitizer, but with lower overhead. On a tag mismatch, a SIGSEGV is signaled with code SEGV_MTESERR / SEGV_MTEAERR. # Usage `-Zsanitizer=memtag -C target-feature="+mte"` # Comments/Caveats * MemTagSanitizer is only supported on AArch64 targets with hardware support * Requires `-C target-feature="+mte"` * LLVM MemTagSanitizer currently only performs stack tagging. # TODO * Tests * Example
2022-02-17Rollup merge of #93337 - Amanieu:asm_tracking, r=tmiaskoMatthias Krüger-8/+8
Update tracking issue numbers for inline assembly sub-features The main tracking issue for inline assembly is [closed](https://github.com/rust-lang/rust/issues/72016#issuecomment-1022332954), further tracking of the remaining sub-features has been moved to separate tracking issues.
2022-02-17Rollup merge of #93479 - smoelius:master, r=yaahcMatthias Krüger-6/+3
Use `optflag` for `--report-time` Essentially, what is described here: https://github.com/rust-lang/rust/issues/64888#issuecomment-1008047228 There is one difference. The comment proposes to add a `--report-time-color` option. This change instead uses libtest's existing `--color` option for that purpose.
2022-02-16Rollup merge of #94045 - ehuss:update-books, r=ehussMatthias Krüger-0/+0
Update books ## nomicon 3 commits in 9493715a6280a1f74be759c7e1ef9999b5d13e6f..90993eeac93dbf9388992de92965f99cf6f29a03 2022-01-27 19:00:32 -0800 to 2022-02-13 12:44:12 +0900 - Fix a small typo in exception-safety.md (rust-lang/nomicon#341) - Make `Vec::new` public in vec-alloc.md (rust-lang/nomicon#336) - Fix a syntax error in leaking.md (rust-lang/nomicon#335) ## reference 6 commits in 411c2f0d5cebf48453ae2d136ad0c5e611d39aec..70fc73a6b908e08e66aa0306856c5211312f6c05 2022-01-30 12:46:37 -0800 to 2022-02-14 19:33:01 -0800 - Document pre-Rust-2021 special case for IntoIterator method lookup (rust-lang/reference#1154) - Mention std::is_aarch64_feature_detected (rust-lang/reference#1061) - Fix link to the Bastion of the Turbofish (rust-lang/reference#1161) - Improve associated constant item CTFE timing section (rust-lang/reference#1147) - document `#![feature(const_generics_defaults)]` (rust-lang/reference#1098) - Update patterns allowed in @ patterns (rust-lang/reference#1158) ## book 6 commits in 98904efaa4fc968db8ff59cf2744d9f7ed158166..67b768c0b660a069a45f0e5d8ae2f679df1022ab 2022-01-29 21:22:31 -0500 to 2022-02-09 21:52:41 -0500 - Snapshot of ch18 for nostarch - Remove mention of destructuring references as that's not covered currently - Add note that exhaustiveness checking doesn't extend to match guards - Change match guard example to actually be unexpressable with patterns alone - Corrected listing number from 9-10 to 9-13 - Remove duplicate paragraph after No Starch related changes ## rustc-dev-guide 3 commits in 8763adb62c712df69b1d39ea3e692b6d696cc4d9..62f58394ba7b203f55ac35ddcc4c0b79578f5706 2022-01-26 14:01:40 -0800 to 2022-02-11 08:42:50 -0500 - Correction, building stage3 compiler (rust-lang/rustc-dev-guide#1298) - Triage some date references (rust-lang/rustc-dev-guide#1293) - mention test folders for cfg(bootstrap) (rust-lang/rustc-dev-guide#1294)
2022-02-16Rollup merge of #94015 - GuillaumeGomez:check-option, r=notriddleMatthias Krüger-1/+14
rustdoc --check option documentation Part of #92763. r? ```@notriddle```
2022-02-16MemTagSanitizer SupportIvan Lozano-2/+18
Adds support for the LLVM MemTagSanitizer.
2022-02-15Update booksEric Huss-0/+0
2022-02-15Add documentation for rustdoc --check optionGuillaume Gomez-0/+11
2022-02-15Clean up rustdoc command line args docGuillaume Gomez-1/+3
2022-02-14Add support for control-flow protectionAndrew Brown-0/+40
This change adds a flag for configuring control-flow protection in the LLVM backend. In Clang, this flag is exposed as `-fcf-protection` with options `none|branch|return|full`. This convention is followed for `rustc`, though as a codegen option: `rustc -Z cf-protection=<none|branch|return|full>`. Co-authored-by: BlackHoleFox <blackholefoxdev@gmail.com>
2022-02-13Auto merge of #93685 - Mark-Simulacrum:drop-time, r=Mark-Simulacrumbors-2/+2
Drop time dependency from bootstrap This was only used for the inclusion of 'current' dates into our manpages, but it is not clear that this is practically necessary. The manpage is essentially never updated, and so we can likely afford to keep a manual date in these files. It also seems possible to just omit it, but that may cause other tools trouble, so avoid doing that for now. This is largely done to reduce bootstrap complexity; the time crate is not particularly small and in #92480 would have started pulling in num-threads, which does runtime thread count detection. I would prefer to avoid that, so filing this to just drop the nearly unused dependency entirely. r? `@pietroalbini`
2022-02-11Add --scrape-tests flags so rustdoc can scrape examples from testsWill Crichton-0/+3
2022-02-10remove reference of cfg-panic from the unstable bookCharisee-38/+0
2022-02-08add missing spaceStefan Lankes-1/+1
2022-02-08remove typoStefan Lankes-1/+1
2022-02-08add missing linkStefan Lankes-0/+1
2022-02-08remove typosStefan Lankes-1/+1
2022-02-08add missing description of the target aarch64-unknown-none-hermitkernelStefan Lankes-3/+81