-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Rollup of 4 pull requests #146695
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 4 pull requests #146695
Conversation
but a C-variadic method makes a trait dyn-incompatible. That is because methods from dyn traits, when cast to a function pointer, create a shim. That shim can't really forward the c-variadic arguments.
It is now required to provide a resource compiler on windows when compiling rust. This allows toolchain builders to explicitly provide a path to an alternative, such as llvm-rc, instead of the one that's provided by the Windows SDK.
…hods, r=workingjubilee c-variadic: allow c-variadic inherent and trait methods tracking issue: rust-lang#44930 Continuing the work of rust-lang#146342, allow inherent and trait methods to be c-variadic. However, a trait that contains a c-variadic method is no longer dyn-compatible. There is, presumably, some way to make c-variadic methods dyn-compatible. However currently, we don't have confidence that it'll work reliably: when methods from a `dyn` object are cast to a function pointer, a `ReifyShim` is created. If that shim is c-variadic, it would need to forward the C variable argument list. That does appear to work, because the `va_list` is not represented in MIR at all in this case, so the registers from the call site are untouched by the shim and can be read by the actual implementation. That just does not seem like a solid implementation. Also, intuitively, why would c-variadic function, primarily needed for FFI, need to be used with `dyn` objects at all? We can revisit this limitation if a need arises. r? `@workingjubilee`
…full_print, r=fmease Cleanup `FnDecl::inner_full_print` `inner_full_print` was pretty hard to follow IMHO. Hopefully this cleans it up a little bit. Also, it was checking whether `self.inputs` is empty twice, and then handling an unreachable match arm: https://github.com/yotamofek/rust/blob/f836ae4e663b6e8938096b8559e094d18361be55/src/librustdoc/html/format.rs#L1368C1-L1368C33 `last_input_index` could only be `None` if the fn has no parameters, in which case the loop body would never run. r? `@GuillaumeGomez` if you have the capacity :) BTW, can we rename `FnDecl::inputs` to `parameters` or something? And `output` to `return_ty`?
Allow windows resource compiler to be overridden In rust-lang#146018, it is now required to provide a resource compiler on windows when compiling rust. This allows toolchain builders to explicitly provide a path to an alternative, such as llvm-rc, instead of the one that's provided by the Windows SDK. cc `@lambdageek`
Clean up `ty::Dynamic` 1. As a follow-up to PR rust-lang#143036, remove `DynKind` entirely. 2. Inside HIR ty lowering, consolidate modules `dyn_compatibility` and `lint` into `dyn_trait` * `dyn_compatibility` wasn't about dyn compatibility itself, it's about lowering trait object types * `lint` contained dyn-Trait-specific diagnostics+lints only
@bors r+ rollup=never p=5 |
🔒 Merge conflict This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again. How do I rebase?Assuming
You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial. Please avoid the "Resolve conflicts" button on GitHub. It uses Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Error message
|
@bors r- |
☔ The latest upstream changes (presumably #146685) made this pull request unmergeable. Please resolve the merge conflicts. |
Successful merges:
FnDecl::inner_full_print
#146645 (CleanupFnDecl::inner_full_print
)ty::Dynamic
#146664 (Clean upty::Dynamic
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup