Allow enabling `-Zui-testing=yes`

Aperta
#315 0 commenti 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
50/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
rust
Ambito
testing

Direzione di ricerca

Inizia individuando la gestione dei flag di rustc da parte di trybuild e la rimozione di RUSTFLAGS, quindi traccia il modo in cui le opzioni del compilatore disponibili solo in nightly vengono passate ai test UI. Il lavoro è completato quando gli utenti possono abilitare -Zui-testing=yes tramite trybuild, lo stderr renderizzato usa segnaposto LL stabili e i test pertinenti passano.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

On nightly, the compiler flag -Zui-testing=yes changes the diagnostic emitter to not print line numbers, instead replacing all of them with LL. This helps in two ways: when changing a comment at the beginning of a test file, fewer things in the render change, making it easier to review, but more importantly the length of the line number is always the same, so when any of the width boundaries change (9 -> 10, 99 -> 100, etc.), the stderr output doesn't dramatically change for the entire diagnostic purely because the code was moved around. There's also a change recently introduced in nightly which changes the alignment of the numbers from left to right, which will be annoying for users of trybuild when they update and could be mitigated with this.

Sadly, we can't use the env flag RUSTFLAGS to pass the flag ourselves to rustc because trybuild removes it.

Lingua principale
Rust
Stelle
1k
Fork
87
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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di dtolnay/trybuild

Tutte le issue di dtolnay/trybuild

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.