- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
lint/ty: move fns to avoid abstraction violation #75099
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
      
      
    
                
     Merged
            
            
          
      
        
          +27
        
        
          −25
        
        
          
        
      
    
  
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
    
  
  
    
    | r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) | 
              
                    eddyb
  
              
              reviewed
              
                  
                    Aug 16, 2020 
                  
              
              
            
            
              
                    eddyb
  
              
              reviewed
              
                  
                    Aug 16, 2020 
                  
              
              
            
            
50d97c0    to
    6e550b9      
    Compare
  
    
              
                    eddyb
  
              
              reviewed
              
                  
                    Aug 18, 2020 
                  
              
              
            
            
6e550b9    to
    474f3d2      
    Compare
  
    
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
474f3d2    to
    6cc6900      
    Compare
  
    
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
6cc6900    to
    623851e      
    Compare
  
    
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
This commit moves `transparent_newtype_field` and `is_zst` to `LateContext` where they are used, rather than being on the `VariantDef` and `TyS` types. Signed-off-by: David Wood <david@davidtw.co>
623851e    to
    0f2bd56      
    Compare
  
    | @bors r+ | 
| 📌 Commit 0f2bd56 has been approved by  | 
    
  RalfJung 
      added a commit
        to RalfJung/rust
      that referenced
      this pull request
    
      Sep 19, 2020 
    
    
      
  
    
      
    
  
…ion, r=eddyb lint/ty: move fns to avoid abstraction violation This PR moves `transparent_newtype_field` and `is_zst` to `LateContext` where they are used, rather than being on the `VariantDef` and `TyS` types, hopefully addressing @eddyb's concern [from this comment](rust-lang#74340 (comment)).
| @bors rollup | 
    
  bors 
      added a commit
        to rust-lang-ci/rust
      that referenced
      this pull request
    
      Sep 19, 2020 
    
    
      
  
    
      
    
  
Rollup of 14 pull requests Successful merges: - rust-lang#73963 (deny(unsafe_op_in_unsafe_fn) in libstd/path.rs) - rust-lang#75099 (lint/ty: move fns to avoid abstraction violation) - rust-lang#75502 (Use implicit (not explicit) rules for promotability by default in `const fn`) - rust-lang#75580 (Add test for checking duplicated branch or-patterns) - rust-lang#76310 (Add `[T; N]: TryFrom<Vec<T>>` (insta-stable)) - rust-lang#76400 (Clean up vec benches bench_in_place style) - rust-lang#76434 (do not inline black_box when building for Miri) - rust-lang#76492 (Add associated constant `BITS` to all integer types) - rust-lang#76525 (Add as_str() to string::Drain.) - rust-lang#76636 (assert ScalarMaybeUninit size) - rust-lang#76749 (give *even better* suggestion when matching a const range) - rust-lang#76757 (don't convert types to the same type with try_into (clippy::useless_conversion)) - rust-lang#76796 (Give a better error message when x.py uses the wrong stage for CI) - rust-lang#76798 (Build fixes for RISC-V 32-bit Linux support) Failed merges: r? `@ghost`
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      Labels
      
    S-waiting-on-bors
  Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 
  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.
  
    
  
    
This PR moves
transparent_newtype_fieldandis_zsttoLateContextwhere they are used, rather than being on theVariantDefandTyStypes, hopefully addressing @eddyb's concern from this comment.