summaryrefslogtreecommitdiffstats
path: root/tests/ui/did_you_mean
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/did_you_mean')
-rw-r--r--tests/ui/did_you_mean/bad-assoc-expr.stderr62
-rw-r--r--tests/ui/did_you_mean/bad-assoc-pat.stderr41
-rw-r--r--tests/ui/did_you_mean/bad-assoc-ty.stderr62
3 files changed, 141 insertions, 24 deletions
diff --git a/tests/ui/did_you_mean/bad-assoc-expr.stderr b/tests/ui/did_you_mean/bad-assoc-expr.stderr
index c295cac9a..b83078e21 100644
--- a/tests/ui/did_you_mean/bad-assoc-expr.stderr
+++ b/tests/ui/did_you_mean/bad-assoc-expr.stderr
@@ -2,60 +2,104 @@ error: missing angle brackets in associated item path
--> $DIR/bad-assoc-expr.rs:3:5
|
LL | [i32; 4]::clone(&a);
- | ^^^^^^^^^^^^^^^ help: try: `<[i32; 4]>::clone`
+ | ^^^^^^^^
+ |
+help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
+ |
+LL | <[i32; 4]>::clone(&a);
+ | + +
error: missing angle brackets in associated item path
--> $DIR/bad-assoc-expr.rs:6:5
|
LL | [i32]::as_ref(&a);
- | ^^^^^^^^^^^^^ help: try: `<[i32]>::as_ref`
+ | ^^^^^
+ |
+help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
+ |
+LL | <[i32]>::as_ref(&a);
+ | + +
error: missing angle brackets in associated item path
--> $DIR/bad-assoc-expr.rs:9:5
|
LL | (u8)::clone(&0);
- | ^^^^^^^^^^^ help: try: `<(u8)>::clone`
+ | ^^^^
+ |
+help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
+ |
+LL | <(u8)>::clone(&0);
+ | + +
error: missing angle brackets in associated item path
--> $DIR/bad-assoc-expr.rs:12:5
|
LL | (u8, u8)::clone(&(0, 0));
- | ^^^^^^^^^^^^^^^ help: try: `<(u8, u8)>::clone`
+ | ^^^^^^^^
+ |
+help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
+ |
+LL | <(u8, u8)>::clone(&(0, 0));
+ | + +
error: missing angle brackets in associated item path
--> $DIR/bad-assoc-expr.rs:15:6
|
LL | &(u8)::clone(&0);
- | ^^^^^^^^^^^ help: try: `<(u8)>::clone`
+ | ^^^^
+ |
+help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
+ |
+LL | &<(u8)>::clone(&0);
+ | + +
error: missing angle brackets in associated item path
--> $DIR/bad-assoc-expr.rs:18:10
|
LL | 10 + (u8)::clone(&0);
- | ^^^^^^^^^^^ help: try: `<(u8)>::clone`
+ | ^^^^
+ |
+help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
+ |
+LL | 10 + <(u8)>::clone(&0);
+ | + +
error: missing angle brackets in associated item path
--> $DIR/bad-assoc-expr.rs:32:13
|
LL | let _ = ty!()::clone(&0);
- | ^^^^^^^^^^^^ help: try: `<ty!()>::clone`
+ | ^^^^^
+ |
+help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
+ |
+LL | let _ = <ty!()>::clone(&0);
+ | + +
error: missing angle brackets in associated item path
--> $DIR/bad-assoc-expr.rs:34:5
|
LL | ty!()::clone(&0);
- | ^^^^^^^^^^^^ help: try: `<ty!()>::clone`
+ | ^^^^^
+ |
+help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
+ |
+LL | <ty!()>::clone(&0);
+ | + +
error: missing angle brackets in associated item path
--> $DIR/bad-assoc-expr.rs:23:19
|
LL | ($ty: ty) => ($ty::clone(&0))
- | ^^^^^^^^^^ help: try: `<$ty>::clone`
+ | ^^^
...
LL | expr!(u8);
| --------- in this macro invocation
|
= note: this error originates in the macro `expr` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
+ |
+LL | ($ty: ty) => (<$ty>::clone(&0))
+ | + +
error: aborting due to 9 previous errors
diff --git a/tests/ui/did_you_mean/bad-assoc-pat.stderr b/tests/ui/did_you_mean/bad-assoc-pat.stderr
index 19d173f1b..8bdeb8ffd 100644
--- a/tests/ui/did_you_mean/bad-assoc-pat.stderr
+++ b/tests/ui/did_you_mean/bad-assoc-pat.stderr
@@ -2,42 +2,71 @@ error: missing angle brackets in associated item path
--> $DIR/bad-assoc-pat.rs:3:9
|
LL | [u8]::AssocItem => {}
- | ^^^^^^^^^^^^^^^ help: try: `<[u8]>::AssocItem`
+ | ^^^^
+ |
+help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
+ |
+LL | <[u8]>::AssocItem => {}
+ | + +
error: missing angle brackets in associated item path
--> $DIR/bad-assoc-pat.rs:6:9
|
LL | (u8, u8)::AssocItem => {}
- | ^^^^^^^^^^^^^^^^^^^ help: try: `<(u8, u8)>::AssocItem`
+ | ^^^^^^^^
+ |
+help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
+ |
+LL | <(u8, u8)>::AssocItem => {}
+ | + +
error: missing angle brackets in associated item path
--> $DIR/bad-assoc-pat.rs:9:9
|
LL | _::AssocItem => {}
- | ^^^^^^^^^^^^ help: try: `<_>::AssocItem`
+ | ^
+ |
+help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
+ |
+LL | <_>::AssocItem => {}
+ | + +
error: missing angle brackets in associated item path
--> $DIR/bad-assoc-pat.rs:14:10
|
LL | &(u8,)::AssocItem => {}
- | ^^^^^^^^^^^^^^^^ help: try: `<(u8,)>::AssocItem`
+ | ^^^^^
+ |
+help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
+ |
+LL | &<(u8,)>::AssocItem => {}
+ | + +
error: missing angle brackets in associated item path
--> $DIR/bad-assoc-pat.rs:32:9
|
LL | ty!()::AssocItem => {}
- | ^^^^^^^^^^^^^^^^ help: try: `<ty!()>::AssocItem`
+ | ^^^^^
+ |
+help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
+ |
+LL | <ty!()>::AssocItem => {}
+ | + +
error: missing angle brackets in associated item path
--> $DIR/bad-assoc-pat.rs:21:19
|
LL | ($ty: ty) => ($ty::AssocItem)
- | ^^^^^^^^^^^^^^ help: try: `<$ty>::AssocItem`
+ | ^^^
...
LL | pat!(u8) => {}
| -------- in this macro invocation
|
= note: this error originates in the macro `pat` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
+ |
+LL | ($ty: ty) => (<$ty>::AssocItem)
+ | + +
error[E0599]: no associated item named `AssocItem` found for slice `[u8]` in the current scope
--> $DIR/bad-assoc-pat.rs:3:15
diff --git a/tests/ui/did_you_mean/bad-assoc-ty.stderr b/tests/ui/did_you_mean/bad-assoc-ty.stderr
index 55096e95d..efa6bb668 100644
--- a/tests/ui/did_you_mean/bad-assoc-ty.stderr
+++ b/tests/ui/did_you_mean/bad-assoc-ty.stderr
@@ -2,60 +2,104 @@ error: missing angle brackets in associated item path
--> $DIR/bad-assoc-ty.rs:1:10
|
LL | type A = [u8; 4]::AssocTy;
- | ^^^^^^^^^^^^^^^^ help: try: `<[u8; 4]>::AssocTy`
+ | ^^^^^^^
+ |
+help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
+ |
+LL | type A = <[u8; 4]>::AssocTy;
+ | + +
error: missing angle brackets in associated item path
--> $DIR/bad-assoc-ty.rs:5:10
|
LL | type B = [u8]::AssocTy;
- | ^^^^^^^^^^^^^ help: try: `<[u8]>::AssocTy`
+ | ^^^^
+ |
+help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
+ |
+LL | type B = <[u8]>::AssocTy;
+ | + +
error: missing angle brackets in associated item path
--> $DIR/bad-assoc-ty.rs:9:10
|
LL | type C = (u8)::AssocTy;
- | ^^^^^^^^^^^^^ help: try: `<(u8)>::AssocTy`
+ | ^^^^
+ |
+help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
+ |
+LL | type C = <(u8)>::AssocTy;
+ | + +
error: missing angle brackets in associated item path
--> $DIR/bad-assoc-ty.rs:13:10
|
LL | type D = (u8, u8)::AssocTy;
- | ^^^^^^^^^^^^^^^^^ help: try: `<(u8, u8)>::AssocTy`
+ | ^^^^^^^^
+ |
+help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
+ |
+LL | type D = <(u8, u8)>::AssocTy;
+ | + +
error: missing angle brackets in associated item path
--> $DIR/bad-assoc-ty.rs:17:10
|
LL | type E = _::AssocTy;
- | ^^^^^^^^^^ help: try: `<_>::AssocTy`
+ | ^
+ |
+help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
+ |
+LL | type E = <_>::AssocTy;
+ | + +
error: missing angle brackets in associated item path
--> $DIR/bad-assoc-ty.rs:21:19
|
LL | type F = &'static (u8)::AssocTy;
- | ^^^^^^^^^^^^^ help: try: `<(u8)>::AssocTy`
+ | ^^^^
+ |
+help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
+ |
+LL | type F = &'static <(u8)>::AssocTy;
+ | + +
error: missing angle brackets in associated item path
--> $DIR/bad-assoc-ty.rs:27:10
|
LL | type G = dyn 'static + (Send)::AssocTy;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `<dyn 'static + (Send)>::AssocTy`
+ | ^^^^^^^^^^^^^^^^^^^^
+ |
+help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
+ |
+LL | type G = <dyn 'static + (Send)>::AssocTy;
+ | + +
error: missing angle brackets in associated item path
--> $DIR/bad-assoc-ty.rs:46:10
|
LL | type I = ty!()::AssocTy;
- | ^^^^^^^^^^^^^^ help: try: `<ty!()>::AssocTy`
+ | ^^^^^
+ |
+help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
+ |
+LL | type I = <ty!()>::AssocTy;
+ | + +
error: missing angle brackets in associated item path
--> $DIR/bad-assoc-ty.rs:39:19
|
LL | ($ty: ty) => ($ty::AssocTy);
- | ^^^^^^^^^^^^ help: try: `<$ty>::AssocTy`
+ | ^^^
...
LL | type J = ty!(u8);
| ------- in this macro invocation
|
= note: this error originates in the macro `ty` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: types that don't start with an identifier need to be surrounded with angle brackets in qualified paths
+ |
+LL | ($ty: ty) => (<$ty>::AssocTy);
+ | + +
error[E0223]: ambiguous associated type
--> $DIR/bad-assoc-ty.rs:1:10