about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2023-10-09Auto merge of #116142 - GuillaumeGomez:enum-variant-display, r=fmeasebors-31/+112
[rustdoc] Show enum discrimant if it is a C-like variant Fixes https://github.com/rust-lang/rust/issues/101337. We currently display values for associated constant items in traits: ![image](https://github.com/rust-lang/rust/assets/3050060/03e566ec-c670-47b4-8ca2-b982baa7a0f4) And we also display constant values like [here](file:///home/imperio/rust/rust/build/x86_64-unknown-linux-gnu/doc/std/f32/consts/constant.E.html). I think that for coherency, we should display values of C-like enum variants. With this change, it looks like this: ![image](https://github.com/rust-lang/rust/assets/3050060/b53fbbe0-bdb1-4289-8537-f2dd4988e9ac) As for the display of the constant value itself, I used what we already have to keep coherency. We display the C-like variants value in the following scenario: 1. It is a C-like variant with a value set => all the time 2. It is a C-like variant without a value set: All other variants are C-like variants and at least one them has its value set. Here is the result in code: ```rust // Ax and Bx value will be displayed. enum A { Ax = 12, Bx, } // Ax and Bx value will not be displayed enum B { Ax, Bx, } // Bx value will not be displayed enum C { Ax(u32), Bx, } // Bx value will not be displayed, Cx value will be displayed. #[repr(u32)] enum D { Ax(u32), Bx, Cx = 12, } ``` r? `@notriddle`
2023-10-09Improve codeGuillaume Gomez-36/+24
2023-10-09Extend impl's def_span to include where clausesMichael Goulet-1/+1
2023-10-09Remove no longer used dependency from the list of allowed dependenciesbjorn3-1/+0
2023-10-09return_pointer_aliasing2 should also run with SBRalf Jung-2/+45
2023-10-09add test to ensure RET assignments do not get propagated on unwindingRalf Jung-0/+74
2023-10-09add test for self-assignment on call through referenceRalf Jung-0/+16
2023-10-09float-to-float casts also have non-deterministic NaN resultsRalf Jung-10/+121
2023-10-09ensure unary minus propagates NaN payloads exactlyRalf Jung-0/+8
2023-10-08Clean up subversion layoutMichael Howell-0/+5
2023-10-08rustdoc: add missing macros to sibling nav sidebarMichael Howell-8/+21
2023-10-08rustdoc: clean up the In [name] up-pointerMichael Howell-12/+33
This commit makes three changes for consistency and readability: - It shows the sibling navigation on module pages. It's weird that it didn't work before, and is inconsistent with everything else (even Crates have sibling navigation with other Crates). - It hides the "In [parent]" header if it's the same as the current crate, and if there's no other header between them. We need to keep it on modules and types, since they have their own header and data between them, and we don't want to show siblings under a header implying that they're children. - It adds a margin to deal with the headers butting directly into the branding lockup.
2023-10-08rustdoc: align crate name with search barMichael Howell-5/+27
Based on PR feedback.
2023-10-08rustdoc: remove rust logo from non-Rust cratesMichael Howell-32/+85
2023-10-08rustdoc: clean up the layout for annotated version numbersMichael Howell-6/+16
This should result in a layout for the actual standard library, when built on CI, that looks like this: _____ / \ std | R | 1.74.0-nightly \_____/ (203c57dbe 2023-09-17) Having the whole version as one string caused it to flex wrap, because the sidebar isn't wide enough to fit the whole thing.
2023-10-08compiletest: add a way to specify params with spacesMichael Howell-1/+9
This use single quotes, because those aren't used in params, while double quotes are and would be tougher to parse.
2023-10-08rustdoc: show crate name beside small logoMichael Howell-33/+73
This commit changes the layout to something a bit less "look at my logo!!!111" gigantic, and makes it clearer where clicking the logo will actually take you. It also means the crate name is persistently at the top of the sidebar, even when in a sub-item page, and clicking that name takes you back to the root. | | Short crate name | Long crate name | |---------|------------------|-----------------| | Root | ![short-root] | ![long-root] | Subpage | ![short-subpage] | ![long-subpage] [short-root]: https://github.com/rust-lang/rust/assets/1593513/fe2ce102-d4b8-44e6-9f7b-68636a907f56 [short-subpage]: https://github.com/rust-lang/rust/assets/1593513/29501663-56c0-4151-b7de-d2637e167125 [long-root]: https://github.com/rust-lang/rust/assets/1593513/f6a385c0-b4c5-4a9c-954b-21b38de4192f [long-subpage]: https://github.com/rust-lang/rust/assets/1593513/97ec47b4-61bf-4ebe-b461-0d2187b8c6ca https://notriddle.com/rustdoc-html-demo-4/logo-lockup/image/index.html https://notriddle.com/rustdoc-html-demo-4/logo-lockup/crossbeam_channel/index.html https://notriddle.com/rustdoc-html-demo-4/logo-lockup/adler/struct.Adler32.html https://notriddle.com/rustdoc-html-demo-4/logo-lockup/crossbeam_channel/struct.Sender.html This improves visual information density (the construct with the logo and crate name is *shorter* than the logo on its own, because it's not square) and navigation clarity (we can now see what clicking the Rust logo does, specifically). Compare this with the layout at [Phoenix's Hexdocs] (which is what this proposal is closely based on), the old proposal on [Internals Discourse] (which always says "Rust standard library" in the sidebar, but doesn't do the side-by-side layout). [Phoenix's Hexdocs]: https://hexdocs.pm/phoenix/1.7.7/overview.html [Internals Discourse]: https://internals.rust-lang.org/t/poc-of-a-new-design-for-the-generated-rustdoc/11018 In newer versions of rustdoc, the crate name and version are always shown in the sidebar, even in subpages. Clicking the crate name does the same thing clicking the logo always did: return you to the crate root. While this actually takes up less screen real estate than the old layout on desktop, it takes up more HTML. It's also a bit more visually complex. I could do what the Internals POC did and keep the vertically stacked layout all the time, instead of doing a horizontal stack where possible. It would take up more screen real estate, though. This design is lifted almost verbatim from Hexdocs. It seems to work for them. [`opentelemetry_process_propagator`], for example, has a long application name. [`opentelemetry_process_propagator`]: https://hexdocs.pm/opentelemetry_process_propagator/OpentelemetryProcessPropagator.html Has anyone written the rationale on why the Rust logo shows up on projects that aren't the standard library? If we turned it off on non-standard crates by default, it would line wrap crate names a lot less often. Or maybe we should encourage crate authors to include their own logo more often? It certainly helps give people a better sense of "place." I'm not sure of anything that directly follows up this one. Plenty of other changes could be made to improve the layout, like * coming up with a less cluttered way to do disclosure (there's a lot of `[-]` on the page) * doing a better job of separating lateral navigation (vec::Vec links to vec::IntoIter) and the table of contents (vec::Vec links to vec::Vec::new) * giving readers more control of how much rustdoc hows them, and giving doc authors more control of how much it generates * better search that reduces the need to browse But those are mostly orthogonal, not future possibilities unlocked by this change.
2023-10-08Bump to latest betaMark Rousskov-392/+384
2023-10-08fix: adjust span derivation for const genericsCaleb Cartwright-1/+1
2023-10-08Drop all MIPS targets from CIJubilee Young-76/+1
2023-10-08Drop mips*-unknown-linux-musl* to tier 3Jubilee Young-4/+4
Also be more pedantic about spelling: - LE? Is it "less than or equal to"? Say "little endian". - We're Rust, not C, preserve the initial capital in "N64". - "MUSL" doesn't stand for anything; Rich Felker spells it "musl".
2023-10-08Drop mips*-unknown-linux-gnu* to tier 3Jubilee Young-4/+4
In the process, be more pedantic about spelling: - LE? Do you mean "limited edition"? It's "little endian". - The name of the ABI is "N64" as in "Nintendo 64".
2023-10-08miri: make NaN generation non-deterministicRalf Jung-20/+361
2023-10-08Auto merge of #116515 - petrochenkov:nolegflavor, r=lqdbors-5/+3
linker: Remove unstable legacy CLI linker flavors
2023-10-08Add RUSTFLAGS_BOOTSTRAP to RUSTFLAGS for bootstrap compilationonur-ozkan-0/+7
Note that RUSTFLAGS_BOOTSTRAP should always be added to the end of RUSTFLAGS to be actually effective (e.g., if we have `-Dwarnings` in RUSTFLAGS, passing `-Awarnings` from RUSTFLAGS_BOOTSTRAP should override it). Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-08linker: Remove `-Zgcc-ld` optionVadim Petrochenkov-14/+17
It is subsumed by `-Clinker-flavor=*-lld-cc -Clink-self-contained=+linker` options now
2023-10-08Auto merge of #116450 - Kobzol:automation-try-bors-ci, r=Mark-Simulacrumbors-3/+3
Enable new bors try branch to run on CI Needed to fix [this error](https://github.com/rust-lang/rust/actions/runs/6420044833/job/17431256956). Inspired by https://github.com/rust-lang/rust/pull/99988 Also, removes `try-merge` from the workflow. It shouldn't have been added in https://github.com/rust-lang/rust/pull/116353. r? `@Mark-Simulacrum`
2023-10-08Auto merge of #114623 - Kobzol:opt-dist-gha-summaries, r=Mark-Simulacrumbors-28/+100
Print some information from try builds to GitHub summary This PR adds some logs from `opt-dist` (the duration of the individual steps of the build pipeline, and the size of the resulting artifacts) to GitHub [job summaries](https://github.blog/2022-05-09-supercharging-github-actions-with-job-summaries/), in order to quickly show useful information right in the GHA CI job page, without needing to read the full log. [This](https://github.com/rust-lang-ci/rust/actions/runs/5810621086) is how the summary currently looks like. r? `@ghost`
2023-10-07Auto merge of #116416 - Kobzol:ci-host-llvm-17-0-2, r=Mark-Simulacrumbors-1/+1
Bump host compiler on x64 dist Linux to LLVM 17.0.2 17.0.0-rc3 had a bunch of miscompilations, and it's probably better in general not to use a RC version of LLVM long term on CI.
2023-10-07Auto merge of #116437 - nnethercote:rustc_features, r=Nilstriebbors-1/+1
Clean up `rustc_features` Plenty more to be done, but this is a decent start. r? `@Nilstrieb`
2023-10-07linker: Remove unstable legacy CLI linker flavorsVadim Petrochenkov-5/+3
2023-10-07Correctly handle cross-crate C-like variantsGuillaume Gomez-20/+7
2023-10-07Only display enum variants integer values if one of them has a value setGuillaume Gomez-18/+27
2023-10-07allow option-ext as a tool dependency (MPL licensed)Ralf Jung-0/+1
2023-10-07Merge from rustcThe Miri Conjob Bot-772/+2640
2023-10-07Preparing for merge from rustcThe Miri Conjob Bot-1/+1
2023-10-06Update docs for mips target tier demotion.Eric Huss-4/+4
2023-10-06Rollup merge of #116277 - RalfJung:post-mono, r=oli-obkJubilee-2/+1
dont call mir.post_mono_checks in codegen It seems like all tests are still passing when I remove this... let's see what CI says.
2023-10-06Show values of C-like variants even if not defined by the userGuillaume Gomez-22/+90
2023-10-06Update platform docs for aarch64-apple-tvos-simSebastian Imlay-1/+4
2023-10-06Rename `flag` to `arg`Jakub Beránek-4/+4
2023-10-06Rollup merge of #116423 - eltociear:patch-22, r=flip1995Matthias Krüger-2/+2
Fix typo in attrs.rs documenation -> documentation
2023-10-06Auto merge of #3112 - RalfJung:rustup, r=RalfJungbors-717/+605
Rustup preparing for rustc-push
2023-10-06Merge from rustcRalf Jung-716/+604
2023-10-06Preparing for merge from rustcRalf Jung-1/+1
2023-10-06Auto merge of #3110 - eduardosm:rounding-without-host-floats, r=RalfJungbors-30/+27
Do not use host floats in `simd_{ceil,floor,round,trunc}`
2023-10-06Merge commit 'b105fb4c39bc1a010807a6c076193cef8d93c109' into clippyupPhilipp Krones-54/+64
2023-10-06Merge commit 'b105fb4c39bc1a010807a6c076193cef8d93c109' into clippyupPhilipp Krones-768/+2637
2023-10-06Do not use host floats in `simd_{ceil,floor,round,trunc}`Eduardo Sánchez Muñoz-30/+27
2023-10-06Fix problems of Reserved -> FrozenNeven Villani-481/+1097
Reserved loses permissions too quickly. Adding more fine-grained behavior of Reserved lets it lose write permissions only temporarily. Protected tags receive a read access on initialized locations.