2 ms·
In Rust neither is duck typed. For T you must specify the traits it must have. This makes compilation fail at definition, not at the point of incorrect usage.
by estebank 3y ago
In Rust neither is duck typed. For T you must specify the traits it must have. This makes compilation fail at definition, not at the point of incorrect usage.
For an example of GATs, you can see the following:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=0691091fe290a60f9f13066f7299c000 https://play.rust-lang.org/?version=stable&mode=debug&editio...