]> git.lizzy.rs Git - rust.git/blob - src/formatting/generated.rs
Merge commit 'c4416f20dcaec5d93077f72470e83e150fb923b1' into sync-rustfmt
[rust.git] / src / formatting / generated.rs
1 /// Returns `true` if the given span is a part of generated files.
2 pub(super) fn is_generated_file(original_snippet: &str) -> bool {
3     original_snippet
4         .lines()
5         .take(5) // looking for marker only in the beginning of the file
6         .any(|line| line.contains("@generated"))
7 }