Design and Implementation of the `#[diagnostic]` attribute namespace

The talk aims to introduce the `#[diagnostic]` attribute namespace. This new tool namespace allows to hint the Rust compiler to emit a specific error message text in certain situations. It's meant to help crate authors to take control over error messages emitted by the compiler that occur while upholding certain domain specific compile time constraints. The feature was stablized with Rust 1.78.

LEVEL: Advanced

Place
RustLab Discovery
Length
25 min
When
November 10th, 2024
11:30

Abstract

The talk aims to introduce the `#[diagnostic]` attribute namespace. This new tool namespace allows to hint the Rust compiler to emit a specific error message text in certain situations. It's meant to help crate authors to take control over error messages emitted by the compiler that occur while upholding certain domain specific compile time constraints. The feature was stablized with Rust 1.78.

Beside introducing this new feature, I would like to use this talk to go through the process of designing, implementing and stabilising such a new language feature. I hope that the proposed talk can encourage people to contribute to the compiler itself by showing how to approach specific steps of the design and implementation process.

Disclaimer: I'm neither part of a relevant Rust team nor would I speak in a official compiler related role.

RustLab is a conference made by Develer.
Develer is a company based in Campi Bisenzio, near Florence. Our motto is : "Technology to give life to your products". We produce hardware and software to create exceptional products and to improve industrial processes and people's well being.
In Develer we have passion for the new technologies and we offer our clients effective solutions that are also efficient, simple and safe for the end users. We also believe in a friendly and welcoming environment where anybody can give their contribution. This passion and this vision are what we've been driven to organize our conference "made by developers for developers".

Subscribe to our newsletter

We hate spam just as much as you do, which is why we promise to only send you relevant communications. We respect your privacy and will never share your information with third parties.
©2024 RustLab | The international conference on Rust in Florence-Design & devCantiere Creativo-Made withDatoCMS