Skip to content

Rollup of 8 pull requests #103712

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 18 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
328f817
Make `CStr::from_ptr` `const`.
reitermarkus Oct 12, 2022
36dbb07
Update docs for `CStr::from_ptr`.
reitermarkus Oct 12, 2022
4accf83
Note scope of TAIT more accurately
compiler-errors Oct 22, 2022
509d8ad
rustdoc: remove redundant `div.search-container`
notriddle Oct 27, 2022
92b314b
add test for issue 98634
Rageking8 Oct 21, 2022
d7edda7
Rename some `OwnerId` fields.
nnethercote Oct 27, 2022
064ad83
rustdoc-json-types: Improve ItemSummary::path docs
aDotInTheVoid Oct 28, 2022
b3f9277
Remove unneeded attribute.
reitermarkus Oct 28, 2022
6bc5fdd
Add a test for TAIT used with impl/dyn Trait inside RPIT
xxchan Oct 28, 2022
298253a
Specialize ToString for Symbol
camsteffen Oct 27, 2022
5b45bfe
Rollup merge of #102961 - reitermarkus:const-cstr-from-ptr, r=oli-obk
matthiaskrgr Oct 29, 2022
b3bd24e
Rollup merge of #103342 - Rageking8:add-test-for-issue-98634, r=compi…
matthiaskrgr Oct 29, 2022
89735ec
Rollup merge of #103383 - compiler-errors:tait-scope, r=oli-obk
matthiaskrgr Oct 29, 2022
4d988ce
Rollup merge of #103618 - nnethercote:rename-OwnerId-fields, r=compil…
matthiaskrgr Oct 29, 2022
50a6af2
Rollup merge of #103656 - camsteffen:symbol-to-string, r=compiler-errors
matthiaskrgr Oct 29, 2022
37604ab
Rollup merge of #103663 - notriddle:notriddle/search-container, r=Gui…
matthiaskrgr Oct 29, 2022
31d81b8
Rollup merge of #103664 - aDotInTheVoid:rdj-path-docs, r=Urgau,Guilla…
matthiaskrgr Oct 29, 2022
4c7f49a
Rollup merge of #103704 - xxchan:xxchan/applicable-bug, r=compiler-er…
matthiaskrgr Oct 29, 2022
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
Specialize ToString for Symbol
  • Loading branch information
camsteffen committed Oct 28, 2022
commit 298253af98db70ce5dd0294698dfb89cb3bd09ab
7 changes: 7 additions & 0 deletions compiler/rustc_span/src/symbol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1901,6 +1901,13 @@ impl fmt::Display for Symbol {
}
}

// takes advantage of `str::to_string` specialization
impl ToString for Symbol {
fn to_string(&self) -> String {
self.as_str().to_string()
}
}

impl<S: Encoder> Encodable<S> for Symbol {
default fn encode(&self, s: &mut S) {
s.emit_str(self.as_str());
Expand Down