nandi/rustnimpublic Fork 0
7db79919131ab55e23a1730bf78c360e05d9977e
Commits
Clone
git clone https://git.rickub.com/nandi/rustnim.git
git clone ssh://git@rickub.com/nandi/rustnim.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

901-reject-unknown-method.rs · 9 lines · 346 BRust Blame HistoryRaw
Add the differential test runner, and a lowering to measure with it 8ac32af nandithebull 18h ago1//@ reject: unsupported method `.sort()`
2// A standard-library method with no verified Nim equivalent must be rejected,
3// not guessed at. Rust's `sort` is stable and Nim's `sort` is not, so an
4// unthinking `.sort` mapping would differ on equal keys.
5fn main() {
6 let mut v: Vec<i32> = vec![3, 1, 2];
7 v.sort();
8 println!("{:?}", v);
9}