327 private links
and an overview to compiler (AST) part is built.
An error is directly inserted in the AST !
Scalar types are types representing a single value. Moreover primitive types contains scalar types and some others. See: https://doc.rust-lang.org/std/index.html#primitives
Types that have the copy traits are said to have copy semantics. What this means is that when you pass them into a function, you pass a copy of that value into that function.
Non-primitive types do not have the Copy trait by default. This means they are subject to move semantics. When you pass them into a function, you move the value into that function. Without going into details (that I am still learning about myself), this pretty much means that when the function scope ends, the value is destroyed.
There are ways to deal with this, using a reference for instance.
It is the symbol & that says take the reference
does not compile after a specific condition! Nice 👍
En tant qu’équipe library, nous pourrions par exemple essayer de décider que le mécanisme de formatage (std ::fmt) devrait être réécrit pour être plus petit et plus efficace. Mais prendre cette décision ne provoque pas la réécriture. Et nous n’avons pas d’employés à qui assigner les tâches. Ce n’est pas comme ça que ça fonctionne.
Au lieu de cela, un contributeur passionné d’algorithmes de formatage pourrait se manifester, et commencer à travailler sur le problème. Notre travail en tant qu’équipe library est de faire en sorte que cette personne puisse travailler. S’assurer que son projet est en accord avec le reste de la bibliothèque standard, relire son travail et fournir un retour utile et constructif. Si davantage de personnes interviennent pour collaborer sur ce projet, mettre en place un groupe de travail pour aider à tout organiser, etc.
This paper presents a comparative study between C and Rust in terms of performance and programming effort
That’s where the main usage of #[inline] comes from — it enables cross-crate inlining.
The benefit is not without a cost — the compiler implements this by compiling a separate copy of the #[inline] function with every crate it is used in, significantly increasing compile times.
Okay 👌
And 5 tips about good inlining
I don't think rustc has ever met a function it didn't like to inline.
🤣
LLVM's inlining heuristic is "yes".
I recall finding out that Servo's style system ends up being mostly a 100k-loc assembly function because of this.
🤯
Could be useful. The simple way to run all tests in one thread only via -- --test-threads 1, or only some tests via the serial_test crate.
Ever added a todo based on an open issue (perhaps in one of your dependencies)? Track the issue and be warned when it is closed!
Rust is officially supported on GNU/Linux. The project is hosted on Github
👍
Generate a regex based on examples 👍
Transform a regex to a filesystem 😮
For fun only !
Similar to BeautifulSoup ! ❤️
Some arguments against, because it is good to have different point of view; or at least knowing what can be improved 😄