#!/bin/bash
cat > ice.rs <<EOF
pub fn cubic_out(t: f32) -> f32 {
let u = t - 1.0;
u * u * u + 1.0
}
pub fn cubic_in_out(t: f32) -> f32 {
if t < 0.5 {
4.0 * t * t * t
} else {
let u = 2.0 * t - 2.0;
0.5 * u * u * u + 1 // <- should have been 1.0
}
}
fn main() {}
EOF
RUST_BACKTRACE=1 rustc ice.rs
rustc --version
uname -a
Replication:
Output: