about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2023-02-15Auto merge of #108006 - cjgillot:def-impl, r=oli-obkbors-5/+5
Avoid accessing HIR when it can be avoided Experiment to see if it helps some incremental cases. Will be rebased once https://github.com/rust-lang/rust/pull/107942 gets merged. r? `@ghost`
2023-02-15Use more let chainGuillaume Gomez-251/+220
2023-02-15Merge from rustcRalf Jung-11689/+14230
2023-02-15Preparing for merge from rustcRalf Jung-1/+1
2023-02-15Use target instead of machine for mir interpreter integer handling.Oli Scherer-111/+111
The naming of `machine` only makes sense from a mir interpreter internals perspective, but outside users talk about the `target` platform
2023-02-15make x look for x.py if shell script does not existZephaniah Ong-16/+60
bump up x version Refactor code
2023-02-15Rollup merge of #107163 - mikebenfield:parameters-pr, r=TaKO8KiDylan DPC-2/+2
Remove some superfluous type parameters from layout.rs. Specifically remove V, which can always be VariantIdx, and F, which can always be Layout.
2023-02-14Add `kernel-address` sanitizer support for freestanding targetsWesley Norris-0/+29
2023-02-15Correctly handle reexports of `#[doc(hidden)]` is reexport does not use ↵Guillaume Gomez-4/+15
`#[doc(inline)]`
2023-02-14Correctly handle reexport traversal by fixing multiple bugs, especially for ↵Guillaume Gomez-59/+85
items with a path of 1 element
2023-02-14Auto merge of #108056 - matthiaskrgr:rollup-oa6bxvh, r=matthiaskrgrbors-131/+150
Rollup of 9 pull requests Successful merges: - #107573 (Update the minimum external LLVM to 14) - #107626 (Fix `x fix` on the standard library itself) - #107673 (update ICU4X to 1.1.0) - #107733 (Store metrics from `metrics.json` to CI PGO timer) - #108007 (Use `is_str` instead of string kind comparison) - #108033 (add an unstable `#[rustc_coinductive]` attribute) - #108039 (Refactor refcounted structural_impls via functors) - #108040 (Use derive attributes for uninteresting traversals) - #108044 (interpret: rename Pointer::from_addr → from_addr_invalid) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-02-14Add `of_trait` to DefKind::Impl.Camille GILLOT-5/+5
2023-02-14Prevent some attributes from being merged with others on reexportsGuillaume Gomez-8/+89
2023-02-14Rollup merge of #108007 - compiler-errors:str-less-kind, r=NilstriebMatthias Krüger-11/+10
Use `is_str` instead of string kind comparison Split out from #107939
2023-02-14Rollup merge of #107733 - Kobzol:opt-build-metrics, r=Mark-SimulacrumMatthias Krüger-34/+124
Store metrics from `metrics.json` to CI PGO timer With this change, we'll be able to easily see how long does it take to compile LLVM vs `rustc`. r? ```@Mark-Simulacrum```
2023-02-14Rollup merge of #107626 - jyn514:x-fix, r=Mark-SimulacrumMatthias Krüger-0/+4
Fix `x fix` on the standard library itself Fixes https://github.com/rust-lang/rust/issues/107501
2023-02-14Rollup merge of #107573 - cuviper:drop-llvm-13, r=nagisaMatthias Krüger-86/+12
Update the minimum external LLVM to 14 With this change, we'll have stable support for LLVM 14 through 16 (pending release). For reference, the previous increase to LLVM 13 was #100460.
2023-02-14Rollup merge of #108029 - oli-obk:🞋_usize, r=RalfJungMatthias Krüger-9/+9
s/eval_usize/eval_target_usize/ for clarity r? `@nnethercote` as discussed in https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/.60Const.60.20and.20.60usize.60.2F.60u64.60 it is unclear what `usize` means and why we use a `u64` for something talking about `usize`. This renaming should make it clear that we're talking about `usize`s on the target platform, irrespective of the compiler host platform.
2023-02-14Rollup merge of #108025 - notriddle:notriddle/intra-doc-link-tooltips, ↵Matthias Krüger-9/+35
r=GuillaumeGomez rustdoc: add more tooltips to intra-doc links This commit makes intra-doc link tooltips consistent with generated links in function signatures and item tables, with the format `itemtype foo::bar::baz`. This way, you can tell if a link points at a trait or a type (for example) by mousing over it. See also https://github.com/rust-lang/rust/pull/39697 Partially solves https://internals.rust-lang.org/t/rustdoc-suggestion-highlight-links-fn-s-mod-s-type-s-etc-appropriately-within-and-documentation/17931 (though the Internals thread asks for color-coding, while this PR adds a tooltip instead, it's accomplishing the same thing). Before: <img width="950" alt="image" src="https://user-images.githubusercontent.com/1593513/218653059-911cea01-7231-438a-ad98-be98ab73783f.png"> After: <img width="432" alt="image" src="https://user-images.githubusercontent.com/1593513/218653201-34ca3aa7-18f1-4cb1-be68-a1411bbe797e.png">
2023-02-14s/eval_usize/eval_target_usize/ for clarityOli Scherer-9/+9
2023-02-14Auto merge of #107765 - petrochenkov:nomoclone, r=oli-obkbors-173/+19
rustc/rustdoc: Perform name resolver cleanups enabled by #94857 Unblocks https://github.com/rust-lang/rust/pull/105462. r? `@oli-obk`
2023-02-13rustdoc: add more tooltips to intra-doc linksMichael Howell-9/+35
This commit makes intra-doc link tooltips consistent with generated links in function signatures and item tables, with the format `itemtype foo::bar::baz`. This way, you can tell if a link points at a trait or a type (for example) by mousing over it. See also fce944d4e79b3a87ddf511206724edf33acfd704
2023-02-14Auto merge of #107993 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 10 commits in 82c3bb79e3a19a5164e33819ef81bfc2c984bc56..39c13e67a5962466cc7253d41bc1099bbcb224c3 2023-02-04 22:52:16 +0000 to 2023-02-12 02:01:08 +0000 - chore: Update to toml v0.6, toml_edit v0.18 (rust-lang/cargo#11618) - doc: more doc comments and intra-doc links (rust-lang/cargo#11703) - Deny warnings in CI, not locally (rust-lang/cargo#11699) - add comment to lto.rs (rust-lang/cargo#11701) - Re-export cargo_new::NewProjectKind as public (rust-lang/cargo#11700) - Add '-C' flag for changing current dir before build (rust-lang/cargo#10952) - `-Zrustdoc-scrape-example` must fail with bad build script (rust-lang/cargo#11694) - Update CHANGELOG for 1.68 backports (rust-lang/cargo#11690) - Update 1password to the version 2 CLI (rust-lang/cargo#11692) - chore: autolabel more for `A-*` (rust-lang/cargo#11679) r? `@ghost`
2023-02-13Auto merge of #108015 - matthiaskrgr:rollup-qerohjn, r=matthiaskrgrbors-9/+55
Rollup of 8 pull requests Successful merges: - #107902 (fix: improve the suggestion on future not awaited) - #107913 (Update broken link in cargo style guide) - #107942 (Tighter spans for bad inherent `impl` self types) - #107948 (Allow shortcuts to directories to be used for ./x.py fmt) - #107971 (Clearly document intentional UB in mir-opt tests) - #107985 (Added another error to be processed in fallback) - #108002 (Update books) - #108013 (rustdoc: use a string with one-character codes for search index types) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-02-13Rollup merge of #108013 - notriddle:notriddle/search-index-itemtype, ↵Matthias Krüger-5/+16
r=GuillaumeGomez rustdoc: use a string with one-character codes for search index types $ wc -c search-index.old.js search-index.new.js 3940530 search-index.old.js 3843222 search-index.new.js ((3940530-3843222)/3940530)*100 = 2.47% $ wc -c search-index.old.js.gz search-index.new.js.gz 380251 search-index.old.js.gz 379434 search-index.new.js.gz ((380251-379434)/380251)*100 = 0.214%
2023-02-13Rollup merge of #108002 - rustbot:docs-update, r=ehussMatthias Krüger-0/+0
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-13Rollup merge of #107948 - jieyouxu:issue-107944, r=ozkanonurMatthias Krüger-2/+38
Allow shortcuts to directories to be used for ./x.py fmt Fixes #107944. Maximum recursive search depth is 3 and only accepts shortcuts for directories. If there are no shortcut candidates, the previous behavior to panic is preserved. If there are multiple candidates, the shortcut candidates are ignored. After this change, `./x.py fmt std` no longer panics and formats `library/std` instead.
2023-02-13Rollup merge of #107913 - base0x10:master, r=compiler-errorsMatthias Krüger-2/+1
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-13rustdoc: use a string with one-character codes for search index typesMichael Howell-5/+16
$ wc -c search-index.old.js search-index.new.js 3940530 search-index.old.js 3843222 search-index.new.js ((3940530-3843222)/3940530)*100 = 2.47% $ wc -c search-index.old.js.gz search-index.new.js.gz 380251 search-index.old.js.gz 379434 search-index.new.js.gz ((380251-379434)/380251)*100 = 0.214%
2023-02-13Auto merge of #107992 - lnicola:rust-analyzer-2023-02-13, r=lnicolabors-9698/+11188
:arrow_up: `rust-analyzer` r? `@ghost`
2023-02-13Use is_str instead of string kind comparisonMichael Goulet-11/+10
2023-02-14Allow shortcuts to directories to be used for `./x.py fmt`许杰友 Jieyou Xu (Joe)-2/+38
Fixes #107944. Maximum recursive search depth is 3 and only accepts shortcuts for directories (single component paths, such as `./x.py fmt std`). If there are no shortcut candidates but single componenet path(s) are given, it falls back to the previous behavior to panic with unable to find directory. If there are multiple shortcut candidates for a given single component path, the shortcut candidates are considered ambiguous, are then ignored, and the single component path is accepted as-is. After this change, `./x.py fmt std` no longer panics and formats `library/std` instead.
2023-02-13Add additional options to `x setup`clubby789-21/+114
2023-02-13Update booksrustbot-0/+0
2023-02-13Log all metrics from `metrics.json`Jakub Beránek-2/+24
2023-02-13Store metrics from metrics.json into PGO CI timerJan Gaura-34/+102
Co-authored-by: Jakub Beránek <berykubik@gmail.com>
2023-02-13Auto merge of #107924 - ↵bors-7/+7
eggyal:move_fold_visit_traits_to_type_lib_with_trait_alias, r=oli-obk Move folding & visiting traits into type library This is a rework of #107712, following feedback on that PR. In particular, this version uses trait aliases to reduce the API churn for trait consumers. Doing so requires a workaround for #107747 until its fix in #107803 is merged into the stage0 compiler; this workaround, which uses conditional compilation based on the `bootstrap` configuration predicate, sits in dedicated commit b409329c for ease of reversion. The possibility of the `rustc_middle` crate retaining its own distinct versions of each folding/visiting trait, blanket-implemented on all types that implement the respective trait in the type library, was also explored: however since this would necessitate making each `rustc_middle` trait a subtrait of the respective type library trait (so that such blanket implementations can delegate their generic methods), no benefit would be gained. r? types
2023-02-13Update cargoWeihang Lo-0/+0
10 commits in 82c3bb79e3a19a5164e33819ef81bfc2c984bc56..39c13e67a5962466cc7253d41bc1099bbcb224c3 2023-02-04 22:52:16 +0000 to 2023-02-12 02:01:08 +0000 - chore: Update to toml v0.6, toml_edit v0.18 (rust-lang/cargo#11618) - doc: more doc comments and intra-doc links (rust-lang/cargo#11703) - Deny warnings in CI, not locally (rust-lang/cargo#11699) - add comment to lto.rs (rust-lang/cargo#11701) - Re-export cargo_new::NewProjectKind as public (rust-lang/cargo#11700) - Add '-C' flag for changing current dir before build (rust-lang/cargo#10952) - `-Zrustdoc-scrape-example` must fail with bad build script (rust-lang/cargo#11694) - Update CHANGELOG for 1.68 backports (rust-lang/cargo#11690) - Update 1password to the version 2 CLI (rust-lang/cargo#11692) - chore: autolabel more for `A-*` (rust-lang/cargo#11679)
2023-02-13:arrow_up: rust-analyzerLaurențiu Nicola-9698/+11188
2023-02-13Rollup merge of #107922 - Kobzol:ci-print-disk-size, r=Mark-SimulacrumMatthias Krüger-2/+17
Print disk usage in PGO CI script To diagnose issues like https://github.com/rust-lang/rust/pull/94857#issuecomment-1426648675.
2023-02-13Rollup merge of #107838 - estebank:terminal_hyperlinks, r=nagisaMatthias Krüger-3/+12
Introduce `-Zterminal-urls` to use OSC8 for error codes Terminals supporting the OSC8 Hyperlink Extension can support inline anchors where the text is user defineable but clicking on it opens a browser to a specified URLs, just like `<a href="URL">` does in HTML. https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
2023-02-13Rollup merge of #107340 - notriddle:notriddle/simplify-doctest-tooltip, ↵Matthias Krüger-109/+81
r=GuillaumeGomez rustdoc: merge doctest tooltip with notable traits tooltip Fixes https://discord.com/channels/442252698964721669/443150878111694848/1066420140167680000 <details><summary>a user report where the tooltip arrow overlaps the text</summary> ![](https://cdn.discordapp.com/attachments/443150878111694848/1066420139530145812/this-example-is-not-tested-busted-rendering.png) </details> Fixes #91100 Preview: <https://notriddle.com/notriddle-rustdoc-demos/simplify-doctest-tooltip/std/vec/struct.Vec.html#indexing> Screenshot: ![image](https://user-images.githubusercontent.com/1593513/214975516-72667632-4609-49fa-8c37-e8d2ba1ba7dc.png)
2023-02-13Rename folder traits' `tcx` method to `interner`Alan Egerton-1/+1
2023-02-13Make folding traits generic over the InternerAlan Egerton-1/+1
2023-02-13Make visiting traits generic over the InternerAlan Egerton-3/+3
2023-02-13Alias folding/visiting traits instead of re-exportAlan Egerton-3/+3
2023-02-13Rollup merge of #107966 - GuillaumeGomez:update-browser-ui-test, r=notriddleDylan DPC-1/+1
Update browser-ui-test version to 0.14.3 It brings a few fixes to the `NEAR` checks. The PR for it in [here](https://github.com/GuillaumeGomez/browser-UI-test/pull/436). r? `@notriddle`
2023-02-13Auto merge of #107869 - nnethercote:reduce-interning, r=compiler-errorsbors-20/+20
Reduce interning r? `@compiler-errors`
2023-02-12Add sanitizer support for modern iOS platformsKeith Smiley-4/+34
asan and tsan generally support iOS, but that previously wasn't configured in rust. This only adds support for the simulator architectures, and arm64 device architecture, not the older 32 bit architectures.
2023-02-13Reduce direct `mk_ty` usage.Nicholas Nethercote-20/+20
We use more specific `mk_*` functions in most places, might as well use them as much as possible.