-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Rollup of 9 pull requests #136030
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 9 pull requests #136030
Conversation
Save linkcheck cache always
This will cause the CI build to be marked successful even if the build failed. Instead, use `if: '!cancelled()'` to always save the cache (except when the job is cancelled), even if the linkcheck failed. See https://stackoverflow.com/a/58859404 for more.
ci: Remove incorrect use of `continue-on-error`
This documents how to determine which settings are used in CI, since I see this question come up regularly. We currently don't have a great way to answer the question, but at least there is something.
* Rename `StringReader -> Lexer` * Remove deleted `Query` struct * Update some internal links
incorrect wording
Co-authored-by: Oli Scherer <[email protected]>
…sDenton Add `File already exists` error doc to `hard_link` function ## Description If the link path already exists, the error `AlreadyExists` is returned. This commit adds this error to the docs. I tested it with the current rust master version, this error was returned when there is already a link for the file is present. This was the error returned: ``` [harshit:../Desktop/rust_compiler_testing/hard_link (master|…5)] cargo +stage1 run Compiling hard_link v0.1.0 (/home/harshit/Desktop/rust_compiler_testing/hard_link) Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.12s Running `target/debug/hard_link` Err(Os { code: 17, kind: AlreadyExists, message: "File exists" }) ``` This is my first PR on rust, any suggestions on which issue I can take next are most welcome 😄 Fixes rust-lang#130117
Separate Builder methods from tcx As part of the autodiff upstreaming we noticed, that it would be nice to have various builder methods available without the TypeContext, which prevents the normal CodegenCx to be passed around between threads. We introduce a SimpleCx which just owns the llvm module and llvm context, to encapsulate them. The previous CodegenCx now implements deref and forwards access to the llvm module or context to it's SimpleCx sub-struct. This gives us a bit more flexibility, because now we can pass (or construct) the SimpleCx in locations where we don't have enough information to construct a CodegenCx, or are not able to pass it around due to the tcx lifetimes (and it not implementing send/sync). This also introduces an SBuilder, similar to the SimpleCx. The SBuilder uses a SimpleCx, whereas the existing Builder uses the larger CodegenCx. I will push updates to make implementations generic (where possible) to be implemented once and work for either of the two. I'll also clean up the leftover code. `call` is a bit tricky, because it requires a tcx, I probably need to duplicate it after all. Tracking: - rust-lang#124509
document order of items in iterator from drain fixes rust-lang#135710
…davidtwco Do not assume const params are printed after type params Fixes rust-lang#135737
Rustc dev guide subtree update r? ``@ghost``
Add memory layout documentation to generic NonZero<T> The documentation I've added is based on the same Layout documentation that appears on the other `NonZero*` types. For example see [the Layout docs on `NonZeroI8`](https://doc.rust-lang.org/std/num/type.NonZeroI8.html#layout-1).
Use short type string in E0308 secondary span label We were previously printing the full type on the "this expression has type" label. ``` error[E0308]: mismatched types --> $DIR/secondary-label-with-long-type.rs:8:9 | LL | let () = x; | ^^ - this expression has type `((..., ..., ..., ...), ..., ..., ...)` | | | expected `((..., ..., ..., ...), ..., ..., ...)`, found `()` | = note: expected tuple `((..., ..., ..., ...), ..., ..., ...)` found unit type `()` = note: the full type name has been written to '$TEST_BUILD_DIR/diagnostic-width/secondary-label-with-long-type/secondary-label-with-long-type.long-type-3987761834644699448.txt' = note: consider using `--verbose` to print the full type name to the console ``` Reported in a comment of rust-lang#135919.
…i-obk Don't drop types with no drop glue when building drops for tailcalls this is required as otherwise drops of `&mut` refs count as a usage of a 'two-phase temporary' causing an ICE. fixes rust-lang#128097 The underlying issue is that the current code generates drops for `&mut` which are later counted as a second use of a two-phase temporary: `bat t.rs -p` ```rust #![expect(incomplete_features)] #![feature(explicit_tail_calls)] fn f(x: &mut ()) { let _y = String::new(); become f(x); } fn main() {} ``` `rustc t.rs -Zdump_mir=f` ```text error: internal compiler error: compiler/rustc_borrowck/src/borrow_set.rs:298:17: found two uses for 2-phase borrow temporary _4: bb2[1] and bb3[0] --> t.rs:6:5 | 6 | become f(x); | ^^^^^^^^^^^ thread 'rustc' panicked at compiler/rustc_borrowck/src/borrow_set.rs:298:17: Box<dyn Any> stack backtrace: [REDACTED] error: aborting due to 1 previous error ``` `bat ./mir_dump/t.f.-------.renumber.0.mir -p -lrust` ```rust // MIR for `f` 0 renumber fn f(_1: &mut ()) -> () { debug x => _1; let mut _0: (); let mut _2: !; let _3: std::string::String; let mut _4: &mut (); scope 1 { debug _y => _3; } bb0: { StorageLive(_3); _3 = String::new() -> [return: bb1, unwind: bb4]; } bb1: { FakeRead(ForLet(None), _3); StorageLive(_4); _4 = &mut (*_1); drop(_3) -> [return: bb2, unwind: bb3]; } bb2: { StorageDead(_3); tailcall f(Spanned { node: move _4, span: t.rs:6:14: 6:15 (#0) }); } bb3 (cleanup): { drop(_4) -> [return: bb4, unwind terminate(cleanup)]; } bb4 (cleanup): { resume; } } ``` Note how `_4 is moved into the tail call in `bb2` and dropped in `bb3`. This PR adds a check that the locals we drop need dropping. r? `@oli-obk` (feel free to reassign, I'm not sure who would be a good reviewer, but thought you might have an idea) cc `@beepster4096,` since you wrote the original drop implementation.
…ile-indent, r=notriddle [rustdoc] Fix indent of trait items on mobile Before:  After:  Seems like we forgot them when we did rust-lang#131718. Can be tested [here](https://rustdoc.crud.net/imperio/fix-trait-items-mobile-indent/foo/trait.T.html). r? `@notriddle`
@bors r+ rollup=never p=5 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: 1e9b0177da In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (814ebca): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary -1.3%, secondary 3.4%)This 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.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 772.08s -> 774.222s (0.28%) |
Successful merges:
File already exists
error doc tohard_link
function #135415 (AddFile already exists
error doc tohard_link
function)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup