1
Fork 0

Always show end line of multiline annotations

```rust
error[E0046]: not all trait items implemented, missing: `Item`
  --> $DIR/issue-23729.rs:20:9
   |
20 |           impl Iterator for Recurrence {
   |  _________^ starting here...
21 | |             //~^ ERROR E0046
22 | |             //~| NOTE missing `Item` in implementation
23 | |             //~| NOTE `Item` from trait: `type Item;`
...  |
36 | |             }
37 | |         }
   | |_________^ ...ending here: missing `Item` in implementation
   |
   = note: `Item` from trait: `type Item;`
```

instead of

```rust
error[E0046]: not all trait items implemented, missing: `Item`
  --> $DIR/issue-23729.rs:20:9
   |
20 |         impl Iterator for Recurrence {
   |         ^ missing `Item` in implementation
   |
   = note: `Item` from trait: `type Item;`
```
This commit is contained in:
Esteban Küber 2017-04-06 12:18:18 -07:00
parent 9e84bf8096
commit 4bc7f5b52c
6 changed files with 269 additions and 97 deletions

View file

@ -97,9 +97,6 @@ pub enum AnnotationType {
/// Annotation under a single line of code
Singleline,
/// Annotation under the first character of a multiline span
Minimized,
/// Annotation enclosing the first and last character of a multiline span
Multiline(MultilineAnnotation),
@ -118,6 +115,9 @@ pub enum AnnotationType {
/// Annotation marking the last character of a fully shown multiline span
MultilineEnd(usize),
/// Line at the left enclosing the lines of a fully shown multiline span
// Just a placeholder for the drawing algorithm, to know that it shouldn't skip the first 4
// and last 2 lines of code. The actual line is drawn in `emit_message_default` and not in
// `draw_multiline_line`.
MultilineLine(usize),
}
@ -144,13 +144,6 @@ pub struct Annotation {
}
impl Annotation {
pub fn is_minimized(&self) -> bool {
match self.annotation_type {
AnnotationType::Minimized => true,
_ => false,
}
}
/// Wether this annotation is a vertical line placeholder.
pub fn is_line(&self) -> bool {
if let AnnotationType::MultilineLine(_) = self.annotation_type {