rust icon indicating copy to clipboard operation
rust copied to clipboard

Diagnostic renaming 3

Open nnethercote opened this issue 11 months ago • 8 comments

A sequel to https://github.com/rust-lang/rust/pull/121780.

r? @davidtwco

nnethercote avatar Mar 07 '24 09:03 nnethercote

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

Some changes occurred in exhaustiveness checking

cc @Nadrieril

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

Some changes occurred in need_type_info.rs

cc @lcnr

rustc_error_messages was changed

cc @davidtwco, @compiler-errors, @TaKO8Ki

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo, @GuillaumeGomez

rustc_macros::diagnostics was changed

cc @davidtwco, @compiler-errors, @TaKO8Ki

rustbot avatar Mar 07 '24 09:03 rustbot

New code is up, with some sizeable changes so I won't just r+ it myself.

Now derive(Diagnostic)/derive(Subdiagnostic)/derive(LintDiagnostic) are unchanged, but the corresponding trait names are changed to match the derive attributes:

  • trait IntoDiagnostic -> trait Diagnostic
  • trait AddToDiagnostic -> trait Subdiagnostic
  • trait DecorateLint -> trait LintDiagnostic

This also removes the need to rename various types, e.g. DiagnosticDeriveKind shouldn't be renamed DiagDeriveKind given that the trait/derive name is Diagnostic.

Overall this makes the change quite a bit smaller, which is nice.

nnethercote avatar Mar 08 '24 02:03 nnethercote

@bors r+

davidtwco avatar Mar 08 '24 09:03 davidtwco

:pushpin: Commit b91031ae1939641e2c8efd5dd35510d64e875910 has been approved by davidtwco

It is now in the queue for this repository.

bors avatar Mar 08 '24 09:03 bors

:umbrella: The latest upstream changes (presumably #122182) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Mar 08 '24 12:03 bors

I rebased.

@bors r+ p=1

Because this is conflict-prone.

nnethercote avatar Mar 10 '24 23:03 nnethercote

:pushpin: Commit 43c06335cf2d1cc6b12fcfa5b8795d9becc52e8c has been approved by nnethercote

It is now in the queue for this repository.

bors avatar Mar 10 '24 23:03 bors

:hourglass: Testing commit 43c06335cf2d1cc6b12fcfa5b8795d9becc52e8c with merge cd81f5b27ee00b49d413db50b5e6af871cebcf23...

bors avatar Mar 11 '24 00:03 bors

:sunny: Test successful - checks-actions Approved by: nnethercote Pushing cd81f5b27ee00b49d413db50b5e6af871cebcf23 to master...

bors avatar Mar 11 '24 02:03 bors

Finished benchmarking commit (cd81f5b27ee00b49d413db50b5e6af871cebcf23): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.6% [-2.8%, -2.2%] 3
Improvements ✅
(secondary)
-2.3% [-3.2%, -1.5%] 10
All ❌✅ (primary) -2.6% [-2.8%, -2.2%] 3

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 646.276s -> 648.469s (0.34%) Artifact size: 309.98 MiB -> 309.94 MiB (-0.01%)

rust-timer avatar Mar 11 '24 04:03 rust-timer