Skip to content

Rollup of 9 pull requests #140377

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

Closed
wants to merge 22 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
8808d5a
std(docs): clarify how std::fs::set_permisions works with symlinks
lolbinarycat Apr 8, 2025
37c4a37
clarify std::fs::set_permissions symlink behavior
lolbinarycat Apr 8, 2025
f2534de
crashes: more tests
matthiaskrgr Apr 15, 2025
11f7290
refactor(test): Decouple parsing from help generation
epage Jan 27, 2025
aa8670f
fix(test): Expose '--no-capture', deprecating '--nocapture'
epage Jan 27, 2025
3d29e84
Fix `download-ci-gcc key` in `bootstrap.example.toml`
Kobzol Apr 23, 2025
d4011ae
Download GCC from CI on test builders
Kobzol Apr 23, 2025
59b6cf5
uefi: Update r-efi
Ayush1325 Mar 20, 2025
6f5698c
Avoid re-interning in `LateContext::get_def_path`
DaniPopes Apr 26, 2025
9fed91f
docs: fix incorrect stability markers on `std::{todo, matches}`
notriddle Apr 26, 2025
d40d424
CI: docker: host-x86_64: test-various: uefi_qemu_test: Update r-efi
Ayush1325 Apr 27, 2025
0795b2d
specify explicit safety guidance for from_utf8_unchecked
DiuDiu777 Apr 27, 2025
2ab4034
Add `Arc::is_unique`
SabrinaJewson Mar 25, 2025
6e60d02
Rollup merge of #138395 - Kobzol:ci-download-gcc, r=Mark-Simulacrum
ChrisDenton Apr 28, 2025
c90e0eb
Rollup merge of #138737 - Ayush1325:r-efi-update, r=tgross35
ChrisDenton Apr 28, 2025
d603142
Rollup merge of #138939 - SabrinaJewson:arc-is-unique, r=tgross35
ChrisDenton Apr 28, 2025
bb58627
Rollup merge of #139224 - epage:nocapture, r=thomcc
ChrisDenton Apr 28, 2025
d5fb1be
Rollup merge of #139546 - lolbinarycat:std-set_permissions-75942, r=t…
ChrisDenton Apr 28, 2025
19f984d
Rollup merge of #139883 - matthiaskrgr:crashesapr15, r=Mark-Simulacrum
ChrisDenton Apr 28, 2025
6dd7641
Rollup merge of #140345 - DaniPopes:get-def-path, r=Urgau
ChrisDenton Apr 28, 2025
da09849
Rollup merge of #140351 - rust-lang:notriddle/stability-use, r=thomcc
ChrisDenton Apr 28, 2025
fd10438
Rollup merge of #140359 - DiuDiu777:str-fix, r=Noratrieb
ChrisDenton Apr 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Avoid re-interning in LateContext::get_def_path
The def path printer in `get_def_path` essentially calls
`Symbol::intern(&symbol.to_string())` for simple symbols in a path.
This accounts for ~30% of the runtime of get_def_path.

We can avoid this by simply appending the symbol directly when available.
  • Loading branch information
DaniPopes committed Apr 26, 2025
commit 6f5698c3683f0b158399c0c22c88234dfb695c29
5 changes: 4 additions & 1 deletion compiler/rustc_lint/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,10 @@ impl<'tcx> LateContext<'tcx> {
return Ok(());
}

self.path.push(Symbol::intern(&disambiguated_data.data.to_string()));
self.path.push(match disambiguated_data.data.get_opt_name() {
Some(sym) => sym,
None => Symbol::intern(&disambiguated_data.data.to_string()),
});
Ok(())
}

Expand Down
Loading