-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 7 pull requests #121549
Rollup of 7 pull requests #121549
Conversation
When given ```rust trait Original { fn f() -> impl Fn(); } trait Erased { fn f(&self) -> Box<dyn Fn()>; } impl<T: Original> Erased for T { fn f(&self) -> Box<dyn Fn()> { Box::new(<T as Original>::f()) } } ``` avoid suggestion to restrict the `Trait::{opaque}` type in a `where` clause: ``` error[E0310]: the associated type `<T as Original>::{opaque#0}` may not live long enough --> $DIR/missing-static-bound-from-impl.rs:11:9 | LL | Box::new(<T as Original>::f()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | the associated type `<T as Original>::{opaque#0}` must be valid for the static lifetime... | ...so that the type `impl Fn()` will meet its required lifetime bounds ``` CC rust-lang#119773.
It makes the link easier to use in cases in which the path of the page where it will be embedded is not known beforehand such as when we generate impls dynamically from `register_type_impls` method in `main.js` Earlier for local primitives we would generate a path that was relative to the current page depth passed in `cx.current` . e.g if the current page was `std::simd::prelude::Simd` the generated path would be `../../primitive.<prim>.html` After this change the path will first take you to the the wesite root and add the crate name. e.g. for `std::simd::prelude::Simd` the path now will be `../../../std/primitive.<prim>.html`
… large move Fixes: $ MAGIC_EXTRA_RUSTFLAGS=-Zmove-size-limit=4096 ./x test compiler/rustc_target error: moving 6216 bytes --> compiler/rustc_target/src/spec/base/apple/tests.rs:17:19 | 17 | for target in all_sim_targets { | ^^^^^^^^^^^^^^^ value moved from here | = note: The current maximum size is 4096, but it can be customized with the move_size_limit attribute: `#![move_size_limit = "..."]` = note: `-D large-assignments` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(large_assignments)]`
…ompiler-errors Account for RPITIT in E0310 explicit lifetime constraint suggestion When given ```rust trait Original { fn f() -> impl Fn(); } trait Erased { fn f(&self) -> Box<dyn Fn()>; } impl<T: Original> Erased for T { fn f(&self) -> Box<dyn Fn()> { Box::new(<T as Original>::f()) } } ``` emit do not emit an invalid suggestion restricting the `Trait::{opaque}` type in a `where` clause: ``` error[E0310]: the associated type `<T as Original>::{opaque#0}` may not live long enough --> $DIR/missing-static-bound-from-impl.rs:11:9 | LL | Box::new(<T as Original>::f()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | the associated type `<T as Original>::{opaque#0}` must be valid for the static lifetime... | ...so that the type `impl Fn()` will meet its required lifetime bounds ``` Partially address rust-lang#119773. Ideally we'd suggest modifying `Erased::f` instead. r? `@compiler-errors`
…docs, r=notriddle Rustdoc: include crate name in links for local primitives Fixes rust-lang#121106. This change makes links to primitives easier to use when the path of the page where they will be embedded is not known beforehand such as when we generate impls dynamically from the `register_type_impls` method in `main.js`, which is exactly what is happening in rust-lang#121106. An example to show the effect of this change: earlier, if the current page in `cx.current` inside `primitive_link_fragment()` was `std::simd::prelude::Simd` the generated path would be `../../primitive.<prim>.html`. Now it would be `../../../std/primitive.<prim>.html` instead. A side effect of the change is that local primitive links _everywhere_ will now contain the crate name, even outside of the dynamic situation mentioned above. I'm not sure if there are any major downsides of that other than making the links a bit longer. Ideally I wanted to restrict this behaviour change to only the dynamic cases. We could have achieved that by passing an additional bool arg to `primitive_link_fragment()`, but it felt awkward to do so. Any alternative suggestions are welcome.
delay cloning of iterator items
…k, r=oli-obk check that simd_insert/extract indices are in-bounds Fixes rust-lang#77477 r? `@oli-obk`
…iler-errors Ignore less tests in debug builds Since rust-lang#120594 and rust-lang#120863, nearly all UB-detecting debug assertions get compiled out of code that is monomorphized by a crate built with debug assertions disabled. Which means that if we default all our codegen tests to `-Cdebug-assertions=no`, most of them work just fine against a sysroot built with debug assertions. I also tried to explain a bit better why some tests need to be skipped, for those that still need to be skipped.
compiler/rustc_target/src/spec/base/apple/tests.rs: Avoid unnecessary large move Fixes: $ MAGIC_EXTRA_RUSTFLAGS=-Zmove-size-limit=4096 ./x test compiler/rustc_target error: moving 6216 bytes --> compiler/rustc_target/src/spec/base/apple/tests.rs:17:19 | 17 | for target in all_sim_targets { | ^^^^^^^^^^^^^^^ value moved from here | = note: The current maximum size is 4096, but it can be customized with the move_size_limit attribute: `#![move_size_limit = "..."]` = note: `-D large-assignments` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(large_assignments)]` Part of rust-lang#83518 The goal is to enable the lint by default at one point. There are many cases where it needs to be allowed. But here we don't need to allow it. We can simply fix it. I don't want to enable the lint in the file, because I don't want the "default size threshold for when a value is OK to move" to be duplicated in many places. We'll want the threshold in one central place once we enable it by default.
update stdarch r? `@Amanieu`
@bors r+ rollup=never p=7 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: 6bdb8a4a96 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (381d699): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 649.823s -> 649.328s (-0.08%) |
@rust-timer build fe935d1 |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (fe935d1): comparison URL. Overall result: ✅ improvements - no action neededInstruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 649.823s -> 650.833s (0.16%) |
Successful merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup