mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-27 07:03:45 +00:00
Added regression test for using generic parameters on modules.
This commit is contained in:
parent
5a36f9e6e1
commit
8eb1a9e4e7
@ -420,7 +420,7 @@ pub struct GenericArgs {
|
||||
/// The generic arguments for this path segment.
|
||||
pub args: HirVec<GenericArg>,
|
||||
/// Bindings (equality constraints) on associated types, if present.
|
||||
/// E.g., `Foo<A=Bar>`.
|
||||
/// E.g., `Foo<A = Bar>`.
|
||||
pub bindings: HirVec<TypeBinding>,
|
||||
/// Were arguments written in parenthesized form `Fn(T) -> U`?
|
||||
/// This is required mostly for pretty-printing and diagnostics,
|
||||
|
@ -1437,7 +1437,7 @@ impl<'o, 'gcx: 'tcx, 'tcx> dyn AstConv<'gcx, 'tcx> + 'o {
|
||||
if err_for_lt { continue }
|
||||
err_for_lt = true;
|
||||
(struct_span_err!(self.tcx().sess, lt.span, E0110,
|
||||
"lifetime parameters are not allowed on this type"),
|
||||
"lifetime arguments are not allowed on this entity"),
|
||||
lt.span,
|
||||
"lifetime")
|
||||
}
|
||||
@ -1445,12 +1445,12 @@ impl<'o, 'gcx: 'tcx, 'tcx> dyn AstConv<'gcx, 'tcx> + 'o {
|
||||
if err_for_ty { continue }
|
||||
err_for_ty = true;
|
||||
(struct_span_err!(self.tcx().sess, ty.span, E0109,
|
||||
"type parameters are not allowed on this type"),
|
||||
"type arguments are not allowed on this entity"),
|
||||
ty.span,
|
||||
"type")
|
||||
}
|
||||
};
|
||||
span_err.span_label(span, format!("{} parameter not allowed", kind))
|
||||
span_err.span_label(span, format!("{} argument not allowed", kind))
|
||||
.emit();
|
||||
if err_for_lt && err_for_ty {
|
||||
break;
|
||||
|
@ -1291,7 +1291,7 @@ You tried to give a type parameter to a type which doesn't need it. Erroneous
|
||||
code example:
|
||||
|
||||
```compile_fail,E0109
|
||||
type X = u32<i32>; // error: type parameters are not allowed on this type
|
||||
type X = u32<i32>; // error: type arguments are not allowed on this entity
|
||||
```
|
||||
|
||||
Please check that you used the correct type and recheck its definition. Perhaps
|
||||
|
@ -7,22 +7,22 @@ type AliasFixed = Enum<()>;
|
||||
impl<T> Enum<T> {
|
||||
fn ts_variant() {
|
||||
Self::TSVariant::<()>(());
|
||||
//~^ ERROR type parameters are not allowed on this type [E0109]
|
||||
//~^ ERROR type arguments are not allowed on this entity [E0109]
|
||||
Self::<()>::TSVariant(());
|
||||
//~^ ERROR type parameters are not allowed on this type [E0109]
|
||||
//~^ ERROR type arguments are not allowed on this entity [E0109]
|
||||
Self::<()>::TSVariant::<()>(());
|
||||
//~^ ERROR type parameters are not allowed on this type [E0109]
|
||||
//~^^ ERROR type parameters are not allowed on this type [E0109]
|
||||
//~^ ERROR type arguments are not allowed on this entity [E0109]
|
||||
//~^^ ERROR type arguments are not allowed on this entity [E0109]
|
||||
}
|
||||
|
||||
fn s_variant() {
|
||||
Self::SVariant::<()>(());
|
||||
//~^ ERROR type parameters are not allowed on this type [E0109]
|
||||
//~^ ERROR type arguments are not allowed on this entity [E0109]
|
||||
Self::<()>::SVariant(());
|
||||
//~^ ERROR type parameters are not allowed on this type [E0109]
|
||||
//~^ ERROR type arguments are not allowed on this entity [E0109]
|
||||
Self::<()>::SVariant::<()>(());
|
||||
//~^ ERROR type parameters are not allowed on this type [E0109]
|
||||
//~^^ ERROR type parameters are not allowed on this type [E0109]
|
||||
//~^ ERROR type arguments are not allowed on this entity [E0109]
|
||||
//~^^ ERROR type arguments are not allowed on this entity [E0109]
|
||||
}
|
||||
}
|
||||
|
||||
@ -30,36 +30,36 @@ fn main() {
|
||||
// Tuple struct variant
|
||||
|
||||
Enum::<()>::TSVariant::<()>(());
|
||||
//~^ ERROR type parameters are not allowed on this type [E0109]
|
||||
//~^ ERROR type arguments are not allowed on this entity [E0109]
|
||||
|
||||
Alias::TSVariant::<()>(());
|
||||
//~^ ERROR type parameters are not allowed on this type [E0109]
|
||||
//~^ ERROR type arguments are not allowed on this entity [E0109]
|
||||
Alias::<()>::TSVariant::<()>(());
|
||||
//~^ ERROR type parameters are not allowed on this type [E0109]
|
||||
//~^ ERROR type arguments are not allowed on this entity [E0109]
|
||||
|
||||
AliasFixed::TSVariant::<()>(());
|
||||
//~^ ERROR type parameters are not allowed on this type [E0109]
|
||||
//~^ ERROR type arguments are not allowed on this entity [E0109]
|
||||
AliasFixed::<()>::TSVariant(());
|
||||
//~^ ERROR wrong number of type arguments: expected 0, found 1 [E0107]
|
||||
AliasFixed::<()>::TSVariant::<()>(());
|
||||
//~^ ERROR type parameters are not allowed on this type [E0109]
|
||||
//~^ ERROR type arguments are not allowed on this entity [E0109]
|
||||
//~^^ ERROR wrong number of type arguments: expected 0, found 1 [E0107]
|
||||
|
||||
// Struct variant
|
||||
|
||||
Enum::<()>::SVariant::<()>(());
|
||||
//~^ ERROR type parameters are not allowed on this type [E0109]
|
||||
//~^ ERROR type arguments are not allowed on this entity [E0109]
|
||||
|
||||
Alias::SVariant::<()>(());
|
||||
//~^ ERROR type parameters are not allowed on this type [E0109]
|
||||
//~^ ERROR type arguments are not allowed on this entity [E0109]
|
||||
Alias::<()>::SVariant::<()>(());
|
||||
//~^ ERROR type parameters are not allowed on this type [E0109]
|
||||
//~^ ERROR type arguments are not allowed on this entity [E0109]
|
||||
|
||||
AliasFixed::SVariant::<()>(());
|
||||
//~^ ERROR type parameters are not allowed on this type [E0109]
|
||||
//~^ ERROR type arguments are not allowed on this entity [E0109]
|
||||
AliasFixed::<()>::SVariant(());
|
||||
//~^ ERROR wrong number of type arguments: expected 0, found 1 [E0107]
|
||||
AliasFixed::<()>::SVariant::<()>(());
|
||||
//~^ ERROR type parameters are not allowed on this type [E0109]
|
||||
//~^ ERROR type arguments are not allowed on this entity [E0109]
|
||||
//~^^ ERROR wrong number of type arguments: expected 0, found 1 [E0107]
|
||||
}
|
||||
|
@ -7,35 +7,35 @@ LL | Enum::<()>::SVariant::<()>(());
|
||||
| | did you mean `TSVariant`?
|
||||
| did you mean `Enum::SVariant { /* fields */ }`?
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/enum-variant-generic-args.rs:9:27
|
||||
|
|
||||
LL | Self::TSVariant::<()>(());
|
||||
| ^^ type parameter not allowed
|
||||
| ^^ type argument not allowed
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/enum-variant-generic-args.rs:11:16
|
||||
|
|
||||
LL | Self::<()>::TSVariant(());
|
||||
| ^^ type parameter not allowed
|
||||
| ^^ type argument not allowed
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/enum-variant-generic-args.rs:13:16
|
||||
|
|
||||
LL | Self::<()>::TSVariant::<()>(());
|
||||
| ^^ type parameter not allowed
|
||||
| ^^ type argument not allowed
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/enum-variant-generic-args.rs:13:33
|
||||
|
|
||||
LL | Self::<()>::TSVariant::<()>(());
|
||||
| ^^ type parameter not allowed
|
||||
| ^^ type argument not allowed
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/enum-variant-generic-args.rs:19:26
|
||||
|
|
||||
LL | Self::SVariant::<()>(());
|
||||
| ^^ type parameter not allowed
|
||||
| ^^ type argument not allowed
|
||||
|
||||
error[E0618]: expected function, found enum variant `<Self>::SVariant::<()>`
|
||||
--> $DIR/enum-variant-generic-args.rs:19:9
|
||||
@ -52,11 +52,11 @@ help: `<Self>::SVariant::<()>` is a unit variant, you need to write it without t
|
||||
LL | <Self>::SVariant::<()>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/enum-variant-generic-args.rs:21:16
|
||||
|
|
||||
LL | Self::<()>::SVariant(());
|
||||
| ^^ type parameter not allowed
|
||||
| ^^ type argument not allowed
|
||||
|
||||
error[E0618]: expected function, found enum variant `<Self<()>>::SVariant`
|
||||
--> $DIR/enum-variant-generic-args.rs:21:9
|
||||
@ -73,17 +73,17 @@ help: `<Self<()>>::SVariant` is a unit variant, you need to write it without the
|
||||
LL | <Self<()>>::SVariant;
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/enum-variant-generic-args.rs:23:16
|
||||
|
|
||||
LL | Self::<()>::SVariant::<()>(());
|
||||
| ^^ type parameter not allowed
|
||||
| ^^ type argument not allowed
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/enum-variant-generic-args.rs:23:32
|
||||
|
|
||||
LL | Self::<()>::SVariant::<()>(());
|
||||
| ^^ type parameter not allowed
|
||||
| ^^ type argument not allowed
|
||||
|
||||
error[E0618]: expected function, found enum variant `<Self<()>>::SVariant::<()>`
|
||||
--> $DIR/enum-variant-generic-args.rs:23:9
|
||||
@ -100,29 +100,29 @@ help: `<Self<()>>::SVariant::<()>` is a unit variant, you need to write it witho
|
||||
LL | <Self<()>>::SVariant::<()>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/enum-variant-generic-args.rs:32:29
|
||||
|
|
||||
LL | Enum::<()>::TSVariant::<()>(());
|
||||
| ^^ type parameter not allowed
|
||||
| ^^ type argument not allowed
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/enum-variant-generic-args.rs:35:24
|
||||
|
|
||||
LL | Alias::TSVariant::<()>(());
|
||||
| ^^ type parameter not allowed
|
||||
| ^^ type argument not allowed
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/enum-variant-generic-args.rs:37:30
|
||||
|
|
||||
LL | Alias::<()>::TSVariant::<()>(());
|
||||
| ^^ type parameter not allowed
|
||||
| ^^ type argument not allowed
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/enum-variant-generic-args.rs:40:29
|
||||
|
|
||||
LL | AliasFixed::TSVariant::<()>(());
|
||||
| ^^ type parameter not allowed
|
||||
| ^^ type argument not allowed
|
||||
|
||||
error[E0107]: wrong number of type arguments: expected 0, found 1
|
||||
--> $DIR/enum-variant-generic-args.rs:42:18
|
||||
@ -136,17 +136,17 @@ error[E0107]: wrong number of type arguments: expected 0, found 1
|
||||
LL | AliasFixed::<()>::TSVariant::<()>(());
|
||||
| ^^ unexpected type argument
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/enum-variant-generic-args.rs:44:35
|
||||
|
|
||||
LL | AliasFixed::<()>::TSVariant::<()>(());
|
||||
| ^^ type parameter not allowed
|
||||
| ^^ type argument not allowed
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/enum-variant-generic-args.rs:53:23
|
||||
|
|
||||
LL | Alias::SVariant::<()>(());
|
||||
| ^^ type parameter not allowed
|
||||
| ^^ type argument not allowed
|
||||
|
||||
error[E0618]: expected function, found enum variant `<Alias>::SVariant::<()>`
|
||||
--> $DIR/enum-variant-generic-args.rs:53:5
|
||||
@ -163,11 +163,11 @@ help: `<Alias>::SVariant::<()>` is a unit variant, you need to write it without
|
||||
LL | <Alias>::SVariant::<()>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/enum-variant-generic-args.rs:55:29
|
||||
|
|
||||
LL | Alias::<()>::SVariant::<()>(());
|
||||
| ^^ type parameter not allowed
|
||||
| ^^ type argument not allowed
|
||||
|
||||
error[E0618]: expected function, found enum variant `<Alias<()>>::SVariant::<()>`
|
||||
--> $DIR/enum-variant-generic-args.rs:55:5
|
||||
@ -184,11 +184,11 @@ help: `<Alias<()>>::SVariant::<()>` is a unit variant, you need to write it with
|
||||
LL | <Alias<()>>::SVariant::<()>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/enum-variant-generic-args.rs:58:28
|
||||
|
|
||||
LL | AliasFixed::SVariant::<()>(());
|
||||
| ^^ type parameter not allowed
|
||||
| ^^ type argument not allowed
|
||||
|
||||
error[E0618]: expected function, found enum variant `<AliasFixed>::SVariant::<()>`
|
||||
--> $DIR/enum-variant-generic-args.rs:58:5
|
||||
@ -232,11 +232,11 @@ error[E0107]: wrong number of type arguments: expected 0, found 1
|
||||
LL | AliasFixed::<()>::SVariant::<()>(());
|
||||
| ^^ unexpected type argument
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/enum-variant-generic-args.rs:62:34
|
||||
|
|
||||
LL | AliasFixed::<()>::SVariant::<()>(());
|
||||
| ^^ type parameter not allowed
|
||||
| ^^ type argument not allowed
|
||||
|
||||
error[E0618]: expected function, found enum variant `<AliasFixed<()>>::SVariant::<()>`
|
||||
--> $DIR/enum-variant-generic-args.rs:62:5
|
||||
|
@ -1,8 +1,8 @@
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/E0109.rs:1:14
|
||||
|
|
||||
LL | type X = u32<i32>; //~ ERROR E0109
|
||||
| ^^^ type parameter not allowed
|
||||
| ^^^ type argument not allowed
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -1,8 +1,16 @@
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
<<<<<<< HEAD
|
||||
error[E0110]: lifetime arguments are not allowed on this entity
|
||||
--> $DIR/E0110.rs:1:14
|
||||
||||||| merged common ancestors
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
--> $DIR/E0110.rs:11:14
|
||||
=======
|
||||
error[E0110]: lifetime arguments are not allowed on this entity
|
||||
--> $DIR/E0110.rs:11:14
|
||||
>>>>>>> Added regression test for using generic parameters on modules.
|
||||
|
|
||||
LL | type X = u32<'static>; //~ ERROR E0110
|
||||
| ^^^^^^^ lifetime parameter not allowed
|
||||
| ^^^^^^^ lifetime argument not allowed
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
fn is_copy<T: ::std::marker<i32>::Copy>() {}
|
||||
//~^ ERROR type parameters are not allowed on this type [E0109]
|
||||
//~^ ERROR type arguments are not allowed on this entity [E0109]
|
||||
fn main() {}
|
||||
|
@ -1,8 +1,8 @@
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/issue-22706.rs:1:29
|
||||
|
|
||||
LL | fn is_copy<T: ::std::marker<i32>::Copy>() {}
|
||||
| ^^^ type parameter not allowed
|
||||
| ^^^ type argument not allowed
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
10
src/test/ui/mod-subitem-as-enum-variant.rs
Normal file
10
src/test/ui/mod-subitem-as-enum-variant.rs
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
mod Mod {
|
||||
pub struct FakeVariant<T>(pub T);
|
||||
}
|
||||
|
||||
fn main() {
|
||||
Mod::FakeVariant::<i32>(0);
|
||||
Mod::<i32>::FakeVariant(0);
|
||||
//~^ ERROR type arguments are not allowed on this entity [E0109]
|
||||
}
|
9
src/test/ui/mod-subitem-as-enum-variant.stderr
Normal file
9
src/test/ui/mod-subitem-as-enum-variant.stderr
Normal file
@ -0,0 +1,9 @@
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/mod-subitem-as-enum-variant.rs:8:11
|
||||
|
|
||||
LL | Mod::<i32>::FakeVariant(0);
|
||||
| ^^^ type argument not allowed
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0109`.
|
@ -1,27 +1,27 @@
|
||||
fn main() {
|
||||
|
||||
let x: isize<isize>; //~ ERROR type parameters are not allowed on this type
|
||||
let x: i8<isize>; //~ ERROR type parameters are not allowed on this type
|
||||
let x: i16<isize>; //~ ERROR type parameters are not allowed on this type
|
||||
let x: i32<isize>; //~ ERROR type parameters are not allowed on this type
|
||||
let x: i64<isize>; //~ ERROR type parameters are not allowed on this type
|
||||
let x: usize<isize>; //~ ERROR type parameters are not allowed on this type
|
||||
let x: u8<isize>; //~ ERROR type parameters are not allowed on this type
|
||||
let x: u16<isize>; //~ ERROR type parameters are not allowed on this type
|
||||
let x: u32<isize>; //~ ERROR type parameters are not allowed on this type
|
||||
let x: u64<isize>; //~ ERROR type parameters are not allowed on this type
|
||||
let x: char<isize>; //~ ERROR type parameters are not allowed on this type
|
||||
let x: isize<isize>; //~ ERROR type arguments are not allowed on this entity
|
||||
let x: i8<isize>; //~ ERROR type arguments are not allowed on this entity
|
||||
let x: i16<isize>; //~ ERROR type arguments are not allowed on this entity
|
||||
let x: i32<isize>; //~ ERROR type arguments are not allowed on this entity
|
||||
let x: i64<isize>; //~ ERROR type arguments are not allowed on this entity
|
||||
let x: usize<isize>; //~ ERROR type arguments are not allowed on this entity
|
||||
let x: u8<isize>; //~ ERROR type arguments are not allowed on this entity
|
||||
let x: u16<isize>; //~ ERROR type arguments are not allowed on this entity
|
||||
let x: u32<isize>; //~ ERROR type arguments are not allowed on this entity
|
||||
let x: u64<isize>; //~ ERROR type arguments are not allowed on this entity
|
||||
let x: char<isize>; //~ ERROR type arguments are not allowed on this entity
|
||||
|
||||
let x: isize<'static>; //~ ERROR lifetime parameters are not allowed on this type
|
||||
let x: i8<'static>; //~ ERROR lifetime parameters are not allowed on this type
|
||||
let x: i16<'static>; //~ ERROR lifetime parameters are not allowed on this type
|
||||
let x: i32<'static>; //~ ERROR lifetime parameters are not allowed on this type
|
||||
let x: i64<'static>; //~ ERROR lifetime parameters are not allowed on this type
|
||||
let x: usize<'static>; //~ ERROR lifetime parameters are not allowed on this type
|
||||
let x: u8<'static>; //~ ERROR lifetime parameters are not allowed on this type
|
||||
let x: u16<'static>; //~ ERROR lifetime parameters are not allowed on this type
|
||||
let x: u32<'static>; //~ ERROR lifetime parameters are not allowed on this type
|
||||
let x: u64<'static>; //~ ERROR lifetime parameters are not allowed on this type
|
||||
let x: char<'static>; //~ ERROR lifetime parameters are not allowed on this type
|
||||
let x: isize<'static>; //~ ERROR lifetime arguments are not allowed on this entity
|
||||
let x: i8<'static>; //~ ERROR lifetime arguments are not allowed on this entity
|
||||
let x: i16<'static>; //~ ERROR lifetime arguments are not allowed on this entity
|
||||
let x: i32<'static>; //~ ERROR lifetime arguments are not allowed on this entity
|
||||
let x: i64<'static>; //~ ERROR lifetime arguments are not allowed on this entity
|
||||
let x: usize<'static>; //~ ERROR lifetime arguments are not allowed on this entity
|
||||
let x: u8<'static>; //~ ERROR lifetime arguments are not allowed on this entity
|
||||
let x: u16<'static>; //~ ERROR lifetime arguments are not allowed on this entity
|
||||
let x: u32<'static>; //~ ERROR lifetime arguments are not allowed on this entity
|
||||
let x: u64<'static>; //~ ERROR lifetime arguments are not allowed on this entity
|
||||
let x: char<'static>; //~ ERROR lifetime arguments are not allowed on this entity
|
||||
|
||||
}
|
||||
|
@ -1,134 +1,134 @@
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/prim-with-args.rs:3:14
|
||||
|
|
||||
LL | let x: isize<isize>; //~ ERROR type parameters are not allowed on this type
|
||||
| ^^^^^ type parameter not allowed
|
||||
LL | let x: isize<isize>; //~ ERROR type arguments are not allowed on this entity
|
||||
| ^^^^^ type argument not allowed
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/prim-with-args.rs:4:11
|
||||
|
|
||||
LL | let x: i8<isize>; //~ ERROR type parameters are not allowed on this type
|
||||
| ^^^^^ type parameter not allowed
|
||||
LL | let x: i8<isize>; //~ ERROR type arguments are not allowed on this entity
|
||||
| ^^^^^ type argument not allowed
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/prim-with-args.rs:5:12
|
||||
|
|
||||
LL | let x: i16<isize>; //~ ERROR type parameters are not allowed on this type
|
||||
| ^^^^^ type parameter not allowed
|
||||
LL | let x: i16<isize>; //~ ERROR type arguments are not allowed on this entity
|
||||
| ^^^^^ type argument not allowed
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/prim-with-args.rs:6:12
|
||||
|
|
||||
LL | let x: i32<isize>; //~ ERROR type parameters are not allowed on this type
|
||||
| ^^^^^ type parameter not allowed
|
||||
LL | let x: i32<isize>; //~ ERROR type arguments are not allowed on this entity
|
||||
| ^^^^^ type argument not allowed
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/prim-with-args.rs:7:12
|
||||
|
|
||||
LL | let x: i64<isize>; //~ ERROR type parameters are not allowed on this type
|
||||
| ^^^^^ type parameter not allowed
|
||||
LL | let x: i64<isize>; //~ ERROR type arguments are not allowed on this entity
|
||||
| ^^^^^ type argument not allowed
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/prim-with-args.rs:8:14
|
||||
|
|
||||
LL | let x: usize<isize>; //~ ERROR type parameters are not allowed on this type
|
||||
| ^^^^^ type parameter not allowed
|
||||
LL | let x: usize<isize>; //~ ERROR type arguments are not allowed on this entity
|
||||
| ^^^^^ type argument not allowed
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/prim-with-args.rs:9:11
|
||||
|
|
||||
LL | let x: u8<isize>; //~ ERROR type parameters are not allowed on this type
|
||||
| ^^^^^ type parameter not allowed
|
||||
LL | let x: u8<isize>; //~ ERROR type arguments are not allowed on this entity
|
||||
| ^^^^^ type argument not allowed
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/prim-with-args.rs:10:12
|
||||
|
|
||||
LL | let x: u16<isize>; //~ ERROR type parameters are not allowed on this type
|
||||
| ^^^^^ type parameter not allowed
|
||||
LL | let x: u16<isize>; //~ ERROR type arguments are not allowed on this entity
|
||||
| ^^^^^ type argument not allowed
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/prim-with-args.rs:11:12
|
||||
|
|
||||
LL | let x: u32<isize>; //~ ERROR type parameters are not allowed on this type
|
||||
| ^^^^^ type parameter not allowed
|
||||
LL | let x: u32<isize>; //~ ERROR type arguments are not allowed on this entity
|
||||
| ^^^^^ type argument not allowed
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/prim-with-args.rs:12:12
|
||||
|
|
||||
LL | let x: u64<isize>; //~ ERROR type parameters are not allowed on this type
|
||||
| ^^^^^ type parameter not allowed
|
||||
LL | let x: u64<isize>; //~ ERROR type arguments are not allowed on this entity
|
||||
| ^^^^^ type argument not allowed
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/prim-with-args.rs:13:13
|
||||
|
|
||||
LL | let x: char<isize>; //~ ERROR type parameters are not allowed on this type
|
||||
| ^^^^^ type parameter not allowed
|
||||
LL | let x: char<isize>; //~ ERROR type arguments are not allowed on this entity
|
||||
| ^^^^^ type argument not allowed
|
||||
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
error[E0110]: lifetime arguments are not allowed on this entity
|
||||
--> $DIR/prim-with-args.rs:15:14
|
||||
|
|
||||
LL | let x: isize<'static>; //~ ERROR lifetime parameters are not allowed on this type
|
||||
| ^^^^^^^ lifetime parameter not allowed
|
||||
LL | let x: isize<'static>; //~ ERROR lifetime arguments are not allowed on this entity
|
||||
| ^^^^^^^ lifetime argument not allowed
|
||||
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
error[E0110]: lifetime arguments are not allowed on this entity
|
||||
--> $DIR/prim-with-args.rs:16:11
|
||||
|
|
||||
LL | let x: i8<'static>; //~ ERROR lifetime parameters are not allowed on this type
|
||||
| ^^^^^^^ lifetime parameter not allowed
|
||||
LL | let x: i8<'static>; //~ ERROR lifetime arguments are not allowed on this entity
|
||||
| ^^^^^^^ lifetime argument not allowed
|
||||
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
error[E0110]: lifetime arguments are not allowed on this entity
|
||||
--> $DIR/prim-with-args.rs:17:12
|
||||
|
|
||||
LL | let x: i16<'static>; //~ ERROR lifetime parameters are not allowed on this type
|
||||
| ^^^^^^^ lifetime parameter not allowed
|
||||
LL | let x: i16<'static>; //~ ERROR lifetime arguments are not allowed on this entity
|
||||
| ^^^^^^^ lifetime argument not allowed
|
||||
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
error[E0110]: lifetime arguments are not allowed on this entity
|
||||
--> $DIR/prim-with-args.rs:18:12
|
||||
|
|
||||
LL | let x: i32<'static>; //~ ERROR lifetime parameters are not allowed on this type
|
||||
| ^^^^^^^ lifetime parameter not allowed
|
||||
LL | let x: i32<'static>; //~ ERROR lifetime arguments are not allowed on this entity
|
||||
| ^^^^^^^ lifetime argument not allowed
|
||||
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
error[E0110]: lifetime arguments are not allowed on this entity
|
||||
--> $DIR/prim-with-args.rs:19:12
|
||||
|
|
||||
LL | let x: i64<'static>; //~ ERROR lifetime parameters are not allowed on this type
|
||||
| ^^^^^^^ lifetime parameter not allowed
|
||||
LL | let x: i64<'static>; //~ ERROR lifetime arguments are not allowed on this entity
|
||||
| ^^^^^^^ lifetime argument not allowed
|
||||
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
error[E0110]: lifetime arguments are not allowed on this entity
|
||||
--> $DIR/prim-with-args.rs:20:14
|
||||
|
|
||||
LL | let x: usize<'static>; //~ ERROR lifetime parameters are not allowed on this type
|
||||
| ^^^^^^^ lifetime parameter not allowed
|
||||
LL | let x: usize<'static>; //~ ERROR lifetime arguments are not allowed on this entity
|
||||
| ^^^^^^^ lifetime argument not allowed
|
||||
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
error[E0110]: lifetime arguments are not allowed on this entity
|
||||
--> $DIR/prim-with-args.rs:21:11
|
||||
|
|
||||
LL | let x: u8<'static>; //~ ERROR lifetime parameters are not allowed on this type
|
||||
| ^^^^^^^ lifetime parameter not allowed
|
||||
LL | let x: u8<'static>; //~ ERROR lifetime arguments are not allowed on this entity
|
||||
| ^^^^^^^ lifetime argument not allowed
|
||||
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
error[E0110]: lifetime arguments are not allowed on this entity
|
||||
--> $DIR/prim-with-args.rs:22:12
|
||||
|
|
||||
LL | let x: u16<'static>; //~ ERROR lifetime parameters are not allowed on this type
|
||||
| ^^^^^^^ lifetime parameter not allowed
|
||||
LL | let x: u16<'static>; //~ ERROR lifetime arguments are not allowed on this entity
|
||||
| ^^^^^^^ lifetime argument not allowed
|
||||
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
error[E0110]: lifetime arguments are not allowed on this entity
|
||||
--> $DIR/prim-with-args.rs:23:12
|
||||
|
|
||||
LL | let x: u32<'static>; //~ ERROR lifetime parameters are not allowed on this type
|
||||
| ^^^^^^^ lifetime parameter not allowed
|
||||
LL | let x: u32<'static>; //~ ERROR lifetime arguments are not allowed on this entity
|
||||
| ^^^^^^^ lifetime argument not allowed
|
||||
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
error[E0110]: lifetime arguments are not allowed on this entity
|
||||
--> $DIR/prim-with-args.rs:24:12
|
||||
|
|
||||
LL | let x: u64<'static>; //~ ERROR lifetime parameters are not allowed on this type
|
||||
| ^^^^^^^ lifetime parameter not allowed
|
||||
LL | let x: u64<'static>; //~ ERROR lifetime arguments are not allowed on this entity
|
||||
| ^^^^^^^ lifetime argument not allowed
|
||||
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
error[E0110]: lifetime arguments are not allowed on this entity
|
||||
--> $DIR/prim-with-args.rs:25:13
|
||||
|
|
||||
LL | let x: char<'static>; //~ ERROR lifetime parameters are not allowed on this type
|
||||
| ^^^^^^^ lifetime parameter not allowed
|
||||
LL | let x: char<'static>; //~ ERROR lifetime arguments are not allowed on this entity
|
||||
| ^^^^^^^ lifetime argument not allowed
|
||||
|
||||
error: aborting due to 22 previous errors
|
||||
|
||||
|
@ -16,7 +16,7 @@ impl S {
|
||||
}
|
||||
|
||||
type A = <S as Tr>::A::f<u8>;
|
||||
//~^ ERROR type parameters are not allowed on this type
|
||||
//~^ ERROR type arguments are not allowed on this entity
|
||||
//~| ERROR ambiguous associated type
|
||||
|
||||
fn main() {}
|
||||
|
@ -1,8 +1,8 @@
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/qualified-path-params-2.rs:18:26
|
||||
|
|
||||
LL | type A = <S as Tr>::A::f<u8>;
|
||||
| ^^ type parameter not allowed
|
||||
| ^^ type argument not allowed
|
||||
|
||||
error[E0223]: ambiguous associated type
|
||||
--> $DIR/qualified-path-params-2.rs:18:10
|
||||
|
@ -2,7 +2,7 @@
|
||||
//~^ WARNING the feature `generic_associated_types` is incomplete
|
||||
#![feature(associated_type_defaults)]
|
||||
|
||||
// FIXME(#44265): "lifetime parameters are not allowed on this type" errors will be addressed in a
|
||||
// FIXME(#44265): "lifetime arguments are not allowed on this entity" errors will be addressed in a
|
||||
// follow-up PR.
|
||||
|
||||
// A Collection trait and collection families. Based on
|
||||
@ -15,14 +15,14 @@ trait Collection<T> {
|
||||
// Test associated type defaults with parameters
|
||||
type Sibling<U>: Collection<U> =
|
||||
<<Self as Collection<T>>::Family as CollectionFamily>::Member<U>;
|
||||
//~^ ERROR type parameters are not allowed on this type [E0109]
|
||||
//~^ ERROR type arguments are not allowed on this entity [E0109]
|
||||
|
||||
fn empty() -> Self;
|
||||
|
||||
fn add(&mut self, value: T);
|
||||
|
||||
fn iterate<'iter>(&'iter self) -> Self::Iter<'iter>;
|
||||
//~^ ERROR lifetime parameters are not allowed on this type [E0110]
|
||||
//~^ ERROR lifetime arguments are not allowed on this entity [E0110]
|
||||
}
|
||||
|
||||
trait CollectionFamily {
|
||||
@ -48,13 +48,13 @@ impl<T> Collection<T> for Vec<T> {
|
||||
}
|
||||
|
||||
fn iterate<'iter>(&'iter self) -> Self::Iter<'iter> {
|
||||
//~^ ERROR lifetime parameters are not allowed on this type [E0110]
|
||||
//~^ ERROR lifetime arguments are not allowed on this entity [E0110]
|
||||
self.iter()
|
||||
}
|
||||
}
|
||||
|
||||
fn floatify<C>(ints: &C) -> <<C as Collection<i32>>::Family as CollectionFamily>::Member<f32>
|
||||
//~^ ERROR type parameters are not allowed on this type [E0109]
|
||||
//~^ ERROR type arguments are not allowed on this entity [E0109]
|
||||
where
|
||||
C: Collection<i32>,
|
||||
{
|
||||
@ -66,7 +66,7 @@ where
|
||||
}
|
||||
|
||||
fn floatify_sibling<C>(ints: &C) -> <C as Collection<i32>>::Sibling<f32>
|
||||
//~^ ERROR type parameters are not allowed on this type [E0109]
|
||||
//~^ ERROR type arguments are not allowed on this entity [E0109]
|
||||
where
|
||||
C: Collection<i32>,
|
||||
{
|
||||
|
@ -4,35 +4,35 @@ warning: the feature `generic_associated_types` is incomplete and may cause the
|
||||
LL | #![feature(generic_associated_types)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/collections.rs:56:90
|
||||
|
|
||||
LL | fn floatify<C>(ints: &C) -> <<C as Collection<i32>>::Family as CollectionFamily>::Member<f32>
|
||||
| ^^^ type parameter not allowed
|
||||
| ^^^ type argument not allowed
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/collections.rs:68:69
|
||||
|
|
||||
LL | fn floatify_sibling<C>(ints: &C) -> <C as Collection<i32>>::Sibling<f32>
|
||||
| ^^^ type parameter not allowed
|
||||
| ^^^ type argument not allowed
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/collections.rs:17:71
|
||||
|
|
||||
LL | <<Self as Collection<T>>::Family as CollectionFamily>::Member<U>;
|
||||
| ^ type parameter not allowed
|
||||
| ^ type argument not allowed
|
||||
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/collections.rs:24:50
|
||||
|
|
||||
LL | fn iterate<'iter>(&'iter self) -> Self::Iter<'iter>;
|
||||
| ^^^^^ lifetime parameter not allowed
|
||||
| ^^^^^ lifetime argument not allowed
|
||||
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/collections.rs:50:50
|
||||
|
|
||||
LL | fn iterate<'iter>(&'iter self) -> Self::Iter<'iter> {
|
||||
| ^^^^^ lifetime parameter not allowed
|
||||
| ^^^^^ lifetime argument not allowed
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
use std::ops::Deref;
|
||||
|
||||
// FIXME(#44265): "lifetime parameters are not allowed on this type" errors will be addressed in a
|
||||
// FIXME(#44265): "lifetime arguments are not allowed on this entity" errors will be addressed in a
|
||||
// follow-up PR.
|
||||
|
||||
trait Foo {
|
||||
@ -15,15 +15,15 @@ trait Baz {
|
||||
|
||||
// This weird type tests that we can use universal function call syntax to access the Item on
|
||||
type Baa<'a>: Deref<Target = <Self::Quux<'a> as Foo>::Bar<'a, 'static>>;
|
||||
//~^ ERROR lifetime parameters are not allowed on this type [E0110]
|
||||
//~| ERROR lifetime parameters are not allowed on this type [E0110]
|
||||
//~^ ERROR lifetime arguments are not allowed on this entity [E0110]
|
||||
//~| ERROR lifetime arguments are not allowed on this entity [E0110]
|
||||
}
|
||||
|
||||
impl<T> Baz for T where T: Foo {
|
||||
type Quux<'a> = T;
|
||||
|
||||
type Baa<'a> = &'a <T as Foo>::Bar<'a, 'static>;
|
||||
//~^ ERROR lifetime parameters are not allowed on this type [E0110]
|
||||
//~^ ERROR lifetime arguments are not allowed on this entity [E0110]
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
@ -4,23 +4,23 @@ warning: the feature `generic_associated_types` is incomplete and may cause the
|
||||
LL | #![feature(generic_associated_types)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
error[E0110]: lifetime arguments are not allowed on this entity
|
||||
--> $DIR/construct_with_other_type.rs:17:46
|
||||
|
|
||||
LL | type Baa<'a>: Deref<Target = <Self::Quux<'a> as Foo>::Bar<'a, 'static>>;
|
||||
| ^^ lifetime parameter not allowed
|
||||
| ^^ lifetime argument not allowed
|
||||
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
error[E0110]: lifetime arguments are not allowed on this entity
|
||||
--> $DIR/construct_with_other_type.rs:17:63
|
||||
|
|
||||
LL | type Baa<'a>: Deref<Target = <Self::Quux<'a> as Foo>::Bar<'a, 'static>>;
|
||||
| ^^ lifetime parameter not allowed
|
||||
| ^^ lifetime argument not allowed
|
||||
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
error[E0110]: lifetime arguments are not allowed on this entity
|
||||
--> $DIR/construct_with_other_type.rs:25:40
|
||||
|
|
||||
LL | type Baa<'a> = &'a <T as Foo>::Bar<'a, 'static>;
|
||||
| ^^ lifetime parameter not allowed
|
||||
| ^^ lifetime argument not allowed
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
@ -3,20 +3,20 @@
|
||||
|
||||
use std::ops::Deref;
|
||||
|
||||
// FIXME(#44265): "lifetime parameters are not allowed on this type" errors will be addressed in a
|
||||
// FIXME(#44265): "lifetime arguments are not allowed on this entity" errors will be addressed in a
|
||||
// follow-up PR.
|
||||
|
||||
trait Iterable {
|
||||
type Item<'a>;
|
||||
type Iter<'a>: Iterator<Item = Self::Item<'a>>
|
||||
//~^ ERROR lifetime parameters are not allowed on this type [E0110]
|
||||
//~^ ERROR lifetime arguments are not allowed on this entity [E0110]
|
||||
+ Deref<Target = Self::Item<'b>>;
|
||||
//~^ ERROR undeclared lifetime
|
||||
//~| ERROR lifetime parameters are not allowed on this type [E0110]
|
||||
//~| ERROR lifetime arguments are not allowed on this entity [E0110]
|
||||
|
||||
fn iter<'a>(&'a self) -> Self::Iter<'undeclared>;
|
||||
//~^ ERROR undeclared lifetime
|
||||
//~| ERROR lifetime parameters are not allowed on this type [E0110]
|
||||
//~| ERROR lifetime arguments are not allowed on this entity [E0110]
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
@ -16,23 +16,23 @@ error[E0261]: use of undeclared lifetime name `'undeclared`
|
||||
LL | fn iter<'a>(&'a self) -> Self::Iter<'undeclared>;
|
||||
| ^^^^^^^^^^^ undeclared lifetime
|
||||
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
error[E0110]: lifetime arguments are not allowed on this entity
|
||||
--> $DIR/generic_associated_type_undeclared_lifetimes.rs:11:47
|
||||
|
|
||||
LL | type Iter<'a>: Iterator<Item = Self::Item<'a>>
|
||||
| ^^ lifetime parameter not allowed
|
||||
| ^^ lifetime argument not allowed
|
||||
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
error[E0110]: lifetime arguments are not allowed on this entity
|
||||
--> $DIR/generic_associated_type_undeclared_lifetimes.rs:13:37
|
||||
|
|
||||
LL | + Deref<Target = Self::Item<'b>>;
|
||||
| ^^ lifetime parameter not allowed
|
||||
| ^^ lifetime argument not allowed
|
||||
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
error[E0110]: lifetime arguments are not allowed on this entity
|
||||
--> $DIR/generic_associated_type_undeclared_lifetimes.rs:17:41
|
||||
|
|
||||
LL | fn iter<'a>(&'a self) -> Self::Iter<'undeclared>;
|
||||
| ^^^^^^^^^^^ lifetime parameter not allowed
|
||||
| ^^^^^^^^^^^ lifetime argument not allowed
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
|
@ -3,16 +3,16 @@
|
||||
|
||||
use std::ops::Deref;
|
||||
|
||||
// FIXME(#44265): "lifetime parameters are not allowed on this type" errors will be addressed in a
|
||||
// FIXME(#44265): "lifetime arguments are not allowed on this entity" errors will be addressed in a
|
||||
// follow-up PR.
|
||||
|
||||
trait Iterable {
|
||||
type Item<'a>;
|
||||
type Iter<'a>: Iterator<Item = Self::Item<'a>>;
|
||||
//~^ ERROR lifetime parameters are not allowed on this type [E0110]
|
||||
//~^ ERROR lifetime arguments are not allowed on this entity [E0110]
|
||||
|
||||
fn iter<'a>(&'a self) -> Self::Iter<'a>;
|
||||
//~^ ERROR lifetime parameters are not allowed on this type [E0110]
|
||||
//~^ ERROR lifetime arguments are not allowed on this entity [E0110]
|
||||
}
|
||||
|
||||
// Impl for struct type
|
||||
@ -21,7 +21,7 @@ impl<T> Iterable for Vec<T> {
|
||||
type Iter<'a> = std::slice::Iter<'a, T>;
|
||||
|
||||
fn iter<'a>(&'a self) -> Self::Iter<'a> {
|
||||
//~^ ERROR lifetime parameters are not allowed on this type [E0110]
|
||||
//~^ ERROR lifetime arguments are not allowed on this entity [E0110]
|
||||
self.iter()
|
||||
}
|
||||
}
|
||||
@ -32,18 +32,18 @@ impl<T> Iterable for [T] {
|
||||
type Iter<'a> = std::slice::Iter<'a, T>;
|
||||
|
||||
fn iter<'a>(&'a self) -> Self::Iter<'a> {
|
||||
//~^ ERROR lifetime parameters are not allowed on this type [E0110]
|
||||
//~^ ERROR lifetime arguments are not allowed on this entity [E0110]
|
||||
self.iter()
|
||||
}
|
||||
}
|
||||
|
||||
fn make_iter<'a, I: Iterable>(it: &'a I) -> I::Iter<'a> {
|
||||
//~^ ERROR lifetime parameters are not allowed on this type [E0110]
|
||||
//~^ ERROR lifetime arguments are not allowed on this entity [E0110]
|
||||
it.iter()
|
||||
}
|
||||
|
||||
fn get_first<'a, I: Iterable>(it: &'a I) -> Option<I::Item<'a>> {
|
||||
//~^ ERROR lifetime parameters are not allowed on this type [E0110]
|
||||
//~^ ERROR lifetime arguments are not allowed on this entity [E0110]
|
||||
it.iter().next()
|
||||
}
|
||||
|
||||
|
@ -4,41 +4,41 @@ warning: the feature `generic_associated_types` is incomplete and may cause the
|
||||
LL | #![feature(generic_associated_types)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
error[E0110]: lifetime arguments are not allowed on this entity
|
||||
--> $DIR/iterable.rs:11:47
|
||||
|
|
||||
LL | type Iter<'a>: Iterator<Item = Self::Item<'a>>;
|
||||
| ^^ lifetime parameter not allowed
|
||||
| ^^ lifetime argument not allowed
|
||||
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
error[E0110]: lifetime arguments are not allowed on this entity
|
||||
--> $DIR/iterable.rs:40:53
|
||||
|
|
||||
LL | fn make_iter<'a, I: Iterable>(it: &'a I) -> I::Iter<'a> {
|
||||
| ^^ lifetime parameter not allowed
|
||||
| ^^ lifetime argument not allowed
|
||||
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
error[E0110]: lifetime arguments are not allowed on this entity
|
||||
--> $DIR/iterable.rs:45:60
|
||||
|
|
||||
LL | fn get_first<'a, I: Iterable>(it: &'a I) -> Option<I::Item<'a>> {
|
||||
| ^^ lifetime parameter not allowed
|
||||
| ^^ lifetime argument not allowed
|
||||
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
error[E0110]: lifetime arguments are not allowed on this entity
|
||||
--> $DIR/iterable.rs:14:41
|
||||
|
|
||||
LL | fn iter<'a>(&'a self) -> Self::Iter<'a>;
|
||||
| ^^ lifetime parameter not allowed
|
||||
| ^^ lifetime argument not allowed
|
||||
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
error[E0110]: lifetime arguments are not allowed on this entity
|
||||
--> $DIR/iterable.rs:23:41
|
||||
|
|
||||
LL | fn iter<'a>(&'a self) -> Self::Iter<'a> {
|
||||
| ^^ lifetime parameter not allowed
|
||||
| ^^ lifetime argument not allowed
|
||||
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
error[E0110]: lifetime arguments are not allowed on this entity
|
||||
--> $DIR/iterable.rs:34:41
|
||||
|
|
||||
LL | fn iter<'a>(&'a self) -> Self::Iter<'a> {
|
||||
| ^^ lifetime parameter not allowed
|
||||
| ^^ lifetime argument not allowed
|
||||
|
||||
error: aborting due to 6 previous errors
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
//~^ WARNING the feature `generic_associated_types` is incomplete
|
||||
#![feature(associated_type_defaults)]
|
||||
|
||||
// FIXME(#44265): "lifetime parameters are not allowed on this type" errors will be addressed in a
|
||||
// FIXME(#44265): "lifetime arguments are not allowed on this entity" errors will be addressed in a
|
||||
// follow-up PR.
|
||||
|
||||
// FIXME(#44265): Update expected errors once E110 is resolved, now does not get past `trait Foo`.
|
||||
@ -15,13 +15,13 @@ trait Foo {
|
||||
type E<'a, T>;
|
||||
// Test parameters in default values
|
||||
type FOk<T> = Self::E<'static, T>;
|
||||
//~^ ERROR type parameters are not allowed on this type [E0109]
|
||||
//~| ERROR lifetime parameters are not allowed on this type [E0110]
|
||||
//~^ ERROR type arguments are not allowed on this entity [E0109]
|
||||
//~| ERROR lifetime arguments are not allowed on this entity [E0110]
|
||||
type FErr1 = Self::E<'static, 'static>; // Error
|
||||
//~^ ERROR lifetime parameters are not allowed on this type [E0110]
|
||||
//~^ ERROR lifetime arguments are not allowed on this entity [E0110]
|
||||
type FErr2<T> = Self::E<'static, T, u32>; // Error
|
||||
//~^ ERROR type parameters are not allowed on this type [E0109]
|
||||
//~| ERROR lifetime parameters are not allowed on this type [E0110]
|
||||
//~^ ERROR type arguments are not allowed on this entity [E0109]
|
||||
//~| ERROR lifetime arguments are not allowed on this entity [E0110]
|
||||
}
|
||||
|
||||
struct Fooy;
|
||||
|
@ -4,35 +4,35 @@ warning: the feature `generic_associated_types` is incomplete and may cause the
|
||||
LL | #![feature(generic_associated_types)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
error[E0110]: lifetime arguments are not allowed on this entity
|
||||
--> $DIR/parameter_number_and_kind.rs:17:27
|
||||
|
|
||||
LL | type FOk<T> = Self::E<'static, T>;
|
||||
| ^^^^^^^ lifetime parameter not allowed
|
||||
| ^^^^^^^ lifetime argument not allowed
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/parameter_number_and_kind.rs:17:36
|
||||
|
|
||||
LL | type FOk<T> = Self::E<'static, T>;
|
||||
| ^ type parameter not allowed
|
||||
| ^ type argument not allowed
|
||||
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
error[E0110]: lifetime arguments are not allowed on this entity
|
||||
--> $DIR/parameter_number_and_kind.rs:20:26
|
||||
|
|
||||
LL | type FErr1 = Self::E<'static, 'static>; // Error
|
||||
| ^^^^^^^ lifetime parameter not allowed
|
||||
| ^^^^^^^ lifetime argument not allowed
|
||||
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
error[E0110]: lifetime arguments are not allowed on this entity
|
||||
--> $DIR/parameter_number_and_kind.rs:22:29
|
||||
|
|
||||
LL | type FErr2<T> = Self::E<'static, T, u32>; // Error
|
||||
| ^^^^^^^ lifetime parameter not allowed
|
||||
| ^^^^^^^ lifetime argument not allowed
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/parameter_number_and_kind.rs:22:38
|
||||
|
|
||||
LL | type FErr2<T> = Self::E<'static, T, u32>; // Error
|
||||
| ^ type parameter not allowed
|
||||
| ^ type argument not allowed
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#![feature(generic_associated_types)]
|
||||
//~^ WARNING the feature `generic_associated_types` is incomplete
|
||||
|
||||
// FIXME(#44265): "type parameter not allowed" errors will be addressed in a follow-up PR.
|
||||
// FIXME(#44265): "type argument not allowed" errors will be addressed in a follow-up PR.
|
||||
|
||||
use std::rc::Rc;
|
||||
use std::sync::Arc;
|
||||
@ -10,7 +10,7 @@ use std::ops::Deref;
|
||||
trait PointerFamily {
|
||||
type Pointer<T>: Deref<Target = T>;
|
||||
fn new<T>(value: T) -> Self::Pointer<T>;
|
||||
//~^ ERROR type parameters are not allowed on this type [E0109]
|
||||
//~^ ERROR type arguments are not allowed on this entity [E0109]
|
||||
}
|
||||
|
||||
struct ArcFamily;
|
||||
@ -18,7 +18,7 @@ struct ArcFamily;
|
||||
impl PointerFamily for ArcFamily {
|
||||
type Pointer<T> = Arc<T>;
|
||||
fn new<T>(value: T) -> Self::Pointer<T> {
|
||||
//~^ ERROR type parameters are not allowed on this type [E0109]
|
||||
//~^ ERROR type arguments are not allowed on this entity [E0109]
|
||||
Arc::new(value)
|
||||
}
|
||||
}
|
||||
@ -28,14 +28,14 @@ struct RcFamily;
|
||||
impl PointerFamily for RcFamily {
|
||||
type Pointer<T> = Rc<T>;
|
||||
fn new<T>(value: T) -> Self::Pointer<T> {
|
||||
//~^ ERROR type parameters are not allowed on this type [E0109]
|
||||
//~^ ERROR type arguments are not allowed on this entity [E0109]
|
||||
Rc::new(value)
|
||||
}
|
||||
}
|
||||
|
||||
struct Foo<P: PointerFamily> {
|
||||
bar: P::Pointer<String>,
|
||||
//~^ ERROR type parameters are not allowed on this type [E0109]
|
||||
//~^ ERROR type arguments are not allowed on this entity [E0109]
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
@ -4,29 +4,29 @@ warning: the feature `generic_associated_types` is incomplete and may cause the
|
||||
LL | #![feature(generic_associated_types)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/pointer_family.rs:37:21
|
||||
|
|
||||
LL | bar: P::Pointer<String>,
|
||||
| ^^^^^^ type parameter not allowed
|
||||
| ^^^^^^ type argument not allowed
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/pointer_family.rs:12:42
|
||||
|
|
||||
LL | fn new<T>(value: T) -> Self::Pointer<T>;
|
||||
| ^ type parameter not allowed
|
||||
| ^ type argument not allowed
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/pointer_family.rs:20:42
|
||||
|
|
||||
LL | fn new<T>(value: T) -> Self::Pointer<T> {
|
||||
| ^ type parameter not allowed
|
||||
| ^ type argument not allowed
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/pointer_family.rs:30:42
|
||||
|
|
||||
LL | fn new<T>(value: T) -> Self::Pointer<T> {
|
||||
| ^ type parameter not allowed
|
||||
| ^ type argument not allowed
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#![feature(generic_associated_types)]
|
||||
//~^ WARNING the feature `generic_associated_types` is incomplete
|
||||
|
||||
// FIXME(#44265): "lifetime parameter not allowed on this type" errors will be addressed in a
|
||||
// FIXME(#44265): "lifetime argument not allowed on this type" errors will be addressed in a
|
||||
// follow-up PR
|
||||
|
||||
use std::fmt::Display;
|
||||
@ -10,13 +10,13 @@ trait StreamingIterator {
|
||||
type Item<'a>;
|
||||
// Applying the lifetime parameter `'a` to `Self::Item` inside the trait.
|
||||
fn next<'a>(&'a self) -> Option<Self::Item<'a>>;
|
||||
//~^ ERROR lifetime parameters are not allowed on this type [E0110]
|
||||
//~^ ERROR lifetime arguments are not allowed on this entity [E0110]
|
||||
}
|
||||
|
||||
struct Foo<T: StreamingIterator> {
|
||||
// Applying a concrete lifetime to the constructor outside the trait.
|
||||
bar: <T as StreamingIterator>::Item<'static>,
|
||||
//~^ ERROR lifetime parameters are not allowed on this type [E0110]
|
||||
//~^ ERROR lifetime arguments are not allowed on this entity [E0110]
|
||||
}
|
||||
|
||||
// Users can bound parameters by the type constructed by that trait's associated type constructor
|
||||
@ -24,7 +24,7 @@ struct Foo<T: StreamingIterator> {
|
||||
//FIXME(sunjay): This next line should parse and be valid
|
||||
//fn foo<T: for<'a> StreamingIterator<Item<'a>=&'a [i32]>>(iter: T) { /* ... */ }
|
||||
fn foo<T>(iter: T) where T: StreamingIterator, for<'a> T::Item<'a>: Display { /* ... */ }
|
||||
//~^ ERROR lifetime parameters are not allowed on this type [E0110]
|
||||
//~^ ERROR lifetime arguments are not allowed on this entity [E0110]
|
||||
|
||||
// Full example of enumerate iterator
|
||||
|
||||
@ -36,9 +36,9 @@ struct StreamEnumerate<I> {
|
||||
|
||||
impl<I: StreamingIterator> StreamingIterator for StreamEnumerate<I> {
|
||||
type Item<'a> = (usize, I::Item<'a>);
|
||||
//~^ ERROR lifetime parameters are not allowed on this type [E0110]
|
||||
//~^ ERROR lifetime arguments are not allowed on this entity [E0110]
|
||||
fn next<'a>(&'a self) -> Option<Self::Item<'a>> {
|
||||
//~^ ERROR lifetime parameters are not allowed on this type [E0110]
|
||||
//~^ ERROR lifetime arguments are not allowed on this entity [E0110]
|
||||
match self.iter.next() {
|
||||
None => None,
|
||||
Some(val) => {
|
||||
|
@ -4,35 +4,35 @@ warning: the feature `generic_associated_types` is incomplete and may cause the
|
||||
LL | #![feature(generic_associated_types)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
error[E0110]: lifetime arguments are not allowed on this entity
|
||||
--> $DIR/streaming_iterator.rs:18:41
|
||||
|
|
||||
LL | bar: <T as StreamingIterator>::Item<'static>,
|
||||
| ^^^^^^^ lifetime parameter not allowed
|
||||
| ^^^^^^^ lifetime argument not allowed
|
||||
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
error[E0110]: lifetime arguments are not allowed on this entity
|
||||
--> $DIR/streaming_iterator.rs:26:64
|
||||
|
|
||||
LL | fn foo<T>(iter: T) where T: StreamingIterator, for<'a> T::Item<'a>: Display { /* ... */ }
|
||||
| ^^ lifetime parameter not allowed
|
||||
| ^^ lifetime argument not allowed
|
||||
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
error[E0110]: lifetime arguments are not allowed on this entity
|
||||
--> $DIR/streaming_iterator.rs:12:48
|
||||
|
|
||||
LL | fn next<'a>(&'a self) -> Option<Self::Item<'a>>;
|
||||
| ^^ lifetime parameter not allowed
|
||||
| ^^ lifetime argument not allowed
|
||||
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
error[E0110]: lifetime arguments are not allowed on this entity
|
||||
--> $DIR/streaming_iterator.rs:38:37
|
||||
|
|
||||
LL | type Item<'a> = (usize, I::Item<'a>);
|
||||
| ^^ lifetime parameter not allowed
|
||||
| ^^ lifetime argument not allowed
|
||||
|
||||
error[E0110]: lifetime parameters are not allowed on this type
|
||||
error[E0110]: lifetime arguments are not allowed on this entity
|
||||
--> $DIR/streaming_iterator.rs:40:48
|
||||
|
|
||||
LL | fn next<'a>(&'a self) -> Option<Self::Item<'a>> {
|
||||
| ^^ lifetime parameter not allowed
|
||||
| ^^ lifetime argument not allowed
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
|
@ -13,7 +13,7 @@ fn f<T: Tr>() {
|
||||
//~^ ERROR expected struct, variant or union type, found associated type
|
||||
let z = T::A::<u8> {};
|
||||
//~^ ERROR expected struct, variant or union type, found associated type
|
||||
//~| ERROR type parameters are not allowed on this type
|
||||
//~| ERROR type arguments are not allowed on this entity
|
||||
match S {
|
||||
T::A {} => {}
|
||||
//~^ ERROR expected struct, variant or union type, found associated type
|
||||
@ -22,7 +22,7 @@ fn f<T: Tr>() {
|
||||
|
||||
fn g<T: Tr<A = S>>() {
|
||||
let s = T::A {}; // OK
|
||||
let z = T::A::<u8> {}; //~ ERROR type parameters are not allowed on this type
|
||||
let z = T::A::<u8> {}; //~ ERROR type arguments are not allowed on this entity
|
||||
match S {
|
||||
T::A {} => {} // OK
|
||||
}
|
||||
@ -31,7 +31,7 @@ fn g<T: Tr<A = S>>() {
|
||||
fn main() {
|
||||
let s = S::A {}; //~ ERROR ambiguous associated type
|
||||
let z = S::A::<u8> {}; //~ ERROR ambiguous associated type
|
||||
//~^ ERROR type parameters are not allowed on this type
|
||||
//~^ ERROR type arguments are not allowed on this entity
|
||||
match S {
|
||||
S::A {} => {} //~ ERROR ambiguous associated type
|
||||
}
|
||||
|
@ -4,11 +4,11 @@ error[E0071]: expected struct, variant or union type, found associated type
|
||||
LL | let s = T::A {};
|
||||
| ^^^^ not a struct
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/struct-path-associated-type.rs:14:20
|
||||
|
|
||||
LL | let z = T::A::<u8> {};
|
||||
| ^^ type parameter not allowed
|
||||
| ^^ type argument not allowed
|
||||
|
||||
error[E0071]: expected struct, variant or union type, found associated type
|
||||
--> $DIR/struct-path-associated-type.rs:14:13
|
||||
@ -22,11 +22,11 @@ error[E0071]: expected struct, variant or union type, found associated type
|
||||
LL | T::A {} => {}
|
||||
| ^^^^ not a struct
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/struct-path-associated-type.rs:25:20
|
||||
|
|
||||
LL | let z = T::A::<u8> {}; //~ ERROR type parameters are not allowed on this type
|
||||
| ^^ type parameter not allowed
|
||||
LL | let z = T::A::<u8> {}; //~ ERROR type arguments are not allowed on this entity
|
||||
| ^^ type argument not allowed
|
||||
|
||||
error[E0223]: ambiguous associated type
|
||||
--> $DIR/struct-path-associated-type.rs:32:13
|
||||
@ -34,11 +34,11 @@ error[E0223]: ambiguous associated type
|
||||
LL | let s = S::A {}; //~ ERROR ambiguous associated type
|
||||
| ^^^^ help: use fully-qualified syntax: `<S as Trait>::A`
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/struct-path-associated-type.rs:33:20
|
||||
|
|
||||
LL | let z = S::A::<u8> {}; //~ ERROR ambiguous associated type
|
||||
| ^^ type parameter not allowed
|
||||
| ^^ type argument not allowed
|
||||
|
||||
error[E0223]: ambiguous associated type
|
||||
--> $DIR/struct-path-associated-type.rs:33:13
|
||||
|
@ -6,7 +6,7 @@ trait Tr {
|
||||
//~^ ERROR expected struct, variant or union type, found Self
|
||||
let z = Self::<u8> {};
|
||||
//~^ ERROR expected struct, variant or union type, found Self
|
||||
//~| ERROR type parameters are not allowed on this type
|
||||
//~| ERROR type arguments are not allowed on this entity
|
||||
match s {
|
||||
Self { .. } => {}
|
||||
//~^ ERROR expected struct, variant or union type, found Self
|
||||
@ -17,7 +17,7 @@ trait Tr {
|
||||
impl Tr for S {
|
||||
fn f() {
|
||||
let s = Self {}; // OK
|
||||
let z = Self::<u8> {}; //~ ERROR type parameters are not allowed on this type
|
||||
let z = Self::<u8> {}; //~ ERROR type arguments are not allowed on this entity
|
||||
match s {
|
||||
Self { .. } => {} // OK
|
||||
}
|
||||
@ -27,7 +27,7 @@ impl Tr for S {
|
||||
impl S {
|
||||
fn g() {
|
||||
let s = Self {}; // OK
|
||||
let z = Self::<u8> {}; //~ ERROR type parameters are not allowed on this type
|
||||
let z = Self::<u8> {}; //~ ERROR type arguments are not allowed on this entity
|
||||
match s {
|
||||
Self { .. } => {} // OK
|
||||
}
|
||||
|
@ -4,11 +4,11 @@ error[E0071]: expected struct, variant or union type, found Self
|
||||
LL | let s = Self {};
|
||||
| ^^^^ not a struct
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/struct-path-self.rs:7:24
|
||||
|
|
||||
LL | let z = Self::<u8> {};
|
||||
| ^^ type parameter not allowed
|
||||
| ^^ type argument not allowed
|
||||
|
||||
error[E0071]: expected struct, variant or union type, found Self
|
||||
--> $DIR/struct-path-self.rs:7:17
|
||||
@ -22,17 +22,17 @@ error[E0071]: expected struct, variant or union type, found Self
|
||||
LL | Self { .. } => {}
|
||||
| ^^^^ not a struct
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/struct-path-self.rs:20:24
|
||||
|
|
||||
LL | let z = Self::<u8> {}; //~ ERROR type parameters are not allowed on this type
|
||||
| ^^ type parameter not allowed
|
||||
LL | let z = Self::<u8> {}; //~ ERROR type arguments are not allowed on this entity
|
||||
| ^^ type argument not allowed
|
||||
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/struct-path-self.rs:30:24
|
||||
|
|
||||
LL | let z = Self::<u8> {}; //~ ERROR type parameters are not allowed on this type
|
||||
| ^^ type parameter not allowed
|
||||
LL | let z = Self::<u8> {}; //~ ERROR type arguments are not allowed on this entity
|
||||
| ^^ type argument not allowed
|
||||
|
||||
error: aborting due to 6 previous errors
|
||||
|
||||
|
@ -7,5 +7,5 @@ fn main() {
|
||||
let _ = Option::None::<u8>; // OK (Lint in future!)
|
||||
let _ = Alias::<u8>::None; // OK
|
||||
let _ = Alias::None::<u8>; // Error
|
||||
//~^ type parameters are not allowed on this type
|
||||
//~^ type arguments are not allowed on this entity
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
error[E0109]: type parameters are not allowed on this type
|
||||
error[E0109]: type arguments are not allowed on this entity
|
||||
--> $DIR/type-alias-enum-variants.rs:9:27
|
||||
|
|
||||
LL | let _ = Alias::None::<u8>; // Error
|
||||
| ^^ type parameter not allowed
|
||||
| ^^ type argument not allowed
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user