- 
                Notifications
    
You must be signed in to change notification settings  - Fork 13.9k
 
          private no-mangle lints: only suggest pub if it doesn't already exist
          #47479
        
          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
  
    private no-mangle lints: only suggest pub if it doesn't already exist
  
  #47479
              Conversation
56520b3    to
    1f2a1c2      
    Compare
  
    | 
           r=me once the test is fixed.  | 
    
The incompetent fool who added these suggestions in 38e5a96 apparently thought it was safe to assume that, because the offending function or static was unreachable, it would therefore have not have any existing visibility modifiers, making it safe for us to unconditionally suggest inserting `pub`. This isn't true. This resolves rust-lang#47383.
1f2a1c2    to
    661e033      
    Compare
  
    | 
           I don't think this is a correct fix.  | 
    
          
 I'm confused: as I understand, the lint is based on reachability (  | 
    
| 
           @bors r+ rollup  | 
    
| 
           📌 Commit 661e033 has been approved by   | 
    
| 
           Ah, I see, only the help note is disabled, then it's ok.  | 
    
…ested_double-pub, r=estebank private no-mangle lints: only suggest `pub` if it doesn't already exist Fixes rust-lang#47383 (function or static can be `pub` but unreachable because it's in a private module; adding another `pub` is nonsensical). r? @estebank
…ested_double-pub, r=estebank private no-mangle lints: only suggest `pub` if it doesn't already exist Fixes rust-lang#47383 (function or static can be `pub` but unreachable because it's in a private module; adding another `pub` is nonsensical). r? @estebank
Fixes #47383 (function or static can be
pubbut unreachable because it's in a private module; adding anotherpubis nonsensical).r? @estebank