-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 #125931
Rollup of 9 pull requests #125931
Conversation
…g you see on the page.
This reverts commit eae5031.
This reverts commit ddc5f9b.
Signed-off-by: Andrew Wock <[email protected]>
Show files produced by `--emit foo` in json artifact notifications Right now it is possible to ask `rustc` to save some intermediate representation into one or more files with `--emit=foo`, but figuring out what exactly was produced is difficult. This pull request adds information about `llvm_ir` and `asm` intermediate files into notifications produced by `--json=artifacts`. Related discussion: https://internals.rust-lang.org/t/easier-access-to-files-generated-by-emit-foo/20477 Motivation - `cargo-show-asm` parses those intermediate files and presents them in a user friendly way, but right now I have to apply some dirty hacks. Hacks make behavior confusing: hintron/computer-enhance#35 This pull request introduces a new behavior: now `rustc` will emit a new artifact notification for every artifact type user asked to `--emit`, for example for `--emit asm` those will include all the `.s` files. Most users won't notice this behavior, to be affected by it all of the following must hold: - user must use `rustc` binary directly (when `cargo` invokes `rustc` - it consumes artifact notifications and doesn't emit anything) - user must specify both `--emit xxx` and `--json artifacts` - user must refuse to handle unknown artifact types - user must disable incremental compilation (or deal with it better than cargo does, or use a workaround like `save-temps`) in order not to hit rust-lang#88829 / rust-lang#89149
…, r=ehuss Add tracking issue and unstable book page for `"vectorcall"` ABI Originally added in 2015 by rust-lang#30567, the Windows `"vectorcall"` ABI didn't have a tracking issue until now. Tracking issue: rust-lang#124485
…li-obk Make `WHERE_CLAUSES_OBJECT_SAFETY` a regular object safety violation #### The issue In rust-lang#50781, we have known about unsound `where` clauses in function arguments: ```rust trait Impossible {} trait Foo { fn impossible(&self) where Self: Impossible; } impl Foo for &() { fn impossible(&self) where Self: Impossible, {} } // `where` clause satisfied for the object, meaning that the function now *looks* callable. impl Impossible for dyn Foo {} fn main() { let x: &dyn Foo = &&(); x.impossible(); } ``` ... which currently segfaults at runtime because we try to call a method in the vtable that doesn't exist. :( #### What did u change This PR removes the `WHERE_CLAUSES_OBJECT_SAFETY` lint and instead makes it a regular object safety violation. I choose to make this into a hard error immediately rather than a `deny` because of the time that has passed since this lint was authored, and the single (1) regression (see below). That means that it's OK to mention `where Self: Trait` where clauses in your trait, but making such a trait into a `dyn Trait` object will report an object safety violation just like `where Self: Sized`, etc. ```rust trait Impossible {} trait Foo { fn impossible(&self) where Self: Impossible; // <~ This definition is valid, just not object-safe. } impl Foo for &() { fn impossible(&self) where Self: Impossible, {} } fn main() { let x: &dyn Foo = &&(); // <~ THIS is where we emit an error. } ``` #### Regressions From a recent crater run, there's only one crate that relies on this behavior: rust-lang#124305 (comment). The crate looks unmaintained and there seems to be no dependents. #### Further We may later choose to relax this (e.g. when the where clause is implied by the supertraits of the trait or something), but this is not something I propose to do in this FCP. For example, given: ``` trait Tr { fn f(&self) where Self: Blanket; } impl<T: ?Sized> Blanket for T {} ``` Proving that some placeholder `S` implements `S: Blanket` would be sufficient to prove that the same (blanket) impl applies for both `Concerete: Blanket` and `dyn Trait: Blanket`. Repeating here that I don't think we need to implement this behavior right now. ---- r? lcnr
…huss ARM Target Docs Update Updates the ARM target docs, drawing more attention to the `arm-none-eabi` target group by placing all targets *within* that group as a sub-list in the Table of Contents. Also updates the `armv4t-none-eabi` page (maintainer signoff: I'm that target's maintainer) to clarify that the page covers the arm version and the thumb version of the target, but that the target group page has the full info because there's nothing really specific to say for those targets.
…ee1-dead Fix ICE caused by ignoring EffectVars in type inference Fixes rust-lang#119830 r? `@matthiaskrgr`
Handle all GVN binops in a single place. <!-- If this PR is related to an unstable feature or an otherwise tracked effort, please link to the relevant tracking issue here. If you don't know of a related tracking issue or there are none, feel free to ignore this. This PR will get automatically assigned to a reviewer. In case you would like a specific user to review your work, you can assign it to them by using r? <reviewer name> --> Addresses https://github.com/rust-lang/rust/pull/125359/files#r1608185319 r? ``@oli-obk``
…ket-impls, r=GuillaumeGomez rustdoc: add a regression test for a former blanket impl synthesis ICE Fixes rust-lang#119792 (also passes in rust-lang#125907 in case you were wondering). r? rustdoc
…r-errors Revert: create const block bodies in typeck via query feeding as per the discussion in rust-lang#125806 (comment) It was a mistake to try to shoehorn const blocks and some specific anon consts into the same box and feed them during typeck. It turned out not simplifying anything (my hope was that we could feed `type_of` to start avoiding the huge HIR matcher, but that didn't work out), but instead making a few things more fragile. reverts the const-block-specific parts of rust-lang#124650 `@bors` rollup=never had a small perf impact previously fixes rust-lang#125846 r? `@compiler-errors`
Remove stray "this"
@bors r+ rollup=never p=9 |
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#122597 (Show files produced by `--emit foo` in json artifact notifications) - rust-lang#124486 (Add tracking issue and unstable book page for `"vectorcall"` ABI) - rust-lang#125380 (Make `WHERE_CLAUSES_OBJECT_SAFETY` a regular object safety violation) - rust-lang#125690 (ARM Target Docs Update) - rust-lang#125865 (Fix ICE caused by ignoring EffectVars in type inference) - rust-lang#125893 (Handle all GVN binops in a single place.) - rust-lang#125909 (rustdoc: add a regression test for a former blanket impl synthesis ICE) - rust-lang#125918 (Revert: create const block bodies in typeck via query feeding) - rust-lang#125919 (Remove stray "this") r? `@ghost` `@rustbot` modify labels: rollup
A job failed! Check out the build log: (web) (plain) Click to see the possible cause of the failure (guessed by this bot)
|
@bors retry |
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#122597 (Show files produced by `--emit foo` in json artifact notifications) - rust-lang#124486 (Add tracking issue and unstable book page for `"vectorcall"` ABI) - rust-lang#125380 (Make `WHERE_CLAUSES_OBJECT_SAFETY` a regular object safety violation) - rust-lang#125690 (ARM Target Docs Update) - rust-lang#125865 (Fix ICE caused by ignoring EffectVars in type inference) - rust-lang#125893 (Handle all GVN binops in a single place.) - rust-lang#125909 (rustdoc: add a regression test for a former blanket impl synthesis ICE) - rust-lang#125918 (Revert: create const block bodies in typeck via query feeding) - rust-lang#125919 (Remove stray "this") r? `@ghost` `@rustbot` modify labels: rollup
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
@matthiaskrgr what does this codegen test have to do with WHERE_CLAUSES_OBJECT_SAFETY? |
I saw that the failing test was from CFI and you also changed CFI code in your pr 🤔 |
Successful merges:
--emit foo
in json artifact notifications #122597 (Show files produced by--emit foo
in json artifact notifications)"vectorcall"
ABI #124486 (Add tracking issue and unstable book page for"vectorcall"
ABI)WHERE_CLAUSES_OBJECT_SAFETY
a regular object safety violation #125380 (MakeWHERE_CLAUSES_OBJECT_SAFETY
a regular object safety violation)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup