about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2023-12-18Rename `ParseSess::with_span_handler` as `ParseSess::with_dcx`.Nicholas Nethercote-6/+6
2023-12-18Rename `Session::span_diagnostic` as `Session::dcx`.Nicholas Nethercote-10/+10
2023-12-18Rename `ParseSess::span_diagnostic` as `ParseSess::dcx`.Nicholas Nethercote-15/+14
2023-12-18Rename `EarlyErrorHandler` as `EarlyDiagCtxt`.Nicholas Nethercote-15/+15
2023-12-18Rename `Handler` as `DiagCtxt`.Nicholas Nethercote-27/+28
2023-12-18Auto merge of #119007 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 11 commits in 1aa9df1a5be205cce621f0bc0ea6062a5e22a98c..1a2666ddd14cf0a255d4ddb61c63531c259a7b39 2023-12-12 14:52:31 +0000 to 2023-12-17 17:53:53 +0000 - chore: downgrade to openssl v1.1.1 (rust-lang/cargo#13179) - docs(home): prepare the changelog for 0.5.9 (rust-lang/cargo#13177) - refactor: Pull name validation into `util_schemas` (rust-lang/cargo#13166) - chore(deps): bump zerocopy from 0.7.29 to 0.7.31 (rust-lang/cargo#13174) - Replace SHGetFolderPathW with SHGetKnownFolderPath (rust-lang/cargo#13173) - chore(bump-check): dont check `home` against beta/stable branches (rust-lang/cargo#13167) - fix: Fill in more empty name holes (rust-lang/cargo#13164) - Do not allow empty name in package ID spec (rust-lang/cargo#13152) - chore(deps): update rust crate openssl to 0.10.61 (rust-lang/cargo#13159) - `all-static` feature should include `vendored-libgit2` (rust-lang/cargo#13134) - doc/registry-web-api: Adjust success response code documentation (rust-lang/cargo#13160) r? ghost
2023-12-17Update cargoWeihang Lo-0/+0
2023-12-18ci: docker: dist-various-1: Include RISC-V C compilersAlistair Francis-8/+30
The compiler-builtins for RISC-V are missing some key functions, such as __bswapsi2 [1]. We can't just pull in the LLVM compiler-rt builtins as the rust-lang/rust distribution container doesn't have a C compiler [2]. This patch adds RISC-V C compilers to the CI Dockerfile as the first step towards enabling LLVM compiler-rt builtins for RISC-V Rust. 1: https://github.com/rust-lang/compiler-builtins/issues/350 2: https://github.com/rust-lang/compiler-builtins/commit/e4f46b91ca843297fc065e20f1591e4971ae608c Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2023-12-17Auto merge of #119020 - onur-ozkan:remove-hex, r=albertlarsan68bors-29/+79
remove `hex` dependency in bootstrap First commit removes the `hex` dependency, as we can achieve the same output with the added function, which is very small and simple. Second commit creates a test module for the helpers util and adds unit tests for multiple helper functions, including `hex_encode`.
2023-12-17Auto merge of #119039 - RalfJung:miri, r=RalfJungbors-354/+491
Miri subtree update r? `@ghost`
2023-12-17do not allow ABI mismatches inside repr(C) typesRalf Jung-0/+33
2023-12-17use Vec for region constraintsAli MJ Al-Nasrawy-1/+1
2023-12-17expand helpers tests with new test module `tests/helpers`onur-ozkan-16/+63
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-12-17Auto merge of #119001 - notriddle:notriddle/searchwords, r=GuillaumeGomezbors-49/+31
rustdoc-search: remove parallel searchWords array This might have made sense if the algorithm could use `searchWords` to skip having to look at `searchIndex`, but since it always does a substring check on both the stock word and the normalizedName, it doesn't seem to help performance anyway. Profile: http://notriddle.com/rustdoc-html-demo-8/searchwords/index.html
2023-12-17Auto merge of #118830 - GuillaumeGomez:env-tracked_env, r=Nilstriebbors-0/+4
Add support for `--env` on `tracked_env::var` Follow-up of https://github.com/rust-lang/rust/pull/118368. Part of Part of https://github.com/rust-lang/rust/issues/80792. It adds support of the `--env` option for proc-macros through `tracked_env::var`. r? `@Nilstrieb`
2023-12-16Auto merge of #117595 - jyn514:x-clippy, r=albertlarsan68bors-93/+245
x clippy thanks to `@asquared31415` `@albertlarsan68` for all their help, most of this pr is their work note that this also adds x clippy --stage 0 -Awarnings to x86_64-gnu-llvm-15 to make sure it stays working; that won't gate on any clippy warnings, just enforce that clippy doesn't give a hard error. we can't add --stage 1 until clippy fixes its debug assertions not to panic. note that `x clippy --stage 1` currently breaks when combined with download-rustc. unlike the previous prs, this doesn't require changes to clippy (it works by using RUSTC_WRAPPER instead), and supports stage 0 read this commit-by-commit closes https://github.com/rust-lang/rust/pull/107628; see also https://github.com/rust-lang/rust/pull/106394, https://github.com/rust-lang/rust/pull/97443. fixes https://github.com/rust-lang/rust/issues/95988. helps with https://github.com/rust-lang/rust/issues/76495. r? bootstrap
2023-12-16test `x clippy --stage 0` in ciJoshua Nelson-0/+6
2023-12-16Update stage0.jsonAlbert Larsan-0/+48
you can replicate this commit with `./x.py run bump-stage0 --args 2023-11-13`
2023-12-16make x.py clippy download and use beta clippyasquared31415-89/+125
2023-12-16use RUSTC_WRAPPER instead of RUSTCjyn-15/+68
2023-12-16give a better error if renaming a temp file failsjyn-1/+8
2023-12-16describe unstable linker flavors in the unstable bookRémy Rakic-0/+32
2023-12-16remove unstable linker flavors from stable documentationRémy Rakic-3/+0
2023-12-16create helper fn `hex_encode` and remove `hex` dependencyonur-ozkan-13/+16
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-12-16Visit the AllocIds and BorTags in borrow state FrameExtraBen Kimock-8/+25
2023-12-16fix printing cargo args on --dry-runjyn-7/+9
2023-12-16Merge commit 'a859e5cc1ce100df22346a1005da30532d04de59' into clippyupPhilipp Krones-637/+3064
2023-12-15Rollup merge of #119004 - matthiaskrgr:conv, r=compiler-errorsJubilee-9/+10
NFC don't convert types to identical types
2023-12-15rustdoc-search: remove parallel searchWords arrayMichael Howell-49/+31
This might have made sense if the algorithm could use `searchWords` to skip having to look at `searchIndex`, but since it always does a substring check on both the stock word and the normalizedName, it doesn't seem to help performance anyway.
2023-12-15NFC don't convert types to identical typesMatthias Krüger-9/+10
2023-12-15Rollup merge of #118727 - compiler-errors:lint-decorate, r=WaffleLapkinJubilee-29/+11
Don't pass lint back out of lint decorator Change the decorator function in the signature of the `emit_lint`/`span_lint`/etc family of methods from `impl for<'a, 'b> FnOnce(&'b mut DiagnosticBuilder<'a, ()>) -> &'b mut DiagnosticBuilder<'a, ()>` to `impl for<'a, 'b> FnOnce(&'b mut DiagnosticBuilder<'a, ()>)`. I consider it easier to read this way, especially when there's control flow involved. r? nnethercote though feel free to reassign
2023-12-15Rollup merge of #118396 - compiler-errors:ast-lang-items, r=cjgillotJubilee-20/+6
Collect lang items from AST, get rid of `GenericBound::LangItemTrait` r? `@cjgillot` cc #115178 Looking forward, the work to remove `QPath::LangItem` will also be significantly more difficult, but I plan on doing it as well. Specifically, we have to change: 1. A lot of `rustc_ast_lowering` for things like expr `..` 2. A lot of astconv, since we actually instantiate lang and non-lang paths quite differently. 3. A ton of diagnostics and clippy lints that are special-cased via `QPath::LangItem` Meanwhile, it was pretty easy to remove `GenericBound::LangItemTrait`, so I just did that here.
2023-12-15Rollup merge of #118986 - GuillaumeGomez:simplify-js-inline, r=notriddleMatthias Krüger-2/+2
Simplify JS code a little bit As mentioned, JS code can be simplified a little bit. r? ``@notriddle``
2023-12-15Rollup merge of #118977 - GuillaumeGomez:simplifysrc-script, r=notriddleMatthias Krüger-12/+3
Simplify `src-script.js` code Instead of keeping this value in the global scope and still use it in the function in case it wasn't used outside, let's just use it inside the function. r? ``@notriddle``
2023-12-15Appease the tools: clippy, rustdocMichael Goulet-20/+6
2023-12-15Don't pass lint back out of lint decoratorMichael Goulet-29/+11
2023-12-15Make the crate compile on stableNadrieril-0/+1
2023-12-15Simplify JS code a little bitGuillaume Gomez-2/+2
2023-12-15Auto merge of #3226 - saethlin:deadpool-test, r=RalfJungbors-0/+16
Add a regression test for rust#115145 Per https://github.com/rust-lang/rust/pull/118805#issuecomment-1855264860
2023-12-15Add the test minimized from deadpoolBen Kimock-0/+16
2023-12-15Auto merge of #118975 - GuillaumeGomez:rollup-0emhjx0, r=GuillaumeGomezbors-68/+551
Rollup of 4 pull requests Successful merges: - #113091 (Don't merge cfg and doc(cfg) attributes for re-exports) - #115660 (rustdoc: allow resizing the sidebar / hiding the top bar) - #118863 (rustc_mir_build: Enforce `rustc::potential_query_instability` lint) - #118909 (Some cleanup and improvement for invalid ref casting impl) r? `@ghost` `@rustbot` modify labels: rollup
2023-12-15Simplify `src-script.js` codeGuillaume Gomez-12/+3
2023-12-15Rollup merge of #115660 - notriddle:notriddle/sidebar-resize, r=GuillaumeGomezGuillaume Gomez-23/+507
rustdoc: allow resizing the sidebar / hiding the top bar Fixes #97306 Preview: http://notriddle.com/rustdoc-html-demo-4/sidebar-resize/std/index.html ![image](https://github.com/rust-lang/rust/assets/1593513/a2f40ea2-0436-4e44-99e8-d160dab2a680) ## Summary This feature adds: 1. A checkbox to the Settings popover to hide the persistent navigation bar (the sidebar on large viewports and the top bar on small ones). 2. On large viewports, it adds a resize handle to the persistent sidebar. Resizing it into nothing is equivalent to turning off the persistent navigation bar checkbox in Settings. 3. If the navigation bar is hidden, a toolbar button to the left of the search appears. Clicking it brings the navigation bar back. ## Motivation While "mobile mode" is definitely a good default, it's not the only reason people have wanted to hide the sidebar: * Some people use tiling window managers, and don't like rustdoc's current breakpoints. Changing the breakpoints might help with that, but there's no perfect solution, because there's a gap between "huge screen" and "smartphone" where reasonable people can disagree about whether it makes sense for the sidebar to be on-screen. https://github.com/rust-lang/rust/issues/97306 * Some people ask for ways to reduce on-screen clutter because it makes it easier to focus. There's not a media query for that (and if there was, privacy-conscious users would turn it off). https://github.com/rust-lang/rust/issues/59829 This feature is designed to avoid these problems. Resizing the sidebar especially helps, because it provides a way to hide the sidebar without adding a new top-level button (which would add clutter), and it provides a way to make rustdoc play nicer in complex, custom screen layouts. ## Guide and Reference-level explanation On a desktop or laptop with a mouse, resize the sidebar by dragging its right edge. On any browser, including mobile phones, the sticky top bar or side bar can be hidden from the Settings area (the button with the cog wheel, next to the search bar). When it's hidden, a convenient button will appear on the search bar's left. ## Drawbacks This adds more JavaScript code to the render blocking area. ## Rationale and alternatives The most obvious way to allow people to hide the sidebar would have been to let them "manually enter mobile mode." The upside is that it's a feature we already have. The downside is that it's actually really hard to come up with a terse description. Is it: * A Setting that forces desktop viewers to always have the mobile-style top bar? If so, how do we label it? Should it be visible on mobile, and, if so, does it just not do anything? * A persistent hide/show sidebar button, present on desktop, just like on mobile? That's clutter that I'd like to avoid. ## Prior art * The new file browser in GitHub uses a similar divider with a mouse-over indicator * mdBook and macOS Finder both allow you to resize the sidebar to nothing as a gesture to hide it * https://www.nngroup.com/articles/drag-drop/ ## Future possibilities https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Table.20of.20contents proposes a new, second sidebar (a table of contents). How should it fit in with this feature? Should it be resizeable? Hideable? Can it be accessed on mobile?
2023-12-15Rollup merge of #113091 - GuillaumeGomez:prevent-cfg-merge-reexport, r=rustdocGuillaume Gomez-45/+44
Don't merge cfg and doc(cfg) attributes for re-exports Fixes #112881. ## Explanations When re-exporting things with different `cfg`s there are two things that can happen: * The re-export uses a subset of `cfg`s, this subset is sufficient so that the item will appear exactly with the subset * The re-export uses a non-subset of `cfg`s (e.g. like the example I posted just above where the re-export is ungated), if the non-subset `cfg`s are active (e.g. compiling that example on windows) then this will be a compile error as the item doesn't exist to re-export, if the subset `cfg`s are active it behaves like 1. ### Glob re-exports? **This only applies to non-glob inlined re-exports.** For glob re-exports the item may or may not exist to be re-exported (potentially the `cfg`s on the path up until the glob can be removed, and only `cfg`s on the globbed item itself matter), for non-inlined re-exports see https://github.com/rust-lang/rust/issues/85043. cc `@Nemo157` r? `@notriddle`
2023-12-15Auto merge of #118961 - notriddle:notriddle/varconst, r=GuillaumeGomezbors-2/+8
rustdoc-search: fix a race condition in search index loading `var` declare it in the global scope, and `const` does not. It needs to be declared in global scope. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/var https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const > const declarations do not create properties on [globalThis](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis) when declared at the top level of a script. Fixes a regression introduced by https://github.com/rust-lang/rust/pull/118910
2023-12-15Rollup merge of #118888 - compiler-errors:uplift-more-things, r=jackh726Matthias Krüger-3/+3
Uplift `TypeAndMut` and `ClosureKind` to `rustc_type_ir` Uplifts `TypeAndMut` and `ClosureKind` I know I said I was just going to get rid of `TypeAndMut` (https://github.com/rust-lang/types-team/issues/124) but I think this is much simpler, lol r? `@jackh726` or `@lcnr`
2023-12-15Merge from rustcThe Miri Conjob Bot-129/+141
2023-12-15Preparing for merge from rustcThe Miri Conjob Bot-1/+1
2023-12-14rustdoc-search: fix a race condition in search index loadingMichael Howell-2/+8
`var` declare it in the global scope, and `const` does not. It needs to be declared in global scope.
2023-12-15Auto merge of #118936 - nikic:update-llvm-18, r=cuviperbors-21/+21
Update to LLVM 17.0.6 This is a rebase on the final LLVM 17 release. Includes the RISCV fix requested in https://github.com/rust-lang/llvm-project/pull/157 (and I think this is also the only change in this release that is relevant to rustc). r? `@cuviper` Fixes #117902