| display_list::{DisplayList, FormatOptions}, |
| snippet::{Annotation, AnnotationType, Slice, Snippet, SourceAnnotation}, |
| source: r#") -> Option<String> { |
| match (ann.range.0, ann.range.1) { |
| (None, None) => continue, |
| (Some(start), Some(end)) if start > end_index => continue, |
| (Some(start), Some(end)) if start >= start_index => { |
| let label = if let Some(ref label) = ann.label { |
| " ".repeat(start - start_index), |
| origin: Some("src/format.rs"), |
| label: "expected `Option<String>` because of return type", |
| annotation_type: AnnotationType::Warning, |
| label: "expected enum `std::option::Option`", |
| annotation_type: AnnotationType::Error, |
| label: Some("mismatched types"), |
| annotation_type: AnnotationType::Error, |
| let dl = DisplayList::from(snippet); |