FYI for new warn-by-default lint `mismatched_lifetime_syntaxes`
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
Direzione di ricerca
Non è specificato alcun file o test preciso. Inizia esaminando l’implementazione della generazione e i crate generati interessati, come stm32f4, quindi determina se sia appropriata una sintassi coerente per i lifetime o un attributo allow; il lavoro è completato quando i crate generati non producono più impatto sul tempo di build correlato agli avvisi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
(Meta: this issue is a forward of https://github.com/stm32-rs/stm32-rs/issues/1245.)
Hi svd2rust maintainers, we landed a new warn-by-default lint mismatched_lifetime_syntaxes on the nightly channel. The lint is intended to warn on cases where the same lifetime is referred to by different syntactical forms between function arguments and return types, which has been a long-standing source of confusion for users. See https://doc.rust-lang.org/nightly/rustc/lints/listing/warn-by-default.html#mismatched-lifetime-syntaxes.
For certain generated crates (e.g. stm32f4), it was reported that the performance of the lint might be a concern. We analyzed the performance regression, and found that the performance regression is dominated by the emission of a lot of warnings on the generated code.
This is expected to only impact build times when working on the generated crates, not when the crates are used as dependencies because in that case they will be built with --cap-lints=allow preventing warnings from being emitted.
To address the build time impact for when working on the generated crates:
- You may wish to
#[allow(mismatched_lifetime_syntaxes)]on the generated crates. Or, - You may wish to adjust the generation implementation to emit code that uses consistent lifetime syntaxes for function arguments and return values.
For your reference,
- See performance regression discussion thread.
- See feedback on the
mismatched_lifetime_syntaxesthread. - Or you can also open new issues on rust-lang/rust and tag the issue with
@rustbot label: +L-mismatched_lifetime_syntaxes.
(Please use the threads or new rust-lang/rust issues for feedback, as otherwise I may lose the notification.)
- Lingua principale
- Rust
- Stelle
- 865
- Fork
- 164
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
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-embedded/svd2rust
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
rust-embedded/svd2rust#966 · 7 commenti ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
rust-embedded/svd2rust#939 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
rust-embedded/svd2rust#938 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
rust-embedded/svd2rust#925 · 8 commenti ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
rust-embedded/svd2rust#902 · 18 commenti ·
Tutte le issue di rust-embedded/svd2rust
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
gitbutlerapp/gitbutler#16982 ·
I maintainer di solito rispondono entro 1 giorno
-
priority: high status: new topic: ga4gh-sdk type: docs type: maintenance workload: minutes
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
C-bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
rust-lang/rust-clippy#17976 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
aaif-goose/goose#13327 ·
I maintainer di solito rispondono entro 1 giorno
-
llm translation
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno