- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
          Remove Ident::empty
          #140252
        
          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
  
    Remove Ident::empty
  
  #140252
              
            Conversation
ccb01ef    to
    3e46e7b      
    Compare
  
    | Helps with #137978. | 
3e46e7b    to
    889e4c6      
    Compare
  
    | fmease is on vacation. Please choose another assignee. | 
| Some changes occurred in compiler/rustc_attr_parsing | 
| Oh, the first commit here is from #140095 and doesn't need to be reviewed; this PR shouldn't be merged until that one has been. | 
| r=me when the other PR landed @bors reviewed | 
889e4c6    to
    e7efeff      
    Compare
  
    | ☔ The latest upstream changes (presumably #140388) made this pull request unmergeable. Please resolve the merge conflicts. | 
e7efeff    to
    40952d7      
    Compare
  
    | ☔ The latest upstream changes (presumably #140818) made this pull request unmergeable. Please resolve the merge conflicts. | 
All uses have been removed. And it's nonsensical: an identifier by definition has at least one char. The commits adds an is-non-empty assertion to `Ident::new` to enforce this, and converts some `Ident` constructions to use `Ident::new`. Adding the assertion requires making `Ident::new` and `Ident::with_dummy_span` non-const, which is no great loss. The commit amends a couple of places that do path splitting to ensure no empty identifiers are created.
40952d7    to
    0984db5      
    Compare
  
    | ☀️ Test successful - checks-actions | 
| What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing c8b7f32 (parent) -> a7b1b24 (this PR) Test differencesNo test diffs found Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard a7b1b24587dcbebf12455c41ed828d9b486487be --output-dir test-dashboardAnd then open  Job duration changes
 How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance | 
| Finished benchmarking commit (a7b1b24): comparison URL. Overall result: ❌ regressions - please read the text belowOur benchmarks found a performance regression caused by this PR. Next Steps: 
 @rustbot label: +perf-regression Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise. 
 Max RSS (memory usage)Results (primary 0.5%, secondary -2.6%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment. 
 CyclesResults (primary 0.5%, secondary 2.6%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment. 
 Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 771.811s -> 772.392s (0.08%) | 
| Ugh, perf regressions were not expected. I'll take a look, though I might not get to it until after RustWeek. | 
This fixes a perf regression introduced in rust-lang#140252.
| #140880 should fix the perf regressions. | 
…r=<try> Make the assertion in `Ident::new` debug-only. This fixes a perf regression introduced in rust-lang#140252. r? `@oli-obk`
…r=oli-obk Make the assertion in `Ident::new` debug-only. This fixes a perf regression introduced in rust-lang#140252. r? `@oli-obk`
It was added in rust-lang#140052, but the subsequent changes in rust-lang#140252 means it is no longer necessary. (Indeed, `Ident`s cannot be empty any more.)
This fixes a perf regression introduced in rust-lang#140252. (cherry picked from commit 4cb9f03)
All uses have been removed. And it's nonsensical: an identifier by definition has at least one char.
r? @oli-obk