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

Gauge usage of FnOnce::Output in the wild #127291

Closed

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Jul 3, 2024

I'm curious what crates are using FnOnce::Output directly. Let's run crater to see.

I downloaded all crates with get-all-crates --latest then used zgrep to grep for ::Output, which may or may not be any of the traits in std::ops, though it did majorly cut down on the crates we'll crater: https://gist.githubusercontent.com/compiler-errors/1ef63d6e086d9a5915fb510dafdfdd43/raw/86e3bac4235e667c4c2cdf2a21d52ca38567ab1a/gistfile1.txt

r? @ghost

@rustbot rustbot added 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-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jul 3, 2024
@compiler-errors
Copy link
Member Author

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 3, 2024
Gauge usage of `FnOnce::Output` in the wild

I'm curious what crates are using `FnOnce::Output` directly. Let's run crater to see.

I downloaded all crates with `get-all-crates --latest` then used `zgrep` to grep for `::Output`, which may or may not be any of the traits in `std::ops`, though it did majorly cut down on the crates we'll crater: https://gist.githubusercontent.com/compiler-errors/1ef63d6e086d9a5915fb510dafdfdd43/raw/86e3bac4235e667c4c2cdf2a21d52ca38567ab1a/gistfile1.txt

r? `@ghost`
@bors
Copy link
Contributor

bors commented Jul 3, 2024

⌛ Trying commit d9d6fbf with merge dd5bcc8...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Jul 3, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 3, 2024
@rust-log-analyzer

This comment has been minimized.

@compiler-errors
Copy link
Member Author

@bors try

@bors
Copy link
Contributor

bors commented Jul 4, 2024

⌛ Trying commit a7e10ca with merge 34c3b22...

bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 4, 2024
Gauge usage of `FnOnce::Output` in the wild

I'm curious what crates are using `FnOnce::Output` directly. Let's run crater to see.

I downloaded all crates with `get-all-crates --latest` then used `zgrep` to grep for `::Output`, which may or may not be any of the traits in `std::ops`, though it did majorly cut down on the crates we'll crater: https://gist.githubusercontent.com/compiler-errors/1ef63d6e086d9a5915fb510dafdfdd43/raw/86e3bac4235e667c4c2cdf2a21d52ca38567ab1a/gistfile1.txt

With relevance to tracking:

- rust-lang#62290

r? `@ghost`
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-tools failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling rustc_middle v0.0.0 (/checkout/compiler/rustc_middle)
error: unused import: `LOCAL_CRATE`
  --> compiler/rustc_middle/src/middle/stability.rs:15:59
   |
15 | use rustc_hir::def_id::{DefId, LocalDefId, LocalDefIdMap, LOCAL_CRATE};
   |
   = note: `-D unused-imports` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(unused_imports)]`

@rust-log-analyzer
Copy link
Collaborator

The job dist-x86_64-linux failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
file:.git/config remote.origin.url=https://github.com/rust-lang-ci/rust
file:.git/config remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
file:.git/config gc.auto=0
file:.git/config http.https://github.com/.extraheader=AUTHORIZATION: basic ***
file:.git/config branch.try.remote=origin
file:.git/config branch.try.merge=refs/heads/try
file:.git/config submodule.library/backtrace.url=https://github.com/rust-lang/backtrace-rs.git
file:.git/config submodule.library/stdarch.active=true
file:.git/config submodule.library/stdarch.url=https://github.com/rust-lang/stdarch.git
file:.git/config submodule.src/doc/book.active=true
---
[RUSTC-TIMING] wasmparser test:false 24.265
error: unused import: `LOCAL_CRATE`
  --> compiler/rustc_middle/src/middle/stability.rs:15:59
   |
15 | use rustc_hir::def_id::{DefId, LocalDefId, LocalDefIdMap, LOCAL_CRATE};
   |
   = note: `-D unused-imports` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(unused_imports)]`

---
Caused by:
    Command RUST_BACKTRACE=full python3 /checkout/x.py build --target x86_64-unknown-linux-gnu --host x86_64-unknown-linux-gnu --stage 2 library/std --rust-profile-generate /tmp/tmp-multistage/opt-artifacts/rustc-pgo --set llvm.thin-lto=false --set llvm.link-shared=true [at /checkout/obj] has failed with exit code Some(1)

Stack backtrace:
   0: <anyhow::Error>::msg::<alloc::string::String>
             at /rust/deps/anyhow-1.0.86/src/backtrace.rs:27:14
   1: <opt_dist::exec::CmdBuilder>::run
             at /rustc/34c3b22e5aece7b832201306c4ae3bfcfe6122f7/src/tools/opt-dist/src/exec.rs:78:17
   2: <opt_dist::exec::Bootstrap>::run
             at /rustc/34c3b22e5aece7b832201306c4ae3bfcfe6122f7/src/tools/opt-dist/src/exec.rs:179:9
             at /rustc/34c3b22e5aece7b832201306c4ae3bfcfe6122f7/src/tools/opt-dist/src/main.rs:225:13
             at /rustc/34c3b22e5aece7b832201306c4ae3bfcfe6122f7/src/tools/opt-dist/src/main.rs:225:13
   4: <opt_dist::timer::TimerSection>::section::<opt_dist::execute_pipeline::{closure#1}::{closure#0}, ()>
             at /rustc/34c3b22e5aece7b832201306c4ae3bfcfe6122f7/src/tools/opt-dist/src/timer.rs:111:22
             at /rustc/34c3b22e5aece7b832201306c4ae3bfcfe6122f7/src/tools/opt-dist/src/main.rs:214:9
             at /rustc/34c3b22e5aece7b832201306c4ae3bfcfe6122f7/src/tools/opt-dist/src/main.rs:214:9
   6: <opt_dist::timer::TimerSection>::section::<opt_dist::execute_pipeline::{closure#1}, opt_dist::training::RustcPGOProfile>
             at /rustc/34c3b22e5aece7b832201306c4ae3bfcfe6122f7/src/tools/opt-dist/src/timer.rs:111:22
             at /rustc/34c3b22e5aece7b832201306c4ae3bfcfe6122f7/src/tools/opt-dist/src/main.rs:211:29
   8: opt_dist::main
             at /rustc/34c3b22e5aece7b832201306c4ae3bfcfe6122f7/src/tools/opt-dist/src/main.rs:401:18
   9: <fn() -> core::result::Result<(), anyhow::Error> as core::ops::function::FnOnce<()>>::call_once
   9: <fn() -> core::result::Result<(), anyhow::Error> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/75ac3b6331873133c4f7a10f2252afd6f3906c6a/library/core/src/ops/function.rs:250:5
  10: std::sys_common::backtrace::__rust_begin_short_backtrace::<fn() -> core::result::Result<(), anyhow::Error>, core::result::Result<(), anyhow::Error>>
             at /rustc/75ac3b6331873133c4f7a10f2252afd6f3906c6a/library/std/src/sys_common/backtrace.rs:155:18
  11: std::rt::lang_start::<core::result::Result<(), anyhow::Error>>::{closure#0}
             at /rustc/75ac3b6331873133c4f7a10f2252afd6f3906c6a/library/std/src/rt.rs:159:18
  12: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
  13: std::panicking::try::do_call
             at /rustc/75ac3b6331873133c4f7a10f2252afd6f3906c6a/library/std/src/panicking.rs:559:40
  14: std::panicking::try
             at /rustc/75ac3b6331873133c4f7a10f2252afd6f3906c6a/library/std/src/panicking.rs:523:19

@bors
Copy link
Contributor

bors commented Jul 4, 2024

💔 Test failed - checks-actions

@compiler-errors
Copy link
Member Author

Actually I literally don't care if people are using FnOnce::Output in the wild lmao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants