<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_session/src/session.rs, branch 1.85.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.85.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.85.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2024-12-29T10:10:36+00:00</updated>
<entry>
<title>make -Csoft-float have an effect on all ARM targets</title>
<updated>2024-12-29T10:10:36+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2024-12-29T10:10:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=62bb35ab5d99dc0b7d6cc77687b09e94ccd228c6'/>
<id>urn:sha1:62bb35ab5d99dc0b7d6cc77687b09e94ccd228c6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>coverage: Add a synthetic test for when all spans are discarded</title>
<updated>2024-12-19T11:03:43+00:00</updated>
<author>
<name>Zalathar</name>
<email>Zalathar@users.noreply.github.com</email>
</author>
<published>2024-12-19T10:53:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=aced4dcf1047aab08b769b34fae9d4ba7de87f04'/>
<id>urn:sha1:aced4dcf1047aab08b769b34fae9d4ba7de87f04</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove registered_lints field from Session</title>
<updated>2024-12-13T10:46:53+00:00</updated>
<author>
<name>bjorn3</name>
<email>17426603+bjorn3@users.noreply.github.com</email>
</author>
<published>2024-12-12T11:45:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=981f625ba7c8e8ddcf6e470eb54d822eaf9fb300'/>
<id>urn:sha1:981f625ba7c8e8ddcf6e470eb54d822eaf9fb300</id>
<content type='text'>
It only exists to pass some information from one part of the driver to
another part. We can directly pass this information to the function that
needs it to reduce the amount of mutation of the Session.
</content>
</entry>
<entry>
<title>Remove jobserver from Session</title>
<updated>2024-12-13T10:21:22+00:00</updated>
<author>
<name>bjorn3</name>
<email>17426603+bjorn3@users.noreply.github.com</email>
</author>
<published>2024-12-12T11:40:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ead78fdfdf6692b2ecef7f47dfc934011c51fe4c'/>
<id>urn:sha1:ead78fdfdf6692b2ecef7f47dfc934011c51fe4c</id>
<content type='text'>
It is effectively a global resource and the jobserver::Client in Session
was a clone of GLOBAL_CLIENT anyway.
</content>
</entry>
<entry>
<title>Store a single copy of the error registry in DiagCtxt</title>
<updated>2024-12-06T18:42:31+00:00</updated>
<author>
<name>bjorn3</name>
<email>17426603+bjorn3@users.noreply.github.com</email>
</author>
<published>2024-11-09T18:30:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=030545d8c3dd13735b2b88d280705d52a1ebf64d'/>
<id>urn:sha1:030545d8c3dd13735b2b88d280705d52a1ebf64d</id>
<content type='text'>
And pass this to the individual emitters when necessary.
</content>
</entry>
<entry>
<title>Rollup merge of #130777 - azhogin:azhogin/reg-struct-return, r=workingjubilee</title>
<updated>2024-12-06T08:27:38+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>matthias.krueger@famsik.de</email>
</author>
<published>2024-12-06T08:27:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=820ddaf67a4d1e3161249dd0dd88cf777ef47891'/>
<id>urn:sha1:820ddaf67a4d1e3161249dd0dd88cf777ef47891</id>
<content type='text'>
rust_for_linux: -Zreg-struct-return commandline flag for X86 (#116973)

Command line flag `-Zreg-struct-return` for X86 (32-bit) for rust-for-linux.
This flag enables the same behavior as the `abi_return_struct_as_int` target spec key.

- Tracking issue: https://github.com/rust-lang/rust/issues/116973
</content>
</entry>
<entry>
<title>`impl Default for EarlyDiagCtxt`</title>
<updated>2024-12-02T14:55:04+00:00</updated>
<author>
<name>jyn</name>
<email>github@jyn.dev</email>
</author>
<published>2024-12-02T14:55:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=42174f03964759f849a2f22653b264038948443a'/>
<id>urn:sha1:42174f03964759f849a2f22653b264038948443a</id>
<content type='text'>
for small rustc_driver programs, most of their imports will currently be related to diagnostics. this change simplifiers their code so it's more clear what in the driver is modified from the default.

this is especially important for external drivers which are out of tree and not updated in response to breaking changes. for these drivers, each import is a liability for future code, since it can be broken when refactors happen.

here is an example driver which is simplified by these changes:
```
diff --git a/src/main.rs b/src/main.rs
index f81aa3e..11e5f18 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,16 +1,8 @@
 #![feature(rustc_private)]
 extern crate rustc_driver;
 extern crate rustc_interface;
-extern crate rustc_errors;
-extern crate rustc_session;

 use rustc_driver::Callbacks;
-use rustc_errors::{emitter::HumanReadableErrorType, ColorConfig};
 use rustc_interface::interface;
-use rustc_session::config::ErrorOutputType;
-use rustc_session::EarlyDiagCtxt;

 struct DisableSafetyChecks;

@@ -26,11 +18,7 @@ fn main() {
         "https://github.com/jyn514/jyn514.github.io/issues/new",
         |_| (),
     );
-    let handler = EarlyDiagCtxt::new(ErrorOutputType::HumanReadable(
-        HumanReadableErrorType::Default,
-        ColorConfig::Auto,
-    ));
-    rustc_driver::init_rustc_env_logger(&amp;handler);
+    rustc_driver::init_rustc_env_logger(&amp;Default::default());
     std::process::exit(rustc_driver::catch_with_exit_code(move || {
         let args: Vec&lt;String&gt; = std::env::args().collect();
         rustc_driver::RunCompiler::new(&amp;args, &amp;mut DisableSafetyChecks).run()
```
</content>
</entry>
<entry>
<title>rust_for_linux: -Zreg-struct-return commandline flag for X86 (#116973)</title>
<updated>2024-12-01T18:14:40+00:00</updated>
<author>
<name>Andrew Zhogin</name>
<email>andrew.zhogin@gmail.com</email>
</author>
<published>2024-09-24T09:35:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9aab517d6310223ac5a89c640723a64b695d49d2'/>
<id>urn:sha1:9aab517d6310223ac5a89c640723a64b695d49d2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove -Zfuel.</title>
<updated>2024-11-26T10:45:21+00:00</updated>
<author>
<name>Camille GILLOT</name>
<email>gillot.camille@gmail.com</email>
</author>
<published>2023-05-01T09:56:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7fa021ad86fb62753576332a1a52b78acac492f9'/>
<id>urn:sha1:7fa021ad86fb62753576332a1a52b78acac492f9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rustc_metadata: Preprocess search paths for better performance</title>
<updated>2024-11-15T09:35:33+00:00</updated>
<author>
<name>Piotr Osiewicz</name>
<email>24362066+osiewicz@users.noreply.github.com</email>
</author>
<published>2024-11-11T17:34:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=42e71bb8ea2bf59fb33cf3f83a3dcf34e314f520'/>
<id>urn:sha1:42e71bb8ea2bf59fb33cf3f83a3dcf34e314f520</id>
<content type='text'>
Over in Zed we've noticed that loading crates for a large-ish workspace can take almost 200ms. We've pinned it down to how rustc searches for paths, as it performs a linear search over the list of candidate paths. In our case the candidate list had about 20k entries which we had to iterate over for each dependency being loaded.

This commit introduces a simple FilesIndex that's just a sorted Vec under the hood. Since crates are looked up by both prefix and suffix, we perform a range search on said Vec (which constraints the search space based on prefix) and follow up with a linear scan of entries with matching suffixes.
FilesIndex is also pre-filtered before any queries are performed using available target information; query prefixes/sufixes are based on the target we are compiling for, so we can remove entries that can never match up front.

Overall, this commit brings down build time for us in dev scenarios by about 6%.
100ms might not seem like much, but this is a constant cost that each of our workspace crates has to pay, even when said crate is miniscule.
</content>
</entry>
</feed>
