Skip to content
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 5 pull requests #135486

Closed
wants to merge 20 commits into from

Conversation

GuillaumeGomez
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

GuillaumeGomez and others added 20 commits December 12, 2024 16:55
…=fmease

Enable "jump to def" feature on patterns

Part of rust-lang#89095.

Pattern (as in "patterns in pattern matching") were not handled by the feature, it's now added.

It all started when I realized that prelude values like `Some` or `Err` were not getting a link generated either (added support for it in the first commit).

r? `@fmease`
…-by-default, r=wesleywiser

Treat safe target_feature functions as unsafe by default [less invasive variant]

This unblocks
* rust-lang#134090

As I stated in rust-lang#134090 (comment) I think the previous impl was too easy to get wrong, as by default it treated safe target feature functions as safe and had to add additional checks for when they weren't. Now the logic is inverted. By default they are unsafe and you have to explicitly handle safe target feature functions.

This is the less (imo) invasive variant of rust-lang#134317, as it doesn't require changing the Safety enum, so it only affects FnDefs and nothing else, as it should.
…h-name, r=aDotInTheVoid

Made `Path::name` only have item name rather than full name

Closes rust-lang#134853

This PR makes `Path::name` to only have item name rather than full name, i.e. with the following code

```rust
pub mod foo {
    pub struct Bar;
}

pub fn get_bar() -> foo::Bar {
    foo::Bar
}
```
and running `./rustdoc ./demo.rs -wjson -Zunstable-options` gives:
```json
{
    "41": {
        "id": 41,
        "name": "get_bar",
        "inner": {
            "function": {
                "sig": {
                    "inputs": [],
                    "output": {
                        "resolved_path": {
                            "name": "Bar",
                            "id": 0,
                            "args": { "angle_bracketed": { "args": [], "constraints": [] }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
_Information which isn't useful here was trimmed_

r? aDotInTheVoid
…ble, r=lcnr

Leak check in `impossible_predicates` to avoid monomorphizing impossible instances

Fixes rust-lang#135462

r? lcnr
@rustbot rustbot added A-rustdoc-json Area: Rustdoc JSON backend A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Jan 14, 2025
@GuillaumeGomez
Copy link
Member Author

@bors r+ p=5 rollup=never

@bors
Copy link
Contributor

bors commented Jan 14, 2025

📌 Commit f2ec216 has been approved by GuillaumeGomez

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 14, 2025
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jan 14, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 14, 2025
…llaumeGomez

Rollup of 5 pull requests

Successful merges:

 - rust-lang#134216 (Enable "jump to def" feature on patterns)
 - rust-lang#134353 (Treat safe target_feature functions as unsafe by default [less invasive variant])
 - rust-lang#134880 (Made `Path::name` only have item name rather than full name)
 - rust-lang#135466 (Leak check in `impossible_predicates` to avoid monomorphizing impossible instances)
 - rust-lang#135476 (Remove remnant of asmjs)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors
Copy link
Contributor

bors commented Jan 14, 2025

⌛ Testing commit f2ec216 with merge 99f886e...

@rust-log-analyzer
Copy link
Collaborator

The job test-various failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- [ui] tests/ui/target-feature/wasm-safe.rs stdout ----

error: test compilation failed although it shouldn't!
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/target-feature/wasm-safe.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=wasm32-wasip1" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/target-feature/wasm-safe" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/wasm32-wasip1/native/rust-test-helpers"
--- stderr -------------------------------
error[E0053]: method `foo` has an incompatible type for trait
##[error]  --> /checkout/tests/ui/target-feature/wasm-safe.rs:29:5
   |
---
  --> /checkout/tests/ui/target-feature/wasm-safe.rs:14:5
   |
LL |     fn foo();
   |     ^^^^^^^^^
   = note: expected signature `fn()`
              found signature `#[target_features] fn()`
error[E0053]: method `bar` has an incompatible type for trait
##[error]  --> /checkout/tests/ui/target-feature/wasm-safe.rs:31:5
   |
LL |     fn bar(&self) {}
LL |     fn bar(&self) {}
   |     ^^^^^^^^^^^^^ expected safe fn, found unsafe fn
   |
note: type in trait
  --> /checkout/tests/ui/target-feature/wasm-safe.rs:15:5
   |
LL |     fn bar(&self);
   |     ^^^^^^^^^^^^^^
   = note: expected signature `fn(&B)`
              found signature `#[target_features] fn(&B)`
error[E0580]: `main` function has wrong type
##[error]  --> /checkout/tests/ui/target-feature/wasm-safe.rs:44:1
   |
LL | fn main() {}

@bors
Copy link
Contributor

bors commented Jan 14, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 14, 2025
@GuillaumeGomez GuillaumeGomez deleted the rollup-oblyjq9 branch January 14, 2025 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-json Area: Rustdoc JSON backend A-testsuite Area: The testsuite used to check the correctness of rustc rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants