官方The Book
里面有一段很好的概括:
Ultimately, lifetime syntax is about connecting the lifetimes of various parameters and return values of functions. Once they’re connected, Rust has enough information to allow memory-safe operations and disallow operations that would create dangling pointers or otherwise violate memory safety.
个人简单理解:输出必须匹配输入,编译器可以推断的可以省略。