Auto merge of #121877 - estebank:fancy-svg, r=compiler-errors
On tests that specify `--color=always` emit SVG file with stderr output Leverage `anstyle-svg`, as `cargo` does now, to emit `.svg` files instead of `.stderr` files for tests that explicitly enable color output. This will make reviewing changes to the graphical output of tests much more human friendly. <img src="https://raw.githubusercontent.com/rust-lang/rust/b4bdb56f86e136ca63bf71dca3034200c6c25900/tests/ui/error-emitter/highlighting.svg">
This commit is contained in:
commit
a09d91b04a
18 changed files with 485 additions and 150 deletions
|
@ -1,4 +1,6 @@
|
|||
//@ check-pass
|
||||
//@ ignore-windows
|
||||
//@ compile-flags: -Cremark=foo --error-format=human --color always
|
||||
//@ compile-flags: -Cremark=foo --error-format=human --color=always
|
||||
// Temporary until next release:
|
||||
//@ ignore-stage2
|
||||
fn main() {}
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[0m[1m[33mwarning[0m[0m[1m: -C remark requires "-C debuginfo=n" to show source locations[0m
|
||||
|
29
tests/ui/diagnostic-flags/colored-session-opt-error.svg
Normal file
29
tests/ui/diagnostic-flags/colored-session-opt-error.svg
Normal file
|
@ -0,0 +1,29 @@
|
|||
<svg width="740px" height="74px" xmlns="http://www.w3.org/2000/svg">
|
||||
<style>
|
||||
.fg { fill: #AAAAAA }
|
||||
.bg { background: #000000 }
|
||||
.fg-yellow { fill: #AA5500 }
|
||||
.container {
|
||||
padding: 0 10px;
|
||||
line-height: 18px;
|
||||
}
|
||||
.bold { font-weight: bold; }
|
||||
tspan {
|
||||
font: 14px SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
|
||||
white-space: pre;
|
||||
line-height: 18px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<rect width="100%" height="100%" y="0" rx="4.5" class="bg" />
|
||||
|
||||
<text xml:space="preserve" class="container fg">
|
||||
<tspan x="10px" y="28px"><tspan class="fg-yellow bold">warning</tspan><tspan class="bold">: -C remark requires "-C debuginfo=n" to show source locations</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="46px">
|
||||
</tspan>
|
||||
<tspan x="10px" y="64px">
|
||||
</tspan>
|
||||
</text>
|
||||
|
||||
</svg>
|
After Width: | Height: | Size: 817 B |
|
@ -1,22 +0,0 @@
|
|||
[0m[1m[38;5;9merror[E0308][0m[0m[1m: mismatched types[0m
|
||||
[0m [0m[0m[1m[38;5;12m--> [0m[0m$DIR/highlighting.rs:26:11[0m
|
||||
[0m [0m[0m[1m[38;5;12m|[0m
|
||||
[0m[1m[38;5;12mLL[0m[0m [0m[0m[1m[38;5;12m|[0m[0m [0m[0m query(wrapped_fn);[0m
|
||||
[0m [0m[0m[1m[38;5;12m| [0m[0m [0m[0m[1m[38;5;12m-----[0m[0m [0m[0m[1m[38;5;9m^^^^^^^^^^[0m[0m [0m[0m[1m[38;5;9mone type is more general than the other[0m
|
||||
[0m [0m[0m[1m[38;5;12m| [0m[0m [0m[0m[1m[38;5;12m|[0m
|
||||
[0m [0m[0m[1m[38;5;12m| [0m[0m [0m[0m[1m[38;5;12marguments to this function are incorrect[0m
|
||||
[0m [0m[0m[1m[38;5;12m|[0m
|
||||
[0m [0m[0m[1m[38;5;12m= [0m[0m[1mnote[0m[0m: expected fn pointer `[0m[0m[1m[35mfor<'a> [0m[0mfn(Box<[0m[0m[1m[35m(dyn Any + Send + 'a)[0m[0m>) -> Pin<_>`[0m
|
||||
[0m found fn item `fn(Box<[0m[0m[1m[35m(dyn Any + Send + 'static)[0m[0m>) -> Pin<_> {wrapped_fn}`[0m
|
||||
[0m[1m[38;5;10mnote[0m[0m: function defined here[0m
|
||||
[0m [0m[0m[1m[38;5;12m--> [0m[0m$DIR/highlighting.rs:15:4[0m
|
||||
[0m [0m[0m[1m[38;5;12m|[0m
|
||||
[0m[1m[38;5;12mLL[0m[0m [0m[0m[1m[38;5;12m|[0m[0m [0m[0mfn query(_: fn(Box<(dyn Any + Send + '_)>) -> Pin<Box<([0m
|
||||
[0m [0m[0m[1m[38;5;12m| [0m[0m [0m[0m[1m[38;5;12m____[0m[0m[1m[38;5;10m^^^^^[0m[0m[1m[38;5;12m_-[0m
|
||||
[0m[1m[38;5;12mLL[0m[0m [0m[0m[1m[38;5;12m|[0m[0m [0m[0m[1m[38;5;12m|[0m[0m [0m[0m dyn Future<Output = Result<Box<(dyn Any + 'static)>, String>> + Send + 'static[0m
|
||||
[0m[1m[38;5;12mLL[0m[0m [0m[0m[1m[38;5;12m|[0m[0m [0m[0m[1m[38;5;12m|[0m[0m [0m[0m)>>) {}[0m
|
||||
[0m [0m[0m[1m[38;5;12m| [0m[0m[1m[38;5;12m|___-[0m
|
||||
|
||||
[0m[1m[38;5;9merror[0m[0m[1m: aborting due to 1 previous error[0m
|
||||
|
||||
[0m[1mFor more information about this error, try `rustc --explain E0308`.[0m
|
|
@ -3,10 +3,8 @@
|
|||
//@ compile-flags: --error-format=human --color=always
|
||||
//@ error-pattern:[35mfor<'a> [0m
|
||||
//@ edition:2018
|
||||
|
||||
//@ revisions: windows not-windows
|
||||
//@ [windows]only-windows
|
||||
//@ [not-windows]ignore-windows
|
||||
// Temporary until next release:
|
||||
//@ ignore-stage2
|
||||
|
||||
use core::pin::Pin;
|
||||
use core::future::Future;
|
||||
|
|
72
tests/ui/error-emitter/highlighting.svg
Normal file
72
tests/ui/error-emitter/highlighting.svg
Normal file
|
@ -0,0 +1,72 @@
|
|||
<svg width="785px" height="434px" xmlns="http://www.w3.org/2000/svg">
|
||||
<style>
|
||||
.fg { fill: #AAAAAA }
|
||||
.bg { background: #000000 }
|
||||
.fg-ansi256-009 { fill: #FF5555 }
|
||||
.fg-ansi256-010 { fill: #55FF55 }
|
||||
.fg-ansi256-012 { fill: #5555FF }
|
||||
.fg-magenta { fill: #AA00AA }
|
||||
.container {
|
||||
padding: 0 10px;
|
||||
line-height: 18px;
|
||||
}
|
||||
.bold { font-weight: bold; }
|
||||
tspan {
|
||||
font: 14px SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
|
||||
white-space: pre;
|
||||
line-height: 18px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<rect width="100%" height="100%" y="0" rx="4.5" class="bg" />
|
||||
|
||||
<text xml:space="preserve" class="container fg">
|
||||
<tspan x="10px" y="28px"><tspan class="fg-ansi256-009 bold">error[E0308]</tspan><tspan class="bold">: mismatched types</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="46px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--> </tspan><tspan>$DIR/highlighting.rs:24:11</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="64px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="82px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> query(wrapped_fn);</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="100px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">| </tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">-----</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">^^^^^^^^^^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">one type is more general than the other</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="118px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">| </tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="136px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">| </tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">arguments to this function are incorrect</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="154px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="172px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">note</tspan><tspan>: expected fn pointer `</tspan><tspan class="fg-magenta bold">for<'a> </tspan><tspan>fn(Box<</tspan><tspan class="fg-magenta bold">(dyn Any + Send + 'a)</tspan><tspan>>) -> Pin<_>`</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="190px"><tspan> found fn item `fn(Box<</tspan><tspan class="fg-magenta bold">(dyn Any + Send + 'static)</tspan><tspan>>) -> Pin<_> {wrapped_fn}`</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="208px"><tspan class="fg-ansi256-010 bold">note</tspan><tspan>: function defined here</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="226px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--> </tspan><tspan>$DIR/highlighting.rs:13:4</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="244px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="262px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> fn query(_: fn(Box<(dyn Any + Send + '_)>) -> Pin<Box<(</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="280px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">| </tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">____</tspan><tspan class="fg-ansi256-010 bold">^^^^^</tspan><tspan class="fg-ansi256-012 bold">_-</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="298px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> dyn Future<Output = Result<Box<(dyn Any + 'static)>, String>> + Send + 'static</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="316px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> )>>) {}</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="334px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">| </tspan><tspan class="fg-ansi256-012 bold">|___-</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="352px">
|
||||
</tspan>
|
||||
<tspan x="10px" y="370px"><tspan class="fg-ansi256-009 bold">error</tspan><tspan class="bold">: aborting due to 1 previous error</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="388px">
|
||||
</tspan>
|
||||
<tspan x="10px" y="406px"><tspan class="bold">For more information about this error, try `rustc --explain E0308`.</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="424px">
|
||||
</tspan>
|
||||
</text>
|
||||
|
||||
</svg>
|
After Width: | Height: | Size: 4.5 KiB |
|
@ -1,22 +0,0 @@
|
|||
[0m[1m[38;5;9merror[E0308][0m[0m[1m[38;5;15m: mismatched types[0m
|
||||
[0m [0m[0m[1m[38;5;14m--> [0m[0m$DIR/highlighting.rs:26:11[0m
|
||||
[0m [0m[0m[1m[38;5;14m|[0m
|
||||
[0m[1m[38;5;14mLL[0m[0m [0m[0m[1m[38;5;14m|[0m[0m [0m[0m query(wrapped_fn);[0m
|
||||
[0m [0m[0m[1m[38;5;14m| [0m[0m [0m[0m[1m[38;5;14m-----[0m[0m [0m[0m[1m[38;5;9m^^^^^^^^^^[0m[0m [0m[0m[1m[38;5;9mone type is more general than the other[0m
|
||||
[0m [0m[0m[1m[38;5;14m| [0m[0m [0m[0m[1m[38;5;14m|[0m
|
||||
[0m [0m[0m[1m[38;5;14m| [0m[0m [0m[0m[1m[38;5;14marguments to this function are incorrect[0m
|
||||
[0m [0m[0m[1m[38;5;14m|[0m
|
||||
[0m [0m[0m[1m[38;5;14m= [0m[0m[1m[38;5;15mnote[0m[0m: expected fn pointer `[0m[0m[1m[35mfor<'a> [0m[0mfn(Box<[0m[0m[1m[35m(dyn Any + Send + 'a)[0m[0m>) -> Pin<_>`[0m
|
||||
[0m found fn item `fn(Box<[0m[0m[1m[35m(dyn Any + Send + 'static)[0m[0m>) -> Pin<_> {wrapped_fn}`[0m
|
||||
[0m[1m[38;5;10mnote[0m[0m: function defined here[0m
|
||||
[0m [0m[0m[1m[38;5;14m--> [0m[0m$DIR/highlighting.rs:15:4[0m
|
||||
[0m [0m[0m[1m[38;5;14m|[0m
|
||||
[0m[1m[38;5;14mLL[0m[0m [0m[0m[1m[38;5;14m|[0m[0m [0m[0mfn query(_: fn(Box<(dyn Any + Send + '_)>) -> Pin<Box<([0m
|
||||
[0m [0m[0m[1m[38;5;14m| [0m[0m [0m[0m[1m[38;5;14m____[0m[0m[1m[38;5;10m^^^^^[0m[0m[1m[38;5;14m_-[0m
|
||||
[0m[1m[38;5;14mLL[0m[0m [0m[0m[1m[38;5;14m|[0m[0m [0m[0m[1m[38;5;14m|[0m[0m [0m[0m dyn Future<Output = Result<Box<(dyn Any + 'static)>, String>> + Send + 'static[0m
|
||||
[0m[1m[38;5;14mLL[0m[0m [0m[0m[1m[38;5;14m|[0m[0m [0m[0m[1m[38;5;14m|[0m[0m [0m[0m)>>) {}[0m
|
||||
[0m [0m[0m[1m[38;5;14m| [0m[0m[1m[38;5;14m|___-[0m
|
||||
|
||||
[0m[1m[38;5;9merror[0m[0m[1m[38;5;15m: aborting due to 1 previous error[0m
|
||||
|
||||
[0m[1m[38;5;15mFor more information about this error, try `rustc --explain E0308`.[0m
|
73
tests/ui/error-emitter/highlighting.windows.svg
Normal file
73
tests/ui/error-emitter/highlighting.windows.svg
Normal file
|
@ -0,0 +1,73 @@
|
|||
<svg width="785px" height="434px" xmlns="http://www.w3.org/2000/svg">
|
||||
<style>
|
||||
.fg { fill: #AAAAAA }
|
||||
.bg { background: #000000 }
|
||||
.fg-ansi256-009 { fill: #FF5555 }
|
||||
.fg-ansi256-010 { fill: #55FF55 }
|
||||
.fg-ansi256-014 { fill: #55FFFF }
|
||||
.fg-ansi256-015 { fill: #FFFFFF }
|
||||
.fg-magenta { fill: #AA00AA }
|
||||
.container {
|
||||
padding: 0 10px;
|
||||
line-height: 18px;
|
||||
}
|
||||
.bold { font-weight: bold; }
|
||||
tspan {
|
||||
font: 14px SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
|
||||
white-space: pre;
|
||||
line-height: 18px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<rect width="100%" height="100%" y="0" rx="4.5" class="bg" />
|
||||
|
||||
<text xml:space="preserve" class="container fg">
|
||||
<tspan x="10px" y="28px"><tspan class="fg-ansi256-009 bold">error[E0308]</tspan><tspan class="fg-ansi256-015 bold">: mismatched types</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="46px"><tspan> </tspan><tspan class="fg-ansi256-014 bold">--> </tspan><tspan>$DIR/highlighting.rs:24:11</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="64px"><tspan> </tspan><tspan class="fg-ansi256-014 bold">|</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="82px"><tspan class="fg-ansi256-014 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-014 bold">|</tspan><tspan> query(wrapped_fn);</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="100px"><tspan> </tspan><tspan class="fg-ansi256-014 bold">| </tspan><tspan> </tspan><tspan class="fg-ansi256-014 bold">-----</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">^^^^^^^^^^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">one type is more general than the other</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="118px"><tspan> </tspan><tspan class="fg-ansi256-014 bold">| </tspan><tspan> </tspan><tspan class="fg-ansi256-014 bold">|</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="136px"><tspan> </tspan><tspan class="fg-ansi256-014 bold">| </tspan><tspan> </tspan><tspan class="fg-ansi256-014 bold">arguments to this function are incorrect</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="154px"><tspan> </tspan><tspan class="fg-ansi256-014 bold">|</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="172px"><tspan> </tspan><tspan class="fg-ansi256-014 bold">= </tspan><tspan class="fg-ansi256-015 bold">note</tspan><tspan>: expected fn pointer `</tspan><tspan class="fg-magenta bold">for<'a> </tspan><tspan>fn(Box<</tspan><tspan class="fg-magenta bold">(dyn Any + Send + 'a)</tspan><tspan>>) -> Pin<_>`</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="190px"><tspan> found fn item `fn(Box<</tspan><tspan class="fg-magenta bold">(dyn Any + Send + 'static)</tspan><tspan>>) -> Pin<_> {wrapped_fn}`</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="208px"><tspan class="fg-ansi256-010 bold">note</tspan><tspan>: function defined here</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="226px"><tspan> </tspan><tspan class="fg-ansi256-014 bold">--> </tspan><tspan>$DIR/highlighting.rs:13:4</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="244px"><tspan> </tspan><tspan class="fg-ansi256-014 bold">|</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="262px"><tspan class="fg-ansi256-014 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-014 bold">|</tspan><tspan> fn query(_: fn(Box<(dyn Any + Send + '_)>) -> Pin<Box<(</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="280px"><tspan> </tspan><tspan class="fg-ansi256-014 bold">| </tspan><tspan> </tspan><tspan class="fg-ansi256-014 bold">____</tspan><tspan class="fg-ansi256-010 bold">^^^^^</tspan><tspan class="fg-ansi256-014 bold">_-</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="298px"><tspan class="fg-ansi256-014 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-014 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-014 bold">|</tspan><tspan> dyn Future<Output = Result<Box<(dyn Any + 'static)>, String>> + Send + 'static</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="316px"><tspan class="fg-ansi256-014 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-014 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-014 bold">|</tspan><tspan> )>>) {}</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="334px"><tspan> </tspan><tspan class="fg-ansi256-014 bold">| </tspan><tspan class="fg-ansi256-014 bold">|___-</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="352px">
|
||||
</tspan>
|
||||
<tspan x="10px" y="370px"><tspan class="fg-ansi256-009 bold">error</tspan><tspan class="fg-ansi256-015 bold">: aborting due to 1 previous error</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="388px">
|
||||
</tspan>
|
||||
<tspan x="10px" y="406px"><tspan class="fg-ansi256-015 bold">For more information about this error, try `rustc --explain E0308`.</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="424px">
|
||||
</tspan>
|
||||
</text>
|
||||
|
||||
</svg>
|
After Width: | Height: | Size: 4.6 KiB |
|
@ -1,46 +0,0 @@
|
|||
[0m[1m[38;5;9merror[E0106][0m[0m[1m: missing lifetime specifier[0m
|
||||
[0m [0m[0m[1m[38;5;12m--> [0m[0m$DIR/multiline-multipart-suggestion.rs:8:34[0m
|
||||
[0m [0m[0m[1m[38;5;12m|[0m
|
||||
[0m[1m[38;5;12mLL[0m[0m [0m[0m[1m[38;5;12m|[0m[0m [0m[0mfn short(foo_bar: &Vec<&i32>) -> &i32 {[0m
|
||||
[0m [0m[0m[1m[38;5;12m| [0m[0m [0m[0m[1m[38;5;12m----------[0m[0m [0m[0m[1m[38;5;9m^[0m[0m [0m[0m[1m[38;5;9mexpected named lifetime parameter[0m
|
||||
[0m [0m[0m[1m[38;5;12m|[0m
|
||||
[0m [0m[0m[1m[38;5;12m= [0m[0m[1mhelp[0m[0m: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from[0m
|
||||
[0m[1m[38;5;14mhelp[0m[0m: consider introducing a named lifetime parameter[0m
|
||||
[0m [0m[0m[1m[38;5;12m|[0m
|
||||
[0m[1m[38;5;12mLL[0m[0m [0m[0m[1m[38;5;12m| [0m[0mfn short[0m[0m[38;5;10m<'a>[0m[0m(foo_bar: &[0m[0m[38;5;10m'a [0m[0mVec<&[0m[0m[38;5;10m'a [0m[0mi32>) -> &[0m[0m[38;5;10m'a [0m[0mi32 {[0m
|
||||
[0m [0m[0m[1m[38;5;12m|[0m[0m [0m[0m[38;5;10m++++[0m[0m [0m[0m[38;5;10m++[0m[0m [0m[0m[38;5;10m++[0m[0m [0m[0m[38;5;10m++[0m
|
||||
|
||||
[0m[1m[38;5;9merror[E0106][0m[0m[1m: missing lifetime specifier[0m
|
||||
[0m [0m[0m[1m[38;5;12m--> [0m[0m$DIR/multiline-multipart-suggestion.rs:15:6[0m
|
||||
[0m [0m[0m[1m[38;5;12m|[0m
|
||||
[0m[1m[38;5;12mLL[0m[0m [0m[0m[1m[38;5;12m|[0m[0m [0m[0m foo_bar: &Vec<&i32>,[0m
|
||||
[0m [0m[0m[1m[38;5;12m| [0m[0m [0m[0m[1m[38;5;12m----------[0m
|
||||
[0m[1m[38;5;12mLL[0m[0m [0m[0m[1m[38;5;12m|[0m[0m [0m[0m something_very_long_so_that_the_line_will_wrap_around__________: i32,[0m
|
||||
[0m[1m[38;5;12mLL[0m[0m [0m[0m[1m[38;5;12m|[0m[0m [0m[0m) -> &i32 {[0m
|
||||
[0m [0m[0m[1m[38;5;12m| [0m[0m [0m[0m[1m[38;5;9m^[0m[0m [0m[0m[1m[38;5;9mexpected named lifetime parameter[0m
|
||||
[0m [0m[0m[1m[38;5;12m|[0m
|
||||
[0m [0m[0m[1m[38;5;12m= [0m[0m[1mhelp[0m[0m: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from[0m
|
||||
[0m[1m[38;5;14mhelp[0m[0m: consider introducing a named lifetime parameter[0m
|
||||
[0m [0m[0m[1m[38;5;12m|[0m
|
||||
[0m[1m[38;5;12mLL[0m[0m [0m[0m[38;5;10m~ [0m[0mfn long[0m[0m[38;5;10m<'a>[0m[0m([0m
|
||||
[0m[1m[38;5;12mLL[0m[0m [0m[0m[38;5;10m~ [0m[0m foo_bar: &[0m[0m[38;5;10m'a [0m[0mVec<&[0m[0m[38;5;10m'a [0m[0mi32>,[0m
|
||||
[0m[1m[38;5;12mLL[0m[0m [0m[0m[1m[38;5;12m| [0m[0m something_very_long_so_that_the_line_will_wrap_around__________: i32,[0m
|
||||
[0m[1m[38;5;12mLL[0m[0m [0m[0m[38;5;10m~ [0m[0m) -> &[0m[0m[38;5;10m'a [0m[0mi32 {[0m
|
||||
[0m [0m[0m[1m[38;5;12m|[0m
|
||||
|
||||
[0m[1m[38;5;9merror[E0106][0m[0m[1m: missing lifetime specifier[0m
|
||||
[0m [0m[0m[1m[38;5;12m--> [0m[0m$DIR/multiline-multipart-suggestion.rs:20:29[0m
|
||||
[0m [0m[0m[1m[38;5;12m|[0m
|
||||
[0m[1m[38;5;12mLL[0m[0m [0m[0m[1m[38;5;12m|[0m[0m [0m[0m foo_bar: &Vec<&i32>) -> &i32 {[0m
|
||||
[0m [0m[0m[1m[38;5;12m| [0m[0m [0m[0m[1m[38;5;12m----------[0m[0m [0m[0m[1m[38;5;9m^[0m[0m [0m[0m[1m[38;5;9mexpected named lifetime parameter[0m
|
||||
[0m [0m[0m[1m[38;5;12m|[0m
|
||||
[0m [0m[0m[1m[38;5;12m= [0m[0m[1mhelp[0m[0m: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from[0m
|
||||
[0m[1m[38;5;14mhelp[0m[0m: consider introducing a named lifetime parameter[0m
|
||||
[0m [0m[0m[1m[38;5;12m|[0m
|
||||
[0m[1m[38;5;12mLL[0m[0m [0m[0m[38;5;10m~ [0m[0mfn long2[0m[0m[38;5;10m<'a>[0m[0m([0m
|
||||
[0m[1m[38;5;12mLL[0m[0m [0m[0m[38;5;10m~ [0m[0m foo_bar: &[0m[0m[38;5;10m'a [0m[0mVec<&[0m[0m[38;5;10m'a [0m[0mi32>) -> &[0m[0m[38;5;10m'a [0m[0mi32 {[0m
|
||||
[0m [0m[0m[1m[38;5;12m|[0m
|
||||
|
||||
[0m[1m[38;5;9merror[0m[0m[1m: aborting due to 3 previous errors[0m
|
||||
|
||||
[0m[1mFor more information about this error, try `rustc --explain E0106`.[0m
|
|
@ -1,9 +1,7 @@
|
|||
//@ compile-flags: --error-format=human --color=always
|
||||
//@ error-pattern: missing lifetime specifier
|
||||
|
||||
//@ revisions: windows not-windows
|
||||
//@ [windows]only-windows
|
||||
//@ [not-windows]ignore-windows
|
||||
// Temporary until next release:
|
||||
//@ ignore-stage2
|
||||
|
||||
fn short(foo_bar: &Vec<&i32>) -> &i32 {
|
||||
&12
|
||||
|
|
120
tests/ui/error-emitter/multiline-multipart-suggestion.svg
Normal file
120
tests/ui/error-emitter/multiline-multipart-suggestion.svg
Normal file
|
@ -0,0 +1,120 @@
|
|||
<svg width="1306px" height="866px" xmlns="http://www.w3.org/2000/svg">
|
||||
<style>
|
||||
.fg { fill: #AAAAAA }
|
||||
.bg { background: #000000 }
|
||||
.fg-ansi256-009 { fill: #FF5555 }
|
||||
.fg-ansi256-010 { fill: #55FF55 }
|
||||
.fg-ansi256-012 { fill: #5555FF }
|
||||
.fg-ansi256-014 { fill: #55FFFF }
|
||||
.container {
|
||||
padding: 0 10px;
|
||||
line-height: 18px;
|
||||
}
|
||||
.bold { font-weight: bold; }
|
||||
tspan {
|
||||
font: 14px SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
|
||||
white-space: pre;
|
||||
line-height: 18px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<rect width="100%" height="100%" y="0" rx="4.5" class="bg" />
|
||||
|
||||
<text xml:space="preserve" class="container fg">
|
||||
<tspan x="10px" y="28px"><tspan class="fg-ansi256-009 bold">error[E0106]</tspan><tspan class="bold">: missing lifetime specifier</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="46px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--> </tspan><tspan>$DIR/multiline-multipart-suggestion.rs:6:34</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="64px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="82px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> fn short(foo_bar: &Vec<&i32>) -> &i32 {</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="100px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">| </tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">----------</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">expected named lifetime parameter</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="118px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="136px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">help</tspan><tspan>: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="154px"><tspan class="fg-ansi256-014 bold">help</tspan><tspan>: consider introducing a named lifetime parameter</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="172px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="190px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">| </tspan><tspan>fn short</tspan><tspan class="fg-ansi256-010"><'a></tspan><tspan>(foo_bar: &</tspan><tspan class="fg-ansi256-010">'a </tspan><tspan>Vec<&</tspan><tspan class="fg-ansi256-010">'a </tspan><tspan>i32>) -> &</tspan><tspan class="fg-ansi256-010">'a </tspan><tspan>i32 {</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="208px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-010">++++</tspan><tspan> </tspan><tspan class="fg-ansi256-010">++</tspan><tspan> </tspan><tspan class="fg-ansi256-010">++</tspan><tspan> </tspan><tspan class="fg-ansi256-010">++</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="226px">
|
||||
</tspan>
|
||||
<tspan x="10px" y="244px"><tspan class="fg-ansi256-009 bold">error[E0106]</tspan><tspan class="bold">: missing lifetime specifier</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="262px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--> </tspan><tspan>$DIR/multiline-multipart-suggestion.rs:13:6</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="280px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="298px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> foo_bar: &Vec<&i32>,</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="316px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">| </tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">----------</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="334px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> something_very_long_so_that_the_line_will_wrap_around__________: i32,</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="352px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> ) -> &i32 {</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="370px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">| </tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">expected named lifetime parameter</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="388px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="406px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">help</tspan><tspan>: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="424px"><tspan class="fg-ansi256-014 bold">help</tspan><tspan>: consider introducing a named lifetime parameter</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="442px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="460px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-010">~ </tspan><tspan>fn long</tspan><tspan class="fg-ansi256-010"><'a></tspan><tspan>(</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="478px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-010">~ </tspan><tspan> foo_bar: &</tspan><tspan class="fg-ansi256-010">'a </tspan><tspan>Vec<&</tspan><tspan class="fg-ansi256-010">'a </tspan><tspan>i32>,</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="496px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">| </tspan><tspan> something_very_long_so_that_the_line_will_wrap_around__________: i32,</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="514px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-010">~ </tspan><tspan>) -> &</tspan><tspan class="fg-ansi256-010">'a </tspan><tspan>i32 {</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="532px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="550px">
|
||||
</tspan>
|
||||
<tspan x="10px" y="568px"><tspan class="fg-ansi256-009 bold">error[E0106]</tspan><tspan class="bold">: missing lifetime specifier</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="586px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--> </tspan><tspan>$DIR/multiline-multipart-suggestion.rs:18:29</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="604px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="622px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> foo_bar: &Vec<&i32>) -> &i32 {</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="640px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">| </tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">----------</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">expected named lifetime parameter</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="658px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="676px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">help</tspan><tspan>: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="694px"><tspan class="fg-ansi256-014 bold">help</tspan><tspan>: consider introducing a named lifetime parameter</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="712px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="730px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-010">~ </tspan><tspan>fn long2</tspan><tspan class="fg-ansi256-010"><'a></tspan><tspan>(</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="748px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-010">~ </tspan><tspan> foo_bar: &</tspan><tspan class="fg-ansi256-010">'a </tspan><tspan>Vec<&</tspan><tspan class="fg-ansi256-010">'a </tspan><tspan>i32>) -> &</tspan><tspan class="fg-ansi256-010">'a </tspan><tspan>i32 {</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="766px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="784px">
|
||||
</tspan>
|
||||
<tspan x="10px" y="802px"><tspan class="fg-ansi256-009 bold">error</tspan><tspan class="bold">: aborting due to 3 previous errors</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="820px">
|
||||
</tspan>
|
||||
<tspan x="10px" y="838px"><tspan class="bold">For more information about this error, try `rustc --explain E0106`.</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="856px">
|
||||
</tspan>
|
||||
</text>
|
||||
|
||||
</svg>
|
After Width: | Height: | Size: 9 KiB |
|
@ -1,46 +0,0 @@
|
|||
[0m[1m[38;5;9merror[E0106][0m[0m[1m[38;5;15m: missing lifetime specifier[0m
|
||||
[0m [0m[0m[1m[38;5;14m--> [0m[0m$DIR/multiline-multipart-suggestion.rs:8:34[0m
|
||||
[0m [0m[0m[1m[38;5;14m|[0m
|
||||
[0m[1m[38;5;14mLL[0m[0m [0m[0m[1m[38;5;14m|[0m[0m [0m[0mfn short(foo_bar: &Vec<&i32>) -> &i32 {[0m
|
||||
[0m [0m[0m[1m[38;5;14m| [0m[0m [0m[0m[1m[38;5;14m----------[0m[0m [0m[0m[1m[38;5;9m^[0m[0m [0m[0m[1m[38;5;9mexpected named lifetime parameter[0m
|
||||
[0m [0m[0m[1m[38;5;14m|[0m
|
||||
[0m [0m[0m[1m[38;5;14m= [0m[0m[1m[38;5;15mhelp[0m[0m: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from[0m
|
||||
[0m[1m[38;5;14mhelp[0m[0m: consider introducing a named lifetime parameter[0m
|
||||
[0m [0m[0m[1m[38;5;14m|[0m
|
||||
[0m[1m[38;5;14mLL[0m[0m [0m[0m[1m[38;5;14m| [0m[0mfn short[0m[0m[38;5;10m<'a>[0m[0m(foo_bar: &[0m[0m[38;5;10m'a [0m[0mVec<&[0m[0m[38;5;10m'a [0m[0mi32>) -> &[0m[0m[38;5;10m'a [0m[0mi32 {[0m
|
||||
[0m [0m[0m[1m[38;5;14m|[0m[0m [0m[0m[38;5;10m++++[0m[0m [0m[0m[38;5;10m++[0m[0m [0m[0m[38;5;10m++[0m[0m [0m[0m[38;5;10m++[0m
|
||||
|
||||
[0m[1m[38;5;9merror[E0106][0m[0m[1m[38;5;15m: missing lifetime specifier[0m
|
||||
[0m [0m[0m[1m[38;5;14m--> [0m[0m$DIR/multiline-multipart-suggestion.rs:15:6[0m
|
||||
[0m [0m[0m[1m[38;5;14m|[0m
|
||||
[0m[1m[38;5;14mLL[0m[0m [0m[0m[1m[38;5;14m|[0m[0m [0m[0m foo_bar: &Vec<&i32>,[0m
|
||||
[0m [0m[0m[1m[38;5;14m| [0m[0m [0m[0m[1m[38;5;14m----------[0m
|
||||
[0m[1m[38;5;14mLL[0m[0m [0m[0m[1m[38;5;14m|[0m[0m [0m[0m something_very_long_so_that_the_line_will_wrap_around__________: i32,[0m
|
||||
[0m[1m[38;5;14mLL[0m[0m [0m[0m[1m[38;5;14m|[0m[0m [0m[0m) -> &i32 {[0m
|
||||
[0m [0m[0m[1m[38;5;14m| [0m[0m [0m[0m[1m[38;5;9m^[0m[0m [0m[0m[1m[38;5;9mexpected named lifetime parameter[0m
|
||||
[0m [0m[0m[1m[38;5;14m|[0m
|
||||
[0m [0m[0m[1m[38;5;14m= [0m[0m[1m[38;5;15mhelp[0m[0m: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from[0m
|
||||
[0m[1m[38;5;14mhelp[0m[0m: consider introducing a named lifetime parameter[0m
|
||||
[0m [0m[0m[1m[38;5;14m|[0m
|
||||
[0m[1m[38;5;14mLL[0m[0m [0m[0m[38;5;10m~ [0m[0mfn long[0m[0m[38;5;10m<'a>[0m[0m([0m
|
||||
[0m[1m[38;5;14mLL[0m[0m [0m[0m[38;5;10m~ [0m[0m foo_bar: &[0m[0m[38;5;10m'a [0m[0mVec<&[0m[0m[38;5;10m'a [0m[0mi32>,[0m
|
||||
[0m[1m[38;5;14mLL[0m[0m [0m[0m[1m[38;5;14m| [0m[0m something_very_long_so_that_the_line_will_wrap_around__________: i32,[0m
|
||||
[0m[1m[38;5;14mLL[0m[0m [0m[0m[38;5;10m~ [0m[0m) -> &[0m[0m[38;5;10m'a [0m[0mi32 {[0m
|
||||
[0m [0m[0m[1m[38;5;14m|[0m
|
||||
|
||||
[0m[1m[38;5;9merror[E0106][0m[0m[1m[38;5;15m: missing lifetime specifier[0m
|
||||
[0m [0m[0m[1m[38;5;14m--> [0m[0m$DIR/multiline-multipart-suggestion.rs:20:29[0m
|
||||
[0m [0m[0m[1m[38;5;14m|[0m
|
||||
[0m[1m[38;5;14mLL[0m[0m [0m[0m[1m[38;5;14m|[0m[0m [0m[0m foo_bar: &Vec<&i32>) -> &i32 {[0m
|
||||
[0m [0m[0m[1m[38;5;14m| [0m[0m [0m[0m[1m[38;5;14m----------[0m[0m [0m[0m[1m[38;5;9m^[0m[0m [0m[0m[1m[38;5;9mexpected named lifetime parameter[0m
|
||||
[0m [0m[0m[1m[38;5;14m|[0m
|
||||
[0m [0m[0m[1m[38;5;14m= [0m[0m[1m[38;5;15mhelp[0m[0m: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from[0m
|
||||
[0m[1m[38;5;14mhelp[0m[0m: consider introducing a named lifetime parameter[0m
|
||||
[0m [0m[0m[1m[38;5;14m|[0m
|
||||
[0m[1m[38;5;14mLL[0m[0m [0m[0m[38;5;10m~ [0m[0mfn long2[0m[0m[38;5;10m<'a>[0m[0m([0m
|
||||
[0m[1m[38;5;14mLL[0m[0m [0m[0m[38;5;10m~ [0m[0m foo_bar: &[0m[0m[38;5;10m'a [0m[0mVec<&[0m[0m[38;5;10m'a [0m[0mi32>) -> &[0m[0m[38;5;10m'a [0m[0mi32 {[0m
|
||||
[0m [0m[0m[1m[38;5;14m|[0m
|
||||
|
||||
[0m[1m[38;5;9merror[0m[0m[1m[38;5;15m: aborting due to 3 previous errors[0m
|
||||
|
||||
[0m[1m[38;5;15mFor more information about this error, try `rustc --explain E0106`.[0m
|
|
@ -0,0 +1,120 @@
|
|||
<svg width="1306px" height="866px" xmlns="http://www.w3.org/2000/svg">
|
||||
<style>
|
||||
.fg { fill: #AAAAAA }
|
||||
.bg { background: #000000 }
|
||||
.fg-ansi256-009 { fill: #FF5555 }
|
||||
.fg-ansi256-010 { fill: #55FF55 }
|
||||
.fg-ansi256-014 { fill: #55FFFF }
|
||||
.fg-ansi256-015 { fill: #FFFFFF }
|
||||
.container {
|
||||
padding: 0 10px;
|
||||
line-height: 18px;
|
||||
}
|
||||
.bold { font-weight: bold; }
|
||||
tspan {
|
||||
font: 14px SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
|
||||
white-space: pre;
|
||||
line-height: 18px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<rect width="100%" height="100%" y="0" rx="4.5" class="bg" />
|
||||
|
||||
<text xml:space="preserve" class="container fg">
|
||||
<tspan x="10px" y="28px"><tspan class="fg-ansi256-009 bold">error[E0106]</tspan><tspan class="fg-ansi256-015 bold">: missing lifetime specifier</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="46px"><tspan> </tspan><tspan class="fg-ansi256-014 bold">--> </tspan><tspan>$DIR/multiline-multipart-suggestion.rs:6:34</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="64px"><tspan> </tspan><tspan class="fg-ansi256-014 bold">|</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="82px"><tspan class="fg-ansi256-014 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-014 bold">|</tspan><tspan> fn short(foo_bar: &Vec<&i32>) -> &i32 {</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="100px"><tspan> </tspan><tspan class="fg-ansi256-014 bold">| </tspan><tspan> </tspan><tspan class="fg-ansi256-014 bold">----------</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">expected named lifetime parameter</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="118px"><tspan> </tspan><tspan class="fg-ansi256-014 bold">|</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="136px"><tspan> </tspan><tspan class="fg-ansi256-014 bold">= </tspan><tspan class="fg-ansi256-015 bold">help</tspan><tspan>: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="154px"><tspan class="fg-ansi256-014 bold">help</tspan><tspan>: consider introducing a named lifetime parameter</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="172px"><tspan> </tspan><tspan class="fg-ansi256-014 bold">|</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="190px"><tspan class="fg-ansi256-014 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-014 bold">| </tspan><tspan>fn short</tspan><tspan class="fg-ansi256-010"><'a></tspan><tspan>(foo_bar: &</tspan><tspan class="fg-ansi256-010">'a </tspan><tspan>Vec<&</tspan><tspan class="fg-ansi256-010">'a </tspan><tspan>i32>) -> &</tspan><tspan class="fg-ansi256-010">'a </tspan><tspan>i32 {</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="208px"><tspan> </tspan><tspan class="fg-ansi256-014 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-010">++++</tspan><tspan> </tspan><tspan class="fg-ansi256-010">++</tspan><tspan> </tspan><tspan class="fg-ansi256-010">++</tspan><tspan> </tspan><tspan class="fg-ansi256-010">++</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="226px">
|
||||
</tspan>
|
||||
<tspan x="10px" y="244px"><tspan class="fg-ansi256-009 bold">error[E0106]</tspan><tspan class="fg-ansi256-015 bold">: missing lifetime specifier</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="262px"><tspan> </tspan><tspan class="fg-ansi256-014 bold">--> </tspan><tspan>$DIR/multiline-multipart-suggestion.rs:13:6</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="280px"><tspan> </tspan><tspan class="fg-ansi256-014 bold">|</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="298px"><tspan class="fg-ansi256-014 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-014 bold">|</tspan><tspan> foo_bar: &Vec<&i32>,</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="316px"><tspan> </tspan><tspan class="fg-ansi256-014 bold">| </tspan><tspan> </tspan><tspan class="fg-ansi256-014 bold">----------</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="334px"><tspan class="fg-ansi256-014 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-014 bold">|</tspan><tspan> something_very_long_so_that_the_line_will_wrap_around__________: i32,</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="352px"><tspan class="fg-ansi256-014 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-014 bold">|</tspan><tspan> ) -> &i32 {</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="370px"><tspan> </tspan><tspan class="fg-ansi256-014 bold">| </tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">expected named lifetime parameter</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="388px"><tspan> </tspan><tspan class="fg-ansi256-014 bold">|</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="406px"><tspan> </tspan><tspan class="fg-ansi256-014 bold">= </tspan><tspan class="fg-ansi256-015 bold">help</tspan><tspan>: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="424px"><tspan class="fg-ansi256-014 bold">help</tspan><tspan>: consider introducing a named lifetime parameter</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="442px"><tspan> </tspan><tspan class="fg-ansi256-014 bold">|</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="460px"><tspan class="fg-ansi256-014 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-010">~ </tspan><tspan>fn long</tspan><tspan class="fg-ansi256-010"><'a></tspan><tspan>(</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="478px"><tspan class="fg-ansi256-014 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-010">~ </tspan><tspan> foo_bar: &</tspan><tspan class="fg-ansi256-010">'a </tspan><tspan>Vec<&</tspan><tspan class="fg-ansi256-010">'a </tspan><tspan>i32>,</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="496px"><tspan class="fg-ansi256-014 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-014 bold">| </tspan><tspan> something_very_long_so_that_the_line_will_wrap_around__________: i32,</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="514px"><tspan class="fg-ansi256-014 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-010">~ </tspan><tspan>) -> &</tspan><tspan class="fg-ansi256-010">'a </tspan><tspan>i32 {</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="532px"><tspan> </tspan><tspan class="fg-ansi256-014 bold">|</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="550px">
|
||||
</tspan>
|
||||
<tspan x="10px" y="568px"><tspan class="fg-ansi256-009 bold">error[E0106]</tspan><tspan class="fg-ansi256-015 bold">: missing lifetime specifier</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="586px"><tspan> </tspan><tspan class="fg-ansi256-014 bold">--> </tspan><tspan>$DIR/multiline-multipart-suggestion.rs:18:29</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="604px"><tspan> </tspan><tspan class="fg-ansi256-014 bold">|</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="622px"><tspan class="fg-ansi256-014 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-014 bold">|</tspan><tspan> foo_bar: &Vec<&i32>) -> &i32 {</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="640px"><tspan> </tspan><tspan class="fg-ansi256-014 bold">| </tspan><tspan> </tspan><tspan class="fg-ansi256-014 bold">----------</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">^</tspan><tspan> </tspan><tspan class="fg-ansi256-009 bold">expected named lifetime parameter</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="658px"><tspan> </tspan><tspan class="fg-ansi256-014 bold">|</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="676px"><tspan> </tspan><tspan class="fg-ansi256-014 bold">= </tspan><tspan class="fg-ansi256-015 bold">help</tspan><tspan>: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="694px"><tspan class="fg-ansi256-014 bold">help</tspan><tspan>: consider introducing a named lifetime parameter</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="712px"><tspan> </tspan><tspan class="fg-ansi256-014 bold">|</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="730px"><tspan class="fg-ansi256-014 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-010">~ </tspan><tspan>fn long2</tspan><tspan class="fg-ansi256-010"><'a></tspan><tspan>(</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="748px"><tspan class="fg-ansi256-014 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-010">~ </tspan><tspan> foo_bar: &</tspan><tspan class="fg-ansi256-010">'a </tspan><tspan>Vec<&</tspan><tspan class="fg-ansi256-010">'a </tspan><tspan>i32>) -> &</tspan><tspan class="fg-ansi256-010">'a </tspan><tspan>i32 {</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="766px"><tspan> </tspan><tspan class="fg-ansi256-014 bold">|</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="784px">
|
||||
</tspan>
|
||||
<tspan x="10px" y="802px"><tspan class="fg-ansi256-009 bold">error</tspan><tspan class="fg-ansi256-015 bold">: aborting due to 3 previous errors</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="820px">
|
||||
</tspan>
|
||||
<tspan x="10px" y="838px"><tspan class="fg-ansi256-015 bold">For more information about this error, try `rustc --explain E0106`.</tspan>
|
||||
</tspan>
|
||||
<tspan x="10px" y="856px">
|
||||
</tspan>
|
||||
</text>
|
||||
|
||||
</svg>
|
After Width: | Height: | Size: 9.1 KiB |
Loading…
Add table
Add a link
Reference in a new issue