Next-generation trait solver has different compilation failure error output
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 22/100
Direzione di ricerca
The payload compares two rustc diagnostic outputs for the same Send/Sync failure in tests/compile_fail/diff_send.rs (git2-rs), involving src/diff.rs and src/repo.rs. The compiler code that builds these errors is not named, so the first step is to reproduce the difference by running the same file on stable and with the new solver. Done means the new-solver stderr reports the same notes as stable, which is a compiler-internals change and not a first-timer task.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
when using trybuild to check the stderr output for compilation failures, the new solver seems to report less - https://github.com/rust-lang/git2-rs/actions/runs/43620785786/job/132525764327 / rust-lang/git2-rs#1342
On stable
error[E0277]: `*mut libgit2_sys::git_diff` cannot be sent between threads safely
--> tests/compile_fail/diff_send.rs:27:17
|
27 | s.spawn(move || theirs.stats().unwrap().insertions());
| ----- -------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| | |
| | `*mut libgit2_sys::git_diff` cannot be sent between threads safely
| | within this `{closure@$DIR/tests/compile_fail/diff_send.rs:27:17: 27:24}`
| required by a bound introduced by this call
|
= help: within `{closure@$DIR/tests/compile_fail/diff_send.rs:27:17: 27:24}`, the trait `Send` is not implemented for `*mut libgit2_sys::git_diff`
note: required because it appears within the type `Diff<'_>`
--> src/diff.rs
|
| pub struct Diff<'repo> {
| ^^^^
note: required because `theirs` is used within this closure
--> tests/compile_fail/diff_send.rs:27:25
|
27 | s.spawn(move || theirs.stats().unwrap().insertions());
| ^^^^^^
note: required by a bound in `Scope::<'scope, 'env>::spawn`
--> $RUST/std/src/thread/scoped.rs
error[E0277]: `*mut libgit2_sys::git_repository` cannot be shared between threads safely
--> tests/compile_fail/diff_send.rs:27:17
|
27 | s.spawn(move || theirs.stats().unwrap().insertions());
| ----- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*mut libgit2_sys::git_repository` cannot be shared between threads safely
| |
| required by a bound introduced by this call
|
= help: within `git2::Repository`, the trait `Sync` is not implemented for `*mut libgit2_sys::git_repository`
note: required because it appears within the type `git2::Repository`
--> src/repo.rs
|
| pub struct Repository {
| ^^^^^^^^^^
= note: required for `&git2::Repository` to implement `Send`
note: required because it appears within the type `PhantomData<&git2::Repository>`
--> $RUST/core/src/marker.rs
note: required because it appears within the type `Diff<'_>`
--> src/diff.rs
|
| pub struct Diff<'repo> {
| ^^^^
note: required because `theirs` is used within this closure
--> tests/compile_fail/diff_send.rs:27:25
|
27 | s.spawn(move || theirs.stats().unwrap().insertions());
| ^^^^^^
note: required by a bound in `Scope::<'scope, 'env>::spawn`
--> $RUST/std/src/thread/scoped.rs
On nightly/with new solver
error[E0277]: `*mut libgit2_sys::git_diff` cannot be sent between threads safely
--> tests/compile_fail/diff_send.rs:27:17
|
27 | s.spawn(move || theirs.stats().unwrap().insertions());
| ----- -------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| | |
| | `*mut libgit2_sys::git_diff` cannot be sent between threads safely
| | within this `{closure@$DIR/tests/compile_fail/diff_send.rs:27:17: 27:24}`
| required by a bound introduced by this call
|
= help: within `{closure@$DIR/tests/compile_fail/diff_send.rs:27:17: 27:24}`, the trait `Send` is not implemented for `*mut libgit2_sys::git_diff`
note: required because it appears within the type `Diff<'_>`
--> src/diff.rs
|
| pub struct Diff<'repo> {
| ^^^^
note: required because `theirs` is used within this closure
--> tests/compile_fail/diff_send.rs:27:25
|
27 | s.spawn(move || theirs.stats().unwrap().insertions());
| ^^^^^^
note: required by a bound in `Scope::<'scope, 'env>::spawn`
--> $RUST/std/src/thread/scoped.rs
- Lingua principale
- Rust
- Stelle
- 122k
- Fork
- 16.7k
- Merge medio
- 2g 16h
- PR unite (30g)
- 515
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di rust-lang/rust
-
Remove unnecessary parentheses when suggesting to remove '&' from a patternForse già presa @BartSimpson001 l’ha presa 1 giorno fa. ApertaA-diagnostics D-invalid-suggestion T-compiler
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Windows `File::set_permissions` silently does nothing when clearing `readonly` leaves `FileAttributes == 0`Forse già presa @ChrisDenton l’ha presa 11 giorni fa. ApertaA-filesystem C-bug O-windows T-libs
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
A-run-make relnotes relnotes-needs-review relnotes-tracking-issue T-lang T-libs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
A-LLVM O-Arm O-UEFI O-x86_64 relnotes relnotes-needs-review relnotes-tracking-issue T-compiler
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
rust-lang/rust#165504 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
relnotes relnotes-tracking-issue T-libs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di rust-lang/rust
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
bytecodealliance/wrpc#1785 ·
I maintainer di solito rispondono entro 1 giorno
-
2 advisory ignore entries no longer match anything (`quick-xml` already patched in `Cargo.lock`)Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
longbridge/nsh#2758 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
antithesishq/bombadil#473 ·
I maintainer di solito rispondono entro 2 giorni
-
bench/api.sh exec test fails with curl exit 52, and --ignore-failure still records the timingsApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
libracoder/kiri#669 ·
I maintainer di solito rispondono entro 1 giorno