Is it possible to disable Rust lifetime elision for each file.
No.
The best alternative I can offer is to request the Clippy function opposite needless_lifetimes, then turn it on. I do not know if such a request will be wanted by other people.
At the same time, you can enable this line and manually verify that it works for each function.
For reference, there are only 3 rules :
, :
, . , , Rust :
- , lifetime, . , :
fn foo<'a>(x: &'a i32), : fn foo<'a, 'b>(x: &'a i32, y: &'b i32) ..
, :
- , :
fn foo<'a>(x: &'a i32) -> &'a i32. - ,
&self &mut self, self - . .
, .
, Rust 1.0, , . - 87% , , , . Lifetime elision - .