(u8, u8)::clone(&(0, 0));
//~^ ERROR missing angle brackets in associated item path
+
+ &(u8)::clone(&0);
+ //~^ ERROR missing angle brackets in associated item path
+
+ 10 + (u8)::clone(&0);
+ //~^ ERROR missing angle brackets in associated item path
}
22 | (u8, u8)::clone(&(0, 0));
| ^^^^^^^^^^^^^^^ help: try: `<(u8, u8)>::clone`
-error: aborting due to 4 previous errors
+error: missing angle brackets in associated item path
+ --> $DIR/bad-assoc-expr.rs:25:6
+ |
+25 | &(u8)::clone(&0);
+ | ^^^^^^^^^^^ help: try: `<(u8)>::clone`
+
+error: missing angle brackets in associated item path
+ --> $DIR/bad-assoc-expr.rs:28:10
+ |
+28 | 10 + (u8)::clone(&0);
+ | ^^^^^^^^^^^ help: try: `<(u8)>::clone`
+
+error: aborting due to 6 previous errors
//~^ ERROR missing angle brackets in associated item path
//~| ERROR no associated item named `AssocItem` found for type `_` in the current scope
}
+ match &0u8 {
+ &(u8,)::AssocItem => {}
+ //~^ ERROR missing angle brackets in associated item path
+ //~| ERROR no associated item named `AssocItem` found for type `(u8,)` in the current scope
+ }
}
19 | _::AssocItem => {}
| ^^^^^^^^^^^^ help: try: `<_>::AssocItem`
+error: missing angle brackets in associated item path
+ --> $DIR/bad-assoc-pat.rs:24:10
+ |
+24 | &(u8,)::AssocItem => {}
+ | ^^^^^^^^^^^^^^^^ help: try: `<(u8,)>::AssocItem`
+
error[E0599]: no associated item named `AssocItem` found for type `[u8]` in the current scope
--> $DIR/bad-assoc-pat.rs:13:9
|
19 | _::AssocItem => {}
| ^^^^^^^^^^^^ associated item not found in `_`
-error: aborting due to 6 previous errors
+error[E0599]: no associated item named `AssocItem` found for type `(u8,)` in the current scope
+ --> $DIR/bad-assoc-pat.rs:24:10
+ |
+24 | &(u8,)::AssocItem => {}
+ | ^^^^^^^^^^^^^^^^ associated item not found in `(u8,)`
+
+error: aborting due to 8 previous errors
//~^ ERROR missing angle brackets in associated item path
//~| ERROR the type placeholder `_` is not allowed within types on item signatures
+type F = &'static (u8)::AssocTy;
+//~^ ERROR missing angle brackets in associated item path
+//~| ERROR ambiguous associated type
+
+// Qualified paths cannot appear in bounds, so the recovery
+// should apply to the whole sum and not `(Send)`.
+type G = 'static + (Send)::AssocTy;
+//~^ ERROR missing angle brackets in associated item path
+//~| ERROR ambiguous associated type
+
+// FIXME
+// This is actually a legal path with fn-like generic arguments in the middle!
+// Recovery should not apply in this context.
+type H = Fn(u8) -> (u8)::Output;
+//~^ ERROR missing angle brackets in associated item path
+//~| ERROR ambiguous associated type
+
fn main() {}
27 | type E = _::AssocTy;
| ^^^^^^^^^^ help: try: `<_>::AssocTy`
+error: missing angle brackets in associated item path
+ --> $DIR/bad-assoc-ty.rs:31:19
+ |
+31 | type F = &'static (u8)::AssocTy;
+ | ^^^^^^^^^^^^^ help: try: `<(u8)>::AssocTy`
+
+error: missing angle brackets in associated item path
+ --> $DIR/bad-assoc-ty.rs:37:10
+ |
+37 | type G = 'static + (Send)::AssocTy;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `< 'static + Send>::AssocTy`
+
+error: missing angle brackets in associated item path
+ --> $DIR/bad-assoc-ty.rs:44:20
+ |
+44 | type H = Fn(u8) -> (u8)::Output;
+ | ^^^^^^^^^^^^ help: try: `<(u8)>::Output`
+
error[E0223]: ambiguous associated type
--> $DIR/bad-assoc-ty.rs:11:10
|
27 | type E = _::AssocTy;
| ^ not allowed in type signatures
-error: aborting due to 10 previous errors
+error[E0223]: ambiguous associated type
+ --> $DIR/bad-assoc-ty.rs:31:19
+ |
+31 | type F = &'static (u8)::AssocTy;
+ | ^^^^^^^^^^^^^ ambiguous associated type
+ |
+ = note: specify the type using the syntax `<u8 as Trait>::AssocTy`
+
+error[E0223]: ambiguous associated type
+ --> $DIR/bad-assoc-ty.rs:37:10
+ |
+37 | type G = 'static + (Send)::AssocTy;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^ ambiguous associated type
+ |
+ = note: specify the type using the syntax `<std::marker::Send + 'static as Trait>::AssocTy`
+
+error[E0223]: ambiguous associated type
+ --> $DIR/bad-assoc-ty.rs:44:20
+ |
+44 | type H = Fn(u8) -> (u8)::Output;
+ | ^^^^^^^^^^^^ ambiguous associated type
+ |
+ = note: specify the type using the syntax `<u8 as Trait>::Output`
+
+error: aborting due to 16 previous errors