blob: 58f43f17ee15f5c4b12af2dda56ae182efbc542a (
plain)
1
2
3
4
5
6
7
|
/// Returns `true` if the given span is a part of generated files.
pub(super) fn is_generated_file(original_snippet: &str) -> bool {
original_snippet
.lines()
.take(5) // looking for marker only in the beginning of the file
.any(|line| line.contains("@generated"))
}
|