``` error[E0277]: the trait bound `{gen block@$DIR/gen_block_is_coro.rs:7:5: 7:8}: Coroutine` is not satisfied --> $DIR/gen_block_is_coro.rs:6:13 | LL | fn foo() -> impl Coroutine<Yield = u32, Return = ()> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Coroutine` is not implemented for `{gen block@$DIR/gen_block_is_coro.rs:7:5: 7:8}` LL | gen { yield 42 } | ---------------- return type was inferred to be `{gen block@$DIR/gen_block_is_coro.rs:7:5: 7:8}` here ``` The secondary span label is new.
69 lines
4.4 KiB
XML
69 lines
4.4 KiB
XML
<svg width="1104px" height="398px" 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[E0277]</tspan><tspan class="bold">: the trait bound `Struct: Foo<i32>` is not satisfied</tspan>
|
|
</tspan>
|
|
<tspan x="10px" y="46px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--> </tspan><tspan>$DIR/highlight-difference-between-expected-trait-and-found-trait.rs:16:13</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 foo() -> impl Foo<i32> {</tspan>
|
|
</tspan>
|
|
<tspan x="10px" y="100px"><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">the trait `Bar<i32>` is not implemented for `Struct`</tspan>
|
|
</tspan>
|
|
<tspan x="10px" y="118px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> Struct</tspan>
|
|
</tspan>
|
|
<tspan x="10px" y="136px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">------</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">return type was inferred to be `Struct` here</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">help</tspan><tspan>: the trait `Bar<</tspan><tspan class="fg-magenta bold">i32</tspan><tspan>>` </tspan><tspan class="fg-magenta bold">is not</tspan><tspan> implemented for `Struct`</tspan>
|
|
</tspan>
|
|
<tspan x="10px" y="190px"><tspan> but trait `Bar<</tspan><tspan class="fg-magenta bold">()</tspan><tspan>>` </tspan><tspan class="fg-magenta bold">is</tspan><tspan> implemented for it</tspan>
|
|
</tspan>
|
|
<tspan x="10px" y="208px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">help</tspan><tspan>: for that trait implementation, expected `</tspan><tspan class="fg-magenta bold">()</tspan><tspan>`, found `</tspan><tspan class="fg-magenta bold">i32</tspan><tspan>`</tspan>
|
|
</tspan>
|
|
<tspan x="10px" y="226px"><tspan class="fg-ansi256-010 bold">note</tspan><tspan>: required for `Struct` to implement `Foo<i32>`</tspan>
|
|
</tspan>
|
|
<tspan x="10px" y="244px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">--> </tspan><tspan>$DIR/highlight-difference-between-expected-trait-and-found-trait.rs:11:12</tspan>
|
|
</tspan>
|
|
<tspan x="10px" y="262px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan>
|
|
</tspan>
|
|
<tspan x="10px" y="280px"><tspan class="fg-ansi256-012 bold">LL</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> impl<T, K> Foo<K> for T where T: Bar<K></tspan>
|
|
</tspan>
|
|
<tspan x="10px" y="298px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan><tspan> </tspan><tspan class="fg-ansi256-010 bold">^^^^^^</tspan><tspan> </tspan><tspan class="fg-ansi256-010 bold">^</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">------</tspan><tspan> </tspan><tspan class="fg-ansi256-012 bold">unsatisfied trait bound introduced here</tspan>
|
|
</tspan>
|
|
<tspan x="10px" y="316px">
|
|
</tspan>
|
|
<tspan x="10px" y="334px"><tspan class="fg-ansi256-009 bold">error</tspan><tspan class="bold">: aborting due to 1 previous error</tspan>
|
|
</tspan>
|
|
<tspan x="10px" y="352px">
|
|
</tspan>
|
|
<tspan x="10px" y="370px"><tspan class="bold">For more information about this error, try `rustc --explain E0277`.</tspan>
|
|
</tspan>
|
|
<tspan x="10px" y="388px">
|
|
</tspan>
|
|
</text>
|
|
|
|
</svg>
|