Go to file
Matthias Krüger 89a0cfe72a
Rollup merge of #127058 - compiler-errors:tighten-async-spans, r=oli-obk
Tighten `fn_decl_span` for async blocks

Tightens the span of `async {}` blocks in diagnostics, and subsequently async closures and async fns, by actually setting the `fn_decl_span` correctly. This is kinda a follow-up on #125078, but it fixes the problem in a more general way.

I think the diagnostics are significantly improved, since we no longer have a bunch of overlapping spans. I'll point out one caveat where I think the diagnostic may get a bit more confusing, but where I don't think it matters.

r? ````@estebank```` or ````@oli-obk```` or someone else on wg-diag or compiler i dont really care lol
2024-06-28 08:34:10 +02:00
.github Cache lintcheck binary in ci 2024-06-23 17:05:46 +00:00
.reuse Add .clang-format 2024-06-26 05:56:00 +08:00
compiler Rollup merge of #127058 - compiler-errors:tighten-async-spans, r=oli-obk 2024-06-28 08:34:10 +02:00
library Rollup merge of #126970 - DaniPopes:simplify-str-clone_into, r=cuviper 2024-06-28 08:34:09 +02:00
LICENSES
src Rollup merge of #127058 - compiler-errors:tighten-async-spans, r=oli-obk 2024-06-28 08:34:10 +02:00
tests Rollup merge of #127058 - compiler-errors:tighten-async-spans, r=oli-obk 2024-06-28 08:34:10 +02:00
.clang-format Add .clang-format 2024-06-26 05:56:00 +08:00
.editorconfig
.git-blame-ignore-revs
.gitattributes
.gitignore
.gitmodules
.mailmap
Cargo.lock Support fetching Attribute of items. 2024-06-28 13:24:41 +08:00
Cargo.toml chore: bump version 2024-06-21 18:20:47 -05:00
CODE_OF_CONDUCT.md
config.example.toml
configure
CONTRIBUTING.md
COPYRIGHT
INSTALL.md
LICENSE-APACHE
LICENSE-MIT
README.md
RELEASES.md
rust-bors.toml
rustfmt.toml
triagebot.toml Rollup merge of #126909 - onur-ozkan:add-kobzol, r=matthiaskrgr 2024-06-24 15:51:05 -04:00
x
x.ps1
x.py

This is the main source code repository for Rust. It contains the compiler, standard library, and documentation.

Why Rust?

  • Performance: Fast and memory-efficient, suitable for critical services, embedded devices, and easily integrate with other languages.

  • Reliability: Our rich type system and ownership model ensure memory and thread safety, reducing bugs at compile-time.

  • Productivity: Comprehensive documentation, a compiler committed to providing great diagnostics, and advanced tooling including package manager and build tool (Cargo), auto-formatter (rustfmt), linter (Clippy) and editor support (rust-analyzer).

Quick Start

Read "Installation" from The Book.

Installing from Source

If you really want to install from source (though this is not recommended), see INSTALL.md.

Getting Help

See https://www.rust-lang.org/community for a list of chat platforms and forums.

Contributing

See CONTRIBUTING.md.

License

Rust is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various BSD-like licenses.

See LICENSE-APACHE, LICENSE-MIT, and COPYRIGHT for details.

Trademark

The Rust Foundation owns and protects the Rust and Cargo trademarks and logos (the "Rust Trademarks").

If you want to use these names or brands, please read the media guide.

Third-party logos may be subject to third-party copyrights and trademarks. See Licenses for details.