- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
macros: use typed identifiers in diag and subdiag derive #98428
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
          
     Merged
      
      
            bors
  merged 3 commits into
  rust-lang:master
from
davidtwco:translation-derive-typed-identifiers
  
      
      
   
  Jun 26, 2022 
      
    
                
     Merged
            
            macros: use typed identifiers in diag and subdiag derive #98428
                    bors
  merged 3 commits into
  rust-lang:master
from
davidtwco:translation-derive-typed-identifiers
  
      
      
   
  Jun 26, 2022 
              
            Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    7512081    to
    5a726aa      
    Compare
  
    | @bors r+ | 
| 📌 Commit 5a726aa5f3b035d404baa2aeabeb8a9447bf1387 has been approved by  | 
| 🌲 The tree is currently closed for pull requests below priority 1000. This pull request will be tested once the tree is reopened. | 
Using typed identifiers instead of strings with the Fluent identifier enables the diagnostic derive to benefit from the compile-time validation that comes with typed identifiers - use of a non-existent Fluent identifier will not compile. Signed-off-by: David Wood <[email protected]>
As in the diagnostic derive, using typed identifiers in the subdiagnostic derive improves the diagnostics of using the subdiagnostic derive as Fluent messages will be confirmed to exist at compile-time. Signed-off-by: David Wood <[email protected]>
Now that typed identifiers are used in both derives, constructors for the `DiagnosticMessage` and `SubdiagnosticMessage` types are not required. Signed-off-by: David Wood <[email protected]>
5a726aa    to
    dc90d1d      
    Compare
  
    | Rebased after #98353 as it added two new uses of the macro that this PR changes. | 
| @bors r=oli-obk | 
| 📌 Commit dc90d1d has been approved by  | 
    
  Dylan-DPC 
      added a commit
        to Dylan-DPC/rust
      that referenced
      this pull request
    
      Jun 26, 2022 
    
    
      
  
    
      
    
  
…identifiers, r=oli-obk macros: use typed identifiers in diag and subdiag derive Using typed identifiers instead of strings with the Fluent identifiers in the diagnostic and subdiagnostic derives - this enables the diagnostic derive to benefit from the compile-time validation that comes with typed identifiers, namely that use of a non-existent Fluent identifier will not compile. r? `@oli-obk`
    
  Dylan-DPC 
      added a commit
        to Dylan-DPC/rust
      that referenced
      this pull request
    
      Jun 26, 2022 
    
    
      
  
    
      
    
  
…identifiers, r=oli-obk macros: use typed identifiers in diag and subdiag derive Using typed identifiers instead of strings with the Fluent identifiers in the diagnostic and subdiagnostic derives - this enables the diagnostic derive to benefit from the compile-time validation that comes with typed identifiers, namely that use of a non-existent Fluent identifier will not compile. r? ``@oli-obk``
    
  matthiaskrgr 
      added a commit
        to matthiaskrgr/rust
      that referenced
      this pull request
    
      Jun 26, 2022 
    
    
      
  
    
      
    
  
…identifiers, r=oli-obk macros: use typed identifiers in diag and subdiag derive Using typed identifiers instead of strings with the Fluent identifiers in the diagnostic and subdiagnostic derives - this enables the diagnostic derive to benefit from the compile-time validation that comes with typed identifiers, namely that use of a non-existent Fluent identifier will not compile. r? ```@oli-obk```
    
  matthiaskrgr 
      added a commit
        to matthiaskrgr/rust
      that referenced
      this pull request
    
      Jun 26, 2022 
    
    
      
  
    
      
    
  
…identifiers, r=oli-obk macros: use typed identifiers in diag and subdiag derive Using typed identifiers instead of strings with the Fluent identifiers in the diagnostic and subdiagnostic derives - this enables the diagnostic derive to benefit from the compile-time validation that comes with typed identifiers, namely that use of a non-existent Fluent identifier will not compile. r? ````@oli-obk````
    
  bors 
      added a commit
        to rust-lang-ci/rust
      that referenced
      this pull request
    
      Jun 26, 2022 
    
    
      
  
    
      
    
  
…askrgr Rollup of 11 pull requests Successful merges: - rust-lang#97140 (std: use an event-flag-based thread parker on SOLID) - rust-lang#97295 ([rustc_parse] Forbid `let`s in certain places) - rust-lang#97743 (make const_err show up in future breakage reports) - rust-lang#97908 (Stabilize NonZero* checked operations constness.) - rust-lang#98297 (Transform help popup into a pocket menu) - rust-lang#98428 (macros: use typed identifiers in diag and subdiag derive) - rust-lang#98528 (Respect --color when building rustbuild itself) - rust-lang#98535 (Add regression test for generic const in rustdoc) - rust-lang#98538 (Add a ui test for issue rust-lang#91883) - rust-lang#98540 (Add regression test for rust-lang#87558) - rust-lang#98541 (Update `std::alloc::System` doc example code style) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      Labels
      
    A-translation
  Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 
  
    S-waiting-on-bors
  Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 
  
    T-compiler
  Relevant to the compiler team, which will review and decide on the PR/issue. 
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Using typed identifiers instead of strings with the Fluent identifiers in the diagnostic and subdiagnostic derives - this enables the diagnostic derive to benefit from the compile-time validation that comes with typed identifiers, namely that use of a non-existent Fluent identifier will not compile.
r? @oli-obk