v0.21.0-alpha
Pre-release
Pre-release
github-actions
released this
01 Mar 09:34
·
934 commits
to master
since this release
0.21.0-alpha "Ussingite" (2023-02-28)
Features
-
Support for
Self
typeWith this change
Self
(with capitalS
) can be used to refer
to the enclosing type in contracts, structs, impls and traits.E.g.
trait Min { fn min() -> Self; } impl Min for u8 { fn min() -> u8 { // Both `u8` or `Self` are valid here return 0 } }
Usage:
u8::min()
(#803) -
Added
Min
andMax
traits to the std library.
The std library implements the traits for all numeric types.Example
use std::traits::{Min, Max} ... assert u8::min() < u8::max() ``` ([#836](https://github.com/ethereum/fe/issues/836))
-
Upgraded underlying solc compiler to version
0.8.18
Bugfixes
- the release contains minor bugfixes