You avoid lifetime annotations by using owned types like String or Vec<T> instead of references, because ownership transfers the data rather than borrowing it. Replace &str parameters with String to let the function take ownership of the data, eliminating the need to specify how long the reference lives.
fn process_data(data: String) {
println!("Processing: {}", data);
}
This approach works because String owns its heap-allocated data, so the compiler knows the data lives as long as the variable does without extra lifetime hints.