Point at item definition in foreign crates
This commit is contained in:
parent
089810a1cb
commit
6c0755a7dc
9 changed files with 56 additions and 12 deletions
|
|
@ -68,8 +68,10 @@ error[E0423]: expected value, found struct `XEmpty1`
|
|||
LL | let xe1 = XEmpty1;
|
||||
| ^^^^^^^
|
||||
|
|
||||
::: $DIR/auxiliary/empty-struct.rs:2:1
|
||||
::: $DIR/auxiliary/empty-struct.rs:1:1
|
||||
|
|
||||
LL | pub struct XEmpty1 {}
|
||||
| ------------------ `XEmpty1` defined here
|
||||
LL | pub struct XEmpty2;
|
||||
| ------------------- similarly named unit struct `XEmpty2` defined here
|
||||
|
|
||||
|
|
@ -88,8 +90,10 @@ error[E0423]: expected function, tuple struct or tuple variant, found struct `XE
|
|||
LL | let xe1 = XEmpty1();
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
::: $DIR/auxiliary/empty-struct.rs:2:1
|
||||
::: $DIR/auxiliary/empty-struct.rs:1:1
|
||||
|
|
||||
LL | pub struct XEmpty1 {}
|
||||
| ------------------ `XEmpty1` defined here
|
||||
LL | pub struct XEmpty2;
|
||||
| ------------------- similarly named unit struct `XEmpty2` defined here
|
||||
|
|
||||
|
|
|
|||
|
|
@ -13,8 +13,10 @@ error[E0532]: expected unit struct, unit variant or constant, found struct varia
|
|||
LL | XE::XEmpty3 => ()
|
||||
| ^^^^^^^^^^^
|
||||
|
|
||||
::: $DIR/auxiliary/empty-struct.rs:7:5
|
||||
::: $DIR/auxiliary/empty-struct.rs:6:5
|
||||
|
|
||||
LL | XEmpty3 {},
|
||||
| ------- `XE::XEmpty3` defined here
|
||||
LL | XEmpty4,
|
||||
| ------- similarly named unit variant `XEmpty4` defined here
|
||||
|
|
||||
|
|
|
|||
|
|
@ -27,8 +27,11 @@ error[E0532]: expected tuple struct or tuple variant, found struct `XEmpty1`
|
|||
LL | XEmpty1() => ()
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
::: $DIR/auxiliary/empty-struct.rs:3:1
|
||||
::: $DIR/auxiliary/empty-struct.rs:1:1
|
||||
|
|
||||
LL | pub struct XEmpty1 {}
|
||||
| ------------------ `XEmpty1` defined here
|
||||
LL | pub struct XEmpty2;
|
||||
LL | pub struct XEmpty6();
|
||||
| --------------------- similarly named tuple struct `XEmpty6` defined here
|
||||
|
|
||||
|
|
@ -70,8 +73,11 @@ error[E0532]: expected tuple struct or tuple variant, found struct `XEmpty1`
|
|||
LL | XEmpty1(..) => ()
|
||||
| ^^^^^^^^^^^
|
||||
|
|
||||
::: $DIR/auxiliary/empty-struct.rs:3:1
|
||||
::: $DIR/auxiliary/empty-struct.rs:1:1
|
||||
|
|
||||
LL | pub struct XEmpty1 {}
|
||||
| ------------------ `XEmpty1` defined here
|
||||
LL | pub struct XEmpty2;
|
||||
LL | pub struct XEmpty6();
|
||||
| --------------------- similarly named tuple struct `XEmpty6` defined here
|
||||
|
|
||||
|
|
|
|||
|
|
@ -13,8 +13,11 @@ error[E0532]: expected tuple struct or tuple variant, found struct variant `XE::
|
|||
LL | XE::XEmpty3() => ()
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
::: $DIR/auxiliary/empty-struct.rs:8:5
|
||||
::: $DIR/auxiliary/empty-struct.rs:6:5
|
||||
|
|
||||
LL | XEmpty3 {},
|
||||
| ------- `XE::XEmpty3` defined here
|
||||
LL | XEmpty4,
|
||||
LL | XEmpty5(),
|
||||
| --------- similarly named tuple variant `XEmpty5` defined here
|
||||
|
|
||||
|
|
@ -42,8 +45,11 @@ error[E0532]: expected tuple struct or tuple variant, found struct variant `XE::
|
|||
LL | XE::XEmpty3(..) => ()
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
||||
::: $DIR/auxiliary/empty-struct.rs:8:5
|
||||
::: $DIR/auxiliary/empty-struct.rs:6:5
|
||||
|
|
||||
LL | XEmpty3 {},
|
||||
| ------- `XE::XEmpty3` defined here
|
||||
LL | XEmpty4,
|
||||
LL | XEmpty5(),
|
||||
| --------- similarly named tuple variant `XEmpty5` defined here
|
||||
|
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@ LL | XE::XEmpty5 => (),
|
|||
|
|
||||
LL | XEmpty4,
|
||||
| ------- similarly named unit variant `XEmpty4` defined here
|
||||
LL | XEmpty5(),
|
||||
| --------- `XE::XEmpty5` defined here
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -74,8 +74,10 @@ error[E0423]: expected value, found struct variant `xm7::V`
|
|||
LL | check(xm7::V);
|
||||
| ^^^^^^
|
||||
|
|
||||
::: $DIR/auxiliary/namespace-mix.rs:7:9
|
||||
::: $DIR/auxiliary/namespace-mix.rs:6:9
|
||||
|
|
||||
LL | V {},
|
||||
| - `xm7::V` defined here
|
||||
LL | TV(),
|
||||
| ---- similarly named tuple variant `TV` defined here
|
||||
|
|
||||
|
|
|
|||
|
|
@ -12,6 +12,11 @@ error[E0423]: expected value, found struct variant `issue_19452_aux::Homura::Mad
|
|||
|
|
||||
LL | let homura = issue_19452_aux::Homura::Madoka;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use struct literal syntax instead: `issue_19452_aux::Homura::Madoka { /* fields */ }`
|
||||
|
|
||||
::: $DIR/auxiliary/issue-19452-aux.rs:2:5
|
||||
|
|
||||
LL | Madoka { age: u32 }
|
||||
| ------ `issue_19452_aux::Homura::Madoka` defined here
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,11 @@ error[E0423]: expected value, found struct `xcrate_unit_struct::StructWithFields
|
|||
|
|
||||
LL | let _ = xcrate_unit_struct::StructWithFields;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use struct literal syntax instead: `xcrate_unit_struct::StructWithFields { foo: val }`
|
||||
|
|
||||
::: $DIR/auxiliary/xcrate_unit_struct.rs:20:1
|
||||
|
|
||||
LL | pub struct StructWithFields {
|
||||
| --------------------------- `xcrate_unit_struct::StructWithFields` defined here
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue