- 19 10月, 2022 20 次提交
-
-
由 bors 提交于
Rollup of 6 pull requests Successful merges: - #101889 (doc: rewrite doc for uint::{carrying_add,borrowing_sub}) - #102507 (More slice::partition_point examples) - #103164 (rustdoc: remove CSS ``@media` (min-width: 701px)`) - #103189 (Clean up code-color and headers-color rustdoc GUI tests) - #103203 (Retrieve LLVM version from llvm-filecheck binary if it is not set yet) - #103204 (Add some more autolabels) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 bors 提交于
Clean up rustdoc startup Startup is pretty hairy, in both rustdoc and rustc. The first commit here improves the rustdoc situation quite a bit. The remaining commits are smaller but also help. Best reviewed one commit at a time. r? `@jyn514`
-
由 Nicholas Nethercote 提交于
By moving `RenderOptions` out of `Option`, because the two structs' uses are almost entirely separate. The only complication is that `unstable_features` is needed in both structs, but it's a tiny `Copy` type so its duplication seems fine.
-
由 Nicholas Nethercote 提交于
It turns out `markdown::render` is more complex than it first appears, because it can invoke `doctest::make_test`, which requires session globals and a thread pool. So this commit changes it to use `interface::run_compiler`. Three of the four paths in `main_args` now use `interface::run_compiler`.
-
由 Nicholas Nethercote 提交于
-
由 Nicholas Nethercote 提交于
This avoids the need for a degenerate `Lrc::get_mut` call.
-
由 Nicholas Nethercote 提交于
It has a single call site.
-
由 Nicholas Nethercote 提交于
-
由 Nicholas Nethercote 提交于
It has a single call site, and removing it slightly improves the confusing tangle of nested closures present at startup.
-
由 Nicholas Nethercote 提交于
There is no longer any need for them to be separate.
-
由 Nicholas Nethercote 提交于
rustc's startup has several layers, including: - `interface::run_compiler` passes a closure, `f`, to `run_in_thread_pool_with_globals`, which creates a thread pool, sets up session globals, and passes `f` to `create_compiler_and_run`. - `create_compiler_and_run` creates a `Session`, a `Compiler`, sets the source map, and calls `f`. rustdoc is a bit different. - `main_args` calls `main_options` via `run_in_thread_pool_with_globals`, which (again) creates a thread pool (hardcoded to a single thread!) and sets up session globals. - `main_options` has four different paths. - The second one calls `interface::run_compiler`, which redoes the `run_in_thread_pool_with_globals`! This is bad. - The fourth one calls `interface::create_compiler_and_run`, which is reasonable. - The first and third ones don't do anything of note involving the above functions, except for some symbol interning which requires session globals. In other words, rustdoc calls into `rustc_interface` at three different levels. It's a bit confused, and feels like code where functionality has been added by different people at different times without fully understanding how the globally accessible stuff is set up. This commit tidies things up. It removes the `run_in_thread_pool_with_globals` call in `main_args`, and adjust the four paths in `main_options` as follows. - `markdown::test` calls `test::test_main`, which provides its own parallelism and so doesn't need a thread pool. It had one small use of symbol interning, which required session globals, but the commit removes this. - `doctest::run` already calls `interface::run_compiler`, so it doesn't need further adjustment. - `markdown::render` is simple but needs session globals for interning (which can't easily be removed), so it's now wrapped in `create_session_globals_then`. - The fourth path now uses `interface::run_compiler`, which is equivalent to the old `run_in_thread_pool_with_globals` + `create_compiler_and_run` pairing.
-
由 Matthias Krüger 提交于
Add some more autolabels
-
由 Matthias Krüger 提交于
Retrieve LLVM version from llvm-filecheck binary if it is not set yet In `rustc_codegen_gcc`, we run the `ASM` test suite. The problem is that, if a too recent version of the `llvm-filecheck` binary is provided, an extra argument needs to be passed and the to detect this version, it currently only expects a `--llvm-version` argument. With this, the version can be determined directly from the `llvm-filecheck` binary. r? ``@Amanieu``
-
由 Matthias Krüger 提交于
Clean up code-color and headers-color rustdoc GUI tests r? ``@notriddle``
-
由 Matthias Krüger 提交于
rustdoc: remove CSS `@media (min-width: 701px)` The two rules within it can and should be done without the separate media query: * There ain't no rule saying a viewport can't be `700.5px` wide, since hardware pixels can be finer than CSS pixels. <details><summary>Screenshot</summary> ![image](https://user-images.githubusercontent.com/1593513/196283804-e946fbe3-d914-4819-ba2d-b4a6a07f190a.png) </details> * The rule for the first example-wrap child should probably apply on mobile. <details><summary>Screenshots</summary> ## Before ![rustdoc-before](https://user-images.githubusercontent.com/1593513/196282813-88b861c7-7b05-4de5-a421-914396f86a04.png) ## After ![rustdoc-after](https://user-images.githubusercontent.com/1593513/196282842-e57760c2-72d5-4dad-94f5-1d7175043326.png) </details> * The rule for the source sidebar is overriden by the mobile rule setting `max-width: 100vw`, so it can be merged with the rest of the styles.
-
由 Matthias Krüger 提交于
More slice::partition_point examples After seeing the discussion of `binary_search` vs `partition_point` in #101999, I thought some more example code could be helpful.
-
由 Matthias Krüger 提交于
doc: rewrite doc for uint::{carrying_add,borrowing_sub} Reword the documentation for bigint helper methods `uint::{carrying_add,borrowing_sub}` (#85532). The examples were also rewritten to demonstrate how the methods can be used in bignum arithmetic. No loops are used in the examples, but the variable names were chosen to include indices so that it is clear how this can be used in a loop if required. Also, previously `carrying_add` had an example to say that if the input carry is false, the method is equivalent to `overflowing_add`. While the note was kept, the example was removed and an extra note was added to make sure this equivalence is not assumed for signed integers as well.
-
由 bors 提交于
The illumos linker does not support --strip-debug When building and testing rust 1.64.0 on illumos, we saw a large number of failing tests associated with: ``` = note: ld: fatal: unrecognized option '--strip-debug' ld: fatal: use the -z help option for usage information collect2: error: ld returned 1 exit status ``` The illumos linker does not support the `--strip-debug` option (although it does support `--strip-all`).
-
由 Guillaume Gomez 提交于
-
由 Joshua Nelson 提交于
-
- 18 10月, 2022 20 次提交
-
-
由 bors 提交于
Rollup of 6 pull requests Successful merges: - #103023 (Adding `fuchsia-ignore` and `needs-unwind` to compiler test cases) - #103142 (Make diagnostic for unsatisfied `Termination` bounds more precise) - #103154 (Fix typo in `ReverseSearcher` docs) - #103159 (Remove the redundant `Some(try_opt!(..))` in `checked_pow`) - #103163 (Remove all uses of array_assume_init) - #103168 (Stabilize asm_sym) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Guillaume Gomez 提交于
-
由 Yuki Okushi 提交于
Stabilize asm_sym Tracking issue #93333 Reference PR: https://github.com/rust-lang/reference/pull/1270
-
由 Yuki Okushi 提交于
Remove all uses of array_assume_init See https://github.com/rust-lang/rust/pull/103134#discussion_r997462733 r? `@scottmcm`
-
由 Yuki Okushi 提交于
Remove the redundant `Some(try_opt!(..))` in `checked_pow` The final return value doesn't need to be tried at all -- we can just return the checked option directly. The optimizer can probably figure this out anyway, but there's no need to make it work here.
-
由 Yuki Okushi 提交于
Fix typo in `ReverseSearcher` docs
-
由 Yuki Okushi 提交于
Make diagnostic for unsatisfied `Termination` bounds more precise Don't blindly emit a diagnostic claiming that “*`main` has an invalid return type*” if we encounter a type that should but doesn't implement `std::process::Termination` and isn't actually the return type of the program entry `main`. Fixes #103052. ``@rustbot`` label A-diagnostics T-compiler T-libs r? diagnostics
-
由 Yuki Okushi 提交于
Adding `fuchsia-ignore` and `needs-unwind` to compiler test cases Final tests covering missing privileges r? ``@tmandry`` cc. ``@djkoloski``
-
由 bors 提交于
Support DirEntry metadata calls in miri This should work as it uses lstat64 which is supported here: ~https://github.com/rust-lang/miri/blob/d9ad25ee4bbd9364c498959cdc82b5fa6c41e63c/src/shims/unix/macos/foreign_items.rs#L42~ just noticed that's macos, linux would be using statx: https://github.com/rust-lang/miri/blob/86f0e63b21721fe2c14608644f467b9cb21945eb/src/shims/unix/linux/foreign_items.rs#L112 The failing syscall is `dirfd`, so maybe that should actually be added to the shims?
-
由 Laurențiu Nicola 提交于
-
由 bors 提交于
Remove `RunCompiler::emitter`. It's no longer used. r? `@bjorn3`
-
由 Michael Howell 提交于
Since it's possible to have a 700.5px viewport width, the JS needs to not switch to mobile mode in such a setup.
-
由 Michael Howell 提交于
The two rules within it can and should be done without the separate media query: * There ain't no rule saying a viewport can't be `700.5px` wide, since hardware pixels can be finer than CSS pixels. * The rule for the first example-wrap child should probably apply on mobile. * The rule for the source sidebar is overriden by the mobile rule setting `max-width: 100vw`, so it can be merged with the rest of the styles.
-
由 bors 提交于
Remove "execute" bit from lock file permissions Previously, flock would set the "execute" bit on Rust lock files. That makes no sense. This patch clears the "execute" bit on Rust lock files. See issue #102531.
-
由 bors 提交于
Rollup of 4 pull requests Successful merges: - #103152 (Use named arguments to make GUI test more clear) - #103160 (rustdoc: factor JS mobile scroll lock into its own function) - #103161 (rustdoc: remove redundant CSS on `#copy-path`) - #103162 (rustdoc: remove redundant CSS `#crate-search { border-radius }`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Nicholas Nethercote 提交于
It's no longer used.
-
由 Amanieu d'Antras 提交于
-
由 Matthias Krüger 提交于
rustdoc: remove redundant CSS `#crate-search { border-radius }` This is the same border-radius that's always set on that ID: https://github.com/rust-lang/rust/blob/a9d1cafa878ecc04a4aa7aaa7df0414a29a2bd0b/src/librustdoc/html/static/css/rustdoc.css#L825-L836
-
由 Matthias Krüger 提交于
rustdoc: remove redundant CSS on `#copy-path` The border and background were removed in 5d004c1e, but not all the CSS was.
-