about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2023-03-22Upgrade to LLVM 16Nikita Popov-0/+0
2023-03-22Update dist-x86_64-linux to GCC 8.5Nikita Popov-1/+1
While we don't use GCC for the LLVM build, we do use its libstdc++, and there has been an std::optional ABI break in this version. This makes the libLLVM.so for LLVM 16 ABI-incompatible with newer libstdc++ versions, which we use on all other builders, and which download-ci-llvm users are likely to use.
2023-03-22Auto merge of #109119 - lcnr:trait-system-cleanup, r=compiler-errorsbors-2/+4
a general type system cleanup removes the helper functions `traits::fully_solve_X` as they add more complexity then they are worth. It's confusing which of these helpers should be used in which context. changes the way we deal with overflow to always add depth in `evaluate_predicates_recursively`. It may make sense to actually fully transition to not have `recursion_depth` on obligations but that's probably a bit too much for this PR. also removes some other small - and imo unnecessary - helpers. r? types
2023-03-22Change text -> rust,ignore highlighting in sanitizer.mdTrevor Gross-2/+2
Marked ignore due to difficulty getting doctests to pass cross-platform
2023-03-22Auto merge of #109463 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 11 commits in 4a3c588b1f0a8e2dc8dd8789dbf3b6a71b02ed49..15d090969743630bff549a1b068bcaa8174e5ee3 2023-03-14 14:05:36 +0000 to 2023-03-21 17:54:28 +0000 - docs(contrib): Move higher level resolver docs into doc comments (rust-lang/cargo#11870) - docs(contrib): Pull impl info out of architecture (rust-lang/cargo#11869) - Update curl-sys (rust-lang/cargo#11871) - Poll loop fixes (rust-lang/cargo#11624) - clippy: warn `disallowed_methods` for `std::env::var` and friends (rust-lang/cargo#11828) - Add --ignore-rust-version flag to cargo install (rust-lang/cargo#11859) - Handle case mismatches when looking up env vars in the Config snapshot (rust-lang/cargo#11824) - align semantics of generated vcs ignore files (rust-lang/cargo#11855) - Add more information to wait-for-publish (rust-lang/cargo#11713) - docs: Address warnings (rust-lang/cargo#11856) - docs(contrib): Create a file overview in the nightly docs (rust-lang/cargo#11850)
2023-03-22Update cargoWeihang Lo-0/+0
2023-03-21rustdoc: remove redundant `.content` prefix from span/a colorsMichael Howell-21/+21
Reverts a1d4ebe4961c107272f9764d1908227a3cd04092, as well as fixing the problem it solved with links losing their color.
2023-03-21Auto merge of #109092 - compiler-errors:local-key, r=cjgillotbors-10/+10
Make local query providers receive local keys When a query is marked `separate_provide_extern`, we can map a query key to a "local" form of the key, e.g. `DefId` -> `LocalDefId`. This simplifies a ton of code which either has to assert or use something like `expect_local` to assert that the query key is local.
2023-03-21Add `safe` to number renderingclubby789-2/+2
2023-03-21Ignore the vendor directory for tidy tests.James Farrell-0/+1
When running `x.py test` on a downloaded source distribution (e.g. https://static.rust-lang.org/dist/rustc-<version>-src.tar.gz), the crates in the vendor directory contain a number of executable files that cause the tidy test to fail with the following message: tidy error: binary checked into source: <path> I see 26 such errors with the 1.68.0 source distribution. A few of these are .rs source files with incorrect executable permission, but most are scripts that are correctly marked executable.
2023-03-21LocalCrate keyMichael Goulet-1/+2
2023-03-21Use local key in providersMichael Goulet-10/+9
2023-03-21Set LLVM `LLVM_UNREACHABLE_OPTIMIZE` to `OFF`Ian Douglas Scott-1/+2
This option was added to LLVM in https://reviews.llvm.org/D121750?id=416339. It makes `llvm_unreachable` in builds without assertions compile to an `LLVM_BUILTIN_TRAP` instead of `LLVM_BUILTIN_UNREACHABLE` (which causes undefined behavior and is equivalent to `std::hint::unreachable_unchecked`). Having compiler bugs triggering undefined behavior generally seems undesirable and inconsistent with Rust's goals. There is a check in `src/tools/tidy/src/style.rs` to reject code using `llvm_unreachable`. But it is used a lot within LLVM itself. For instance, this changes a failure I get compiling `libcore` for m68k from a `SIGSEGV` to `SIGILL`, which seems better though it still doesn't provide a useful message without switching to an LLVM build with asserts. It may be best not to do this if it noticeably degrades compiler performance, but worthwhile if it doesn't do so in any significant way. I haven't looked into what benchmarks there are for Rustc. That should be considered before merging.
2023-03-21Auto merge of #108659 - ferrocene:pa-test-metrics, r=Mark-Simulacrumbors-38/+504
Include executed tests in the build metrics (and use a custom test display impl) The main goal of this PR is to include all tests executed in CI inside the build metrics JSON files. I need this for Ferrocene, and `@Mark-Simulacrum` expressed desire to have this as well to ensure all tests are executed at least once somewhere in CI. Unfortunately implementing this required rewriting inside of bootstrap all of the code to render the test output to console. libtest supports outputting JSON instead of raw text, which we can indeed use to populate the build metrics. Doing that suppresses the console output though, and compared to rustc and Cargo the console output is not included as a JSON field. Because of that, this PR had to reimplement both the "pretty" format (one test per line, with `rust.verbose-tests = true`), and the "terse" format (the wall of dots, with `rust.verbose-tests = false`). The current implementation should have the exact same output as libtest, except for the benchmark output. libtest's benchmark output is broken in the "terse" format, so since that's our default I slightly improved how it's rendered. Also, to bring parity with libtest I had to introduce support for coloring output from bootstrap, using the same dependencies `annotate-snippets` uses. It's now possible to use `builder.color_for_stdout(Color::Red, "text")` and `builder.color_for_stderr(Color::Green, "text")` across all of bootstrap, automatically respecting the `--color` flag and whether the stream is a terminal or not. I recommend reviewing the PR commit-by-commit. r? `@Mark-Simulacrum`
2023-03-21handle tests timing outPietro Albini-0/+4
2023-03-21rustdoc: Factor out some doc link resolution code into a separate functionVadim Petrochenkov-24/+27
2023-03-21rustdoc: Cleanup parent module tracking for doc linksVadim Petrochenkov-160/+82
Keep ids of the documented items themselves, not their parent modules. Parent modules can be retreived from those ids when necessary.
2023-03-21Rollup merge of #109124 - ferrocene:pa-compression-mode, r=Mark-Simulacrumnils-47/+121
Add `dist.compression-profile` option to control compression speed PR #108534 reduced the size of compressed archives, but (as expected) it also resulted in way longer compression times and memory usage during compression. It's desirable to keep status quo (smaller archives but more CI usage), but it should also be configurable so that downstream users don't have to waste that much time on CI. As a data point, this resulted in doubling the time of Ferrocene's dist jobs, and required us to increase the RAM allocation for one of such jobs. This PR adds a new `config.toml` setting, `dist.compression-profile`. The values can be: * `fast`: equivalent to the gzip and xz preset of "1" * `balanced`: equivalent to the gzip and xz preset of "6" (the CLI defaults as far as I'm aware) * `best`: equivalent to the gzip present of "9", and our custom xz profile The default has also been moved back to `balanced`, to try and avoid the compression time regression for downstream users. I don't feel too strongly on the default, and I'm open to changing it. Also, for the `best` profile the XZ settings do not match the "9" preset used by the CLI, and it might be confusing. Should we create a `custom-rustc-ci`/`ultra` profile for that? r? ``@Mark-Simulacrum``
2023-03-21Use hex literal for INDEX_MASKMartin Gammelsæter-1/+1
2023-03-21remove some trait solver helperslcnr-2/+4
they add more complexity then they are worth. It's confusing which of these helpers should be used in which context.
2023-03-21Add a layout argument to `enforce_validity`.Oli Scherer-1/+1
This is in preparation of checking the validity only of certain types.
2023-03-21change default to fast for everyone but the user profilePietro Albini-1/+5
2023-03-20doc: add generics improvements to rustdoc bookMichael Howell-5/+12
2023-03-20rustdoc: add support for type filters in arguments and genericsMichael Howell-55/+120
This makes sense, since the search index has the information in it, and it's more useful for function signature searches since a function signature search's item type is, by definition, some type of function (there's more than one, but not very many).
2023-03-21Auto merge of #108262 - ChrisDenton:libntdll, r=Mark-Simulacrumbors-69/+72
Distribute libntdll.a with windows-gnu toolchains This allows the OS loader to load essential functions (e.g. read/write file) at load time instead of lazily doing so at runtime. r? libs
2023-03-20Auto merge of #106610 - euclio:windows-rs, r=ChrisDentonbors-134/+198
migrate compiler, bootstrap and compiletest to windows-rs This PR migrates the compiler, bootstrap, and compiletest to use [windows-rs](https://github.com/microsoft/windows-rs) instead of winapi-rs. windows-rs is the bindings crate provided by Microsoft, and is actively maintained compared to winapi-rs. Not all ecosystem crates have migrated over yet, so there will be a period of time where both crates are used. windows-rs also provides some nice ergonomics over winapi-rs to convert return values to `Result`s (which found a case where we forgot to check the return value of `CreateFileW`).
2023-03-20Update browser-ui-test version to 0.14.5Guillaume Gomez-1/+1
2023-03-20Auto merge of #109384 - matthiaskrgr:rollup-hu348gs, r=matthiaskrgrbors-209/+274
Rollup of 8 pull requests Successful merges: - #109170 (Set `CMAKE_SYSTEM_NAME` for Linux targets) - #109266 (rustdoc: Correctly merge import's and its target's docs in one more case) - #109267 (Add tests for configure.py) - #109273 (Make `slice::is_sorted_by` implementation nicer) - #109277 (Fix generics_of for impl's RPITIT synthesized associated type) - #109307 (Ignore `Inlined` spans when computing caller location.) - #109364 (Only expect a GAT const param for `type_of` of GAT const arg) - #109365 (Update mdbook) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-03-20migrate compiler, bootstrap, and compiletest to windows-rsAndy Russell-134/+198
2023-03-20rustdoc: Optimize impl sorting during renderingVadim Petrochenkov-7/+20
2023-03-20Limited the number of parallel link jobs during LLVM build for mingw.Michael Woerister-0/+8
This is an attempt to fix the spurious build error tracked by https://github.com/rust-lang/rust/issues/108227.
2023-03-20Rollup merge of #109365 - ehuss:update-mdbook, r=Mark-SimulacrumMatthias Krüger-1/+1
Update mdbook This updates mdbook from 0.4.25 to 0.4.28. Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0428 The primary changes are some interaction fixes for Mobile Safari and removing custom scrollbars on webkit browsers, along with a few other fixes.
2023-03-20Rollup merge of #109267 - jyn514:test-configure, r=Mark-SimulacrumMatthias Krüger-202/+263
Add tests for configure.py I highly recommend reviewing this with whitespace disabled. Notably, verifying that we generate valid toml relies on python 3.11 so we can use `tomllib`, so this also switches`x86_64-gnu-llvm-14` (one of the PR builders) to use 3.11. While fixing that, I noticed that we stopped testing python2.7 support on PR CI in https://github.com/rust-lang/rust/pull/106085. `@fee1-dead` `@pietroalbini` please be more careful in the future, there is no CI for CI itself that verifies we are testing everything we should be. - Separate out functions so that each unit test doesn't create a file on disk - Add a few unit tests
2023-03-20Rollup merge of #109266 - petrochenkov:docice4, r=petrochenkovMatthias Krüger-6/+8
rustdoc: Correctly merge import's and its target's docs in one more case Fixes https://github.com/rust-lang/rust/issues/108334. Fixes https://github.com/rust-lang/rust/issues/108378. Fixes https://github.com/rust-lang/rust/issues/108658.
2023-03-20Rollup merge of #109170 - eggyal:xc-linux-cmake, r=Mark-SimulacrumMatthias Krüger-0/+2
Set `CMAKE_SYSTEM_NAME` for Linux targets When bootstrap compiles native dependencies like LLVM, it should set `CMAKE_SYSTEM_NAME` for the target system; otherwise cmake may not identify that it is cross-compiling. In particular, when building a Linux rustc on a macOS host, cmake was including `-isysroot /path/to/macOS.sdk` options that caused things to break. By setting `CMAKE_SYSTEM_NAME=Linux` when building for Linux targets, the macOS SDK is no longer passed as sysroot to the compiler. r? bootstrap
2023-03-20Auto merge of #109377 - lnicola:rust-analyzer-2023-03-20, r=lnicolabors-610/+2220
:arrow_up: rust-analyzer r? `@ghost`
2023-03-20:arrow_up: rust-analyzerLaurențiu Nicola-610/+2220
2023-03-20Rollup merge of #109375 - clubby789:unescape-deprecated-doc, r=jshaMatthias Krüger-1/+1
rustdoc: Fix improper escaping of deprecation reasons Fix #109374 r? `@jsha`
2023-03-20Rollup merge of #109351 - GuillaumeGomez:no-footnote-in-summary, r=notriddleMatthias Krüger-1/+13
rustdoc: Remove footnote references from doc summary Since it's one line, we don't have the footnote definition so it doesn't make sense to have the reference. Part of https://github.com/rust-lang/rust/issues/109024. r? `@notriddle`
2023-03-20Rollup merge of #109331 - notriddle:notriddle/search-bag-semantics, ↵Matthias Krüger-26/+70
r=GuillaumeGomez rustdoc: implement bag semantics for function parameter search This tweak to the function signature search engine makes things so that, if a type is repeated in the search query, it'll only match if the function actually includes it that many times.
2023-03-20Rollup merge of #109323 - joboet:ignore_ds_store_tidy, r=ozkanonurMatthias Krüger-19/+22
Ignore files in .gitignore in mir opt check This caused `./x test tidy` to fail for me when Finder (macOS) added `.DS_Store` files. They are ignored by git, so tidy should ignore them, too.
2023-03-20Rollup merge of #109269 - klensy:rdoc-s, r=notriddleMatthias Krüger-40/+59
rustdoc: cleanup some intermediate allocs First commit self contained, second one use `display_fn` for `extra_info_tags`
2023-03-20Rollup merge of #109259 - GuillaumeGomez:fix-missing-private-inlining, ↵Matthias Krüger-4/+4
r=notriddle rustdoc: Fix missing private inlining Fixes https://github.com/rust-lang/rust/issues/109258. If the item isn't inlined, it shouldn't have been added into `view_item_stack`. The problem here was that it was not removed, preventing sub items to be inlined if they have a re-export in "upper levels". cc `@epage` r? `@notriddle`
2023-03-20Fix improper escaping of deprecation reasonsclubby789-1/+1
2023-03-20Auto merge of #108148 - parthopdas:master, r=oli-obkbors-0/+20
Implementing "<test_binary> --list --format json" for use by IDE test explorers / runners Fixes #107307 PR 1 of 2 - wiring up just the new information + implement the command line changes i.e. --format json + tests upcoming: PR 2 of 2 - clean up "#[cfg(not(bootstrap))]" from PR 1 As per the discussions on - MCP: https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Implementing.20.22.3Ctest_binary.3E.20--list.20--form.E2.80.A6.20compiler-team.23592/near/328747548 - preRFC: https://internals.rust-lang.org/t/pre-rfc-implementing-test-binary-list-format-json-for-use-by-ide-test-explorers-runners/18308 - FYI on Discord: https://discord.com/channels/442252698964721669/459149169546887178/1075581549409484820
2023-03-19rustdoc: implement bag semantics for function parameter searchMichael Howell-26/+70
This tweak to the function signature search engine makes things so that, if a type is repeated in the search query, it'll only match if the function actually includes it that many times.
2023-03-19Update mdbookEric Huss-1/+1
2023-03-19Auto merge of #109332 - Mark-Simulacrum:runner-switch, r=pietroalbinibors-2/+2
Move us to the new large runners pool For now this keeps all the configuration identical (AFAICT) but we'll likely want to play with the specifics to move some of the slower builders to larger machines and the faster builders to smaller machines, likely reducing overall usage and improving CI times. I think we should leave that to later though, not worry about it just yet. r? `@pietroalbini`
2023-03-19Remove the `NodeId` of `ast::ExprKind::Async`Arpad Borsos-4/+4
2023-03-19Remove footnote references from doc summaryGuillaume Gomez-1/+13