# Proposal for multiline span comments

**URL:** <https://internals.rust-lang.org/t/proposal-for-multiline-span-comments/4242>\
**Category:** compiler\
**Created:** [October 20, 2016, 1:35am UTC](https://internals.rust-lang.org/t/proposal-for-multiline-span-comments/4242 "2016-10-20T01:35:55Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![ekuber](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/ekuber/32/1646_2.png) [@ekuber](https://internals.rust-lang.org/u/ekuber)\
**Post date:** [October 22, 2016, 5:39am UTC](https://internals.rust-lang.org/t/proposal-for-multiline-span-comments/4242/6 "2016-10-22T05:39:06Z")

</div>

I got some (far from production ready) code to implement this proposal, and this are the file I tested with and a screenshot of the output:

```rust
fn foo(a: u32, b: u32) {
    a + b;
}

fn bar(a: u32, b: u32) {
    a + b;
}

fn main() {
    let x = 1;
    let y = 2;
    let z = 3;
    foo(1 + bar(x,
            y),
        z)
}

```

 ![](https://us1.discourse-cdn.com/flex002/uploads/rustlang/original/2X/2/2777159168aee388465e96c563eef738a800c39d.png)

Looking at it now, adding some label like "`starting here...`" at the beginning and "`..ending here:`" at the end might make it easier to read and understand. Coloring to the end of the lines to every single line in between can be done, but that might include comments (wouldn't that be wrong?).

I haven't been able to come up with code that would have two overlapping multiline spans in the same error. If you have any ideas of one let me know so I can use it when testing this out.

---

_[View the full topic](https://internals.rust-lang.org/t/proposal-for-multiline-span-comments/4242)._
