<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/library/proc_macro/src/bridge/server.rs, branch cargo_update</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=cargo_update</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=cargo_update'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-04-11T13:07:08+00:00</updated>
<entry>
<title>Replace proc_macro::SourceFile by Span::{file, local_file}.</title>
<updated>2025-04-11T13:07:08+00:00</updated>
<author>
<name>Mara Bos</name>
<email>m-ou.se@m-ou.se</email>
</author>
<published>2025-04-11T12:35:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3962069982783ccf183e273a983b0c150c51d504'/>
<id>urn:sha1:3962069982783ccf183e273a983b0c150c51d504</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove TODO in proc_macro now `const_refs_to_static` is stable</title>
<updated>2024-10-17T08:41:51+00:00</updated>
<author>
<name>GnomedDev</name>
<email>david2005thomas@gmail.com</email>
</author>
<published>2024-10-16T08:33:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6d8815887caf82ac7d75086286cf2a94354a7b62'/>
<id>urn:sha1:6d8815887caf82ac7d75086286cf2a94354a7b62</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Reformat `use` declarations.</title>
<updated>2024-07-28T22:26:52+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-07-28T22:13:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=84ac80f1921afc243d71fd0caaa4f2838c294102'/>
<id>urn:sha1:84ac80f1921afc243d71fd0caaa4f2838c294102</id>
<content type='text'>
The previous commit updated `rustfmt.toml` appropriately. This commit is
the outcome of running `x fmt --all` with the new formatting options.
</content>
</entry>
<entry>
<title>Fix doc nits</title>
<updated>2024-07-26T12:26:33+00:00</updated>
<author>
<name>John Arundel</name>
<email>john@bitfieldconsulting.com</email>
</author>
<published>2024-07-15T11:26:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a19472a93e2eecce1477011fa9f7ec49b45ca164'/>
<id>urn:sha1:a19472a93e2eecce1477011fa9f7ec49b45ca164</id>
<content type='text'>
Many tiny changes to stdlib doc comments to make them consistent (for example
"Returns foo", rather than "Return foo", per RFC1574), adding missing periods, paragraph
breaks, backticks for monospace style, and other minor nits.

https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md#appendix-a-full-conventions-text
</content>
</entry>
<entry>
<title>Rollup merge of #120976 - matthiaskrgr:constify_TL_statics, r=lcnr</title>
<updated>2024-03-04T21:16:30+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>matthias.krueger@famsik.de</email>
</author>
<published>2024-03-04T21:16:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=706fe0b7d8bedf66e09f52698dd8e7e92e765754'/>
<id>urn:sha1:706fe0b7d8bedf66e09f52698dd8e7e92e765754</id>
<content type='text'>
constify a couple thread_local statics
</content>
</entry>
<entry>
<title>Move `HandleStore` into `server.rs`.</title>
<updated>2024-03-01T05:30:26+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-03-01T05:06:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=392159b5618192af5761788d2c7e8256b331ce95'/>
<id>urn:sha1:392159b5618192af5761788d2c7e8256b331ce95</id>
<content type='text'>
This just moves the server-relevant parts of handles into `server.rs`.
It introduces a new higher-order macro `with_api_handle_types` to avoid
some duplication.

This fixes two `FIXME` comments, and makes things clearer, by not having
server code in `client.rs`.
</content>
</entry>
<entry>
<title>constify a couple thread_local statics</title>
<updated>2024-02-12T15:25:39+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>matthias.krueger@famsik.de</email>
</author>
<published>2024-02-12T15:24:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d0873c7a11e71a46ad58c1d152fb0599281d98df'/>
<id>urn:sha1:d0873c7a11e71a46ad58c1d152fb0599281d98df</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Replace libstd, libcore, liballoc in line comments.</title>
<updated>2022-12-30T13:00:42+00:00</updated>
<author>
<name>jonathanCogan</name>
<email>jonathanecogan@gmail.com</email>
</author>
<published>2022-10-28T23:48:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=db47071df2647f90da5a66624caf262fa3a17456'/>
<id>urn:sha1:db47071df2647f90da5a66624caf262fa3a17456</id>
<content type='text'>
</content>
</entry>
<entry>
<title>proc_macro/bridge: use the cross-thread executor for nested proc-macros</title>
<updated>2022-09-04T18:06:26+00:00</updated>
<author>
<name>Nika Layzell</name>
<email>nika@thelayzells.com</email>
</author>
<published>2022-09-04T16:53:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=efda49712b35009c0096217ce2aa262fc5ab8174'/>
<id>urn:sha1:efda49712b35009c0096217ce2aa262fc5ab8174</id>
<content type='text'>
While working on some other changes in the bridge, I noticed that when
running a nested proc-macro (which is currently only possible using
the unstable `TokenStream::expand_expr`), any symbols held by the
proc-macro client would be invalidated, as the same thread would be used
for the nested macro by default, and the interner doesn't handle nested
use.

After discussing with @eddyb, we decided the best approach might be to
force the use of the cross-thread executor for nested invocations, as it
will never re-use thread-local storage, avoiding the issue. This
shouldn't impact performance, as expand_expr is still unstable, and
infrequently used.

This was chosen rather than making the client symbol interner handle
nested invocations, as that would require replacing the internal
interner `Vec` with a `BTreeMap` (as valid symbol id ranges could now be
disjoint), and the symbol interner is known to be fairly perf-sensitive.

This patch adds checks to the execution strategy to use the cross-thread
executor when doing nested invocations. An alternative implementation
strategy could be to track this information in the `ExtCtxt`, however a
thread-local in the `proc_macro` crate was chosen to add an assertion so
that `rust-analyzer` is aware of the issue if it implements
`expand_expr` in the future.

r? @eddyb
</content>
</entry>
<entry>
<title>proc_macro/bridge: send diagnostics over the bridge as a struct</title>
<updated>2022-08-06T19:49:43+00:00</updated>
<author>
<name>Nika Layzell</name>
<email>nika@thelayzells.com</email>
</author>
<published>2022-07-25T04:43:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1c7c792ddafe2a1aaa76e2ddee4fa9b2187dcfcb'/>
<id>urn:sha1:1c7c792ddafe2a1aaa76e2ddee4fa9b2187dcfcb</id>
<content type='text'>
This removes some RPC when creating and emitting diagnostics, and
simplifies the bridge slightly.

After this change, there are no remaining methods which take advantage
of the support for `&amp;mut` references to objects in the store as
arguments, meaning that support for them could technically be removed if
we wanted. The only remaining uses of immutable references into the
store are `TokenStream` and `SourceFile`.
</content>
</entry>
</feed>
