- 
                Notifications
    
You must be signed in to change notification settings  - Fork 13.9k
 
Downgrade ambiguous_wide_pointer_comparisons suggestions to MaybeIncorrect #121338
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 2 commits into
  rust-lang:master
from
jieyouxu:ambiguous_wide_pointer_comparisons_suggestion
  
      
      
   
  Feb 21, 2024 
      
    
                
     Merged
            
            Downgrade ambiguous_wide_pointer_comparisons suggestions to MaybeIncorrect #121338
                    bors
  merged 2 commits into
  rust-lang:master
from
jieyouxu:ambiguous_wide_pointer_comparisons_suggestion
  
      
      
   
  Feb 21, 2024 
              
            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
    
  
  
    
    … a .fixed file exists
| 
           r? @Nadrieril rustbot has assigned @Nadrieril. Use r? to explicitly pick a reviewer  | 
    
              
                    Urgau
  
              
              reviewed
              
                  
                    Feb 20, 2024 
                  
              
              
            
            
        
          
                tests/ui/lint/ambiguous_wide_pointer_comparisons_suggestions.rs
              
                Outdated
          
            Show resolved
            Hide resolved
        
      49025fa    to
    0e58333      
    Compare
  
    
              
                    Nadrieril
  
              
              reviewed
              
                  
                    Feb 20, 2024 
                  
              
              
            
            
| 
           Looks good! One nit, r=me after that. @bors rollup=always  | 
    
…rrect It is possible to have more than one valid suggestion, which when applied together via rustfix causes the code to no longer compile. This is a temporary workaround; the real long term solution to these issues is to solve <rust-lang#53934>.
0e58333    to
    4d386d9      
    Compare
  
    | 
           Thank you for fixing this! @bors r+  | 
    
    
  bors 
      added a commit
        to rust-lang-ci/rust
      that referenced
      this pull request
    
      Feb 21, 2024 
    
    
      
  
    
      
    
  
Rollup of 7 pull requests Successful merges: - rust-lang#121208 (Convert `delayed_bug`s to `bug`s.) - rust-lang#121288 (make rustc_expand translatable) - rust-lang#121304 (Add docs for extension proc-macro) - rust-lang#121328 (Make --verbose imply -Z write-long-types-to-disk=no) - rust-lang#121338 (Downgrade ambiguous_wide_pointer_comparisons suggestions to MaybeIncorrect) - rust-lang#121361 (diagnostic items for legacy numeric modules) - rust-lang#121375 (Print proper relative path for descriptive name check) r? `@ghost` `@rustbot` modify labels: rollup
    
  rust-timer 
      added a commit
        to rust-lang-ci/rust
      that referenced
      this pull request
    
      Feb 21, 2024 
    
    
      
  
    
      
    
  
Rollup merge of rust-lang#121338 - jieyouxu:ambiguous_wide_pointer_comparisons_suggestion, r=Nadrieril Downgrade ambiguous_wide_pointer_comparisons suggestions to MaybeIncorrect In certain cases like rust-lang#121330, it is possible to have more than one suggestion from the `ambiguous_wide_pointer_comparisons` lint (which before this PR are `MachineApplicable`). When this gets passed to rustfix, rustfix makes *multiple* changes according to the suggestions which result in incorrect code. This is a temporary workaround. The real long term solution to problems like these is to address <rust-lang#53934>. This PR also includes a drive-by edit to the panic message emitted by compiletest because "ui" test suite now uses `//`@`` directives. Fixes rust-lang#121330.
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      Labels
      
    A-testsuite
  Area: The testsuite used to check the correctness of rustc 
  
    S-waiting-on-bors
  Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 
  
    T-bootstrap
  Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 
  
    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.
  
    
  
    
In certain cases like #121330, it is possible to have more than one suggestion from the
ambiguous_wide_pointer_comparisonslint (which before this PR areMachineApplicable). When this gets passed to rustfix, rustfix makes multiple changes according to the suggestions which result in incorrect code.This is a temporary workaround. The real long term solution to problems like these is to address #53934.
This PR also includes a drive-by edit to the panic message emitted by compiletest because "ui" test suite now uses
//@directives.Fixes #121330.