summaryrefslogtreecommitdiffstats
path: root/src/test/ui/namespace
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/namespace')
-rw-r--r--src/test/ui/namespace/namespace-mix.rs4
-rw-r--r--src/test/ui/namespace/namespace-mix.stderr20
2 files changed, 7 insertions, 17 deletions
diff --git a/src/test/ui/namespace/namespace-mix.rs b/src/test/ui/namespace/namespace-mix.rs
index b0f7e3c62..c5b30f148 100644
--- a/src/test/ui/namespace/namespace-mix.rs
+++ b/src/test/ui/namespace/namespace-mix.rs
@@ -97,13 +97,13 @@ mod m8 {
fn f78() {
check(m7::V{}); //~ ERROR c::Item
- check(m7::V); //~ ERROR expected value, found struct variant `m7::V`
+ check(m7::V); //~ ERROR expected value, found type alias `m7::V`
check(m8::V{}); //~ ERROR c::E
check(m8::V); //~ ERROR c::Item
}
fn xf78() {
check(xm7::V{}); //~ ERROR c::Item
- check(xm7::V); //~ ERROR expected value, found struct variant `xm7::V`
+ check(xm7::V); //~ ERROR expected value, found type alias `xm7::V`
check(xm8::V{}); //~ ERROR c::E
check(xm8::V); //~ ERROR c::Item
}
diff --git a/src/test/ui/namespace/namespace-mix.stderr b/src/test/ui/namespace/namespace-mix.stderr
index c07914df7..cb72d4a1c 100644
--- a/src/test/ui/namespace/namespace-mix.stderr
+++ b/src/test/ui/namespace/namespace-mix.stderr
@@ -52,21 +52,16 @@ LL - check(xm1::S);
LL + check(S);
|
-error[E0423]: expected value, found struct variant `m7::V`
+error[E0423]: expected value, found type alias `m7::V`
--> $DIR/namespace-mix.rs:100:11
|
-LL | V {},
- | ---- `m7::V` defined here
LL | TV(),
| ---- similarly named tuple variant `TV` defined here
...
LL | check(m7::V);
| ^^^^^
|
-help: use struct literal syntax instead
- |
-LL | check(m7::V {});
- | ~~~~~~~~
+ = note: can't use a type alias as a constructor
help: a tuple variant with a similar name exists
|
LL | check(m7::TV);
@@ -83,23 +78,18 @@ LL - check(m7::V);
LL + check(V);
|
-error[E0423]: expected value, found struct variant `xm7::V`
+error[E0423]: expected value, found type alias `xm7::V`
--> $DIR/namespace-mix.rs:106:11
|
LL | check(xm7::V);
| ^^^^^^
|
- ::: $DIR/auxiliary/namespace-mix.rs:6:9
+ ::: $DIR/auxiliary/namespace-mix.rs:7:9
|
-LL | V {},
- | - `xm7::V` defined here
LL | TV(),
| -- similarly named tuple variant `TV` defined here
|
-help: use struct literal syntax instead
- |
-LL | check(xm7::V { /* fields */ });
- | ~~~~~~~~~~~~~~~~~~~~~~~
+ = note: can't use a type alias as a constructor
help: a tuple variant with a similar name exists
|
LL | check(xm7::TV);