- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
          Consider outermost const-anon in non_local_def lint
          #131498
        
          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
            
            
          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
    
  
  
    
    
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
5560d46    to
    7836250      
    Compare
  
    | @rustbot label -S-blocked This is OK to go forward in a lang sense. Based on what we earlier decided and why we decided it, it's clear this is the right thing to do, and this is of course a two-way door. | 
              
                    lcnr
  
              
              reviewed
              
                  
                    Oct 10, 2024 
                  
              
              
            
            
              
                    lcnr
  
              
              reviewed
              
                  
                    Oct 10, 2024 
                  
              
              
            
            
              
                    lcnr
  
              
              reviewed
              
                  
                    Oct 10, 2024 
                  
              
              
            
            
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me after lang stuff 🤷
7836250    to
    7e05da8      
    Compare
  
    
    
  matthiaskrgr 
      added a commit
        to matthiaskrgr/rust
      that referenced
      this pull request
    
      Oct 11, 2024 
    
    
      
  
    
      
    
  
Consider outermost const-anon in `non_local_def` lint This PR change the logic for finding the parent of the `impl` definition in the `non_local_definitions` lint to consider multiple level of const-anon items, instead of only one currently. I also took the opportunity to cleanup the related code. cc `@traviscross` Fixes rust-lang#131474
    
  bors 
      added a commit
        to rust-lang-ci/rust
      that referenced
      this pull request
    
      Oct 11, 2024 
    
    
      
  
    
      
    
  
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#131464 (Update wasm-component-ld to 0.5.10) - rust-lang#131498 (Consider outermost const-anon in `non_local_def` lint) - rust-lang#131512 (Fixing rustDoc for LayoutError.) - rust-lang#131529 (rustdoc-json-types: fix typo in comment) - rust-lang#131531 (move dummy commit logic into x86_64-gnu-llvm-18) Failed merges: - rust-lang#131476 (coverage: Include the highest counter ID seen in `.cov-map` dumps) r? `@ghost` `@rustbot` modify labels: rollup
    
  bors 
      added a commit
        to rust-lang-ci/rust
      that referenced
      this pull request
    
      Oct 11, 2024 
    
    
      
  
    
      
    
  
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#131464 (Update wasm-component-ld to 0.5.10) - rust-lang#131476 (coverage: Include the highest counter ID seen in `.cov-map` dumps) - rust-lang#131497 (Add myself to bootstrap review rotation) - rust-lang#131498 (Consider outermost const-anon in `non_local_def` lint) - rust-lang#131512 (Fixing rustDoc for LayoutError.) - rust-lang#131529 (rustdoc-json-types: fix typo in comment) r? `@ghost` `@rustbot` modify labels: rollup
    
  rust-timer 
      added a commit
        to rust-lang-ci/rust
      that referenced
      this pull request
    
      Oct 11, 2024 
    
    
      
  
    
      
    
  
Rollup merge of rust-lang#131498 - Urgau:transparent-const-anons, r=lcnr Consider outermost const-anon in `non_local_def` lint This PR change the logic for finding the parent of the `impl` definition in the `non_local_definitions` lint to consider multiple level of const-anon items, instead of only one currently. I also took the opportunity to cleanup the related code. cc ``@traviscross`` Fixes rust-lang#131474
| @bors r- still in the queue | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      Labels
      
    L-non_local_definitions
  Lint: non_local_definitions 
  
    S-waiting-on-author
  Status: This is awaiting some action (such as code changes or more information) from the author. 
  
    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.
  
    
  
    
This PR change the logic for finding the parent of the
impldefinition in thenon_local_definitionslint to consider multiple level of const-anon items, instead of only one currently.I also took the opportunity to cleanup the related code.
cc @traviscross
Fixes #131474