2021-08-25 15:21:55 +00:00
|
|
|
error: `~const` is not allowed here
|
|
|
|
--> $DIR/tilde-const-invalid-places.rs:8:19
|
|
|
|
|
|
|
|
|
LL | fn rpit() -> impl ~const T { S }
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
2021-08-28 07:37:30 +00:00
|
|
|
= note: only allowed on bounds on traits' associated types and functions, const fns, const impls and its associated functions
|
2021-08-25 15:21:55 +00:00
|
|
|
|
|
|
|
error: `~const` is not allowed here
|
|
|
|
--> $DIR/tilde-const-invalid-places.rs:11:17
|
|
|
|
|
|
|
|
|
LL | fn apit(_: impl ~const T) {}
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
2021-08-28 07:37:30 +00:00
|
|
|
= note: only allowed on bounds on traits' associated types and functions, const fns, const impls and its associated functions
|
2021-08-25 15:21:55 +00:00
|
|
|
|
|
|
|
error: `~const` is not allowed here
|
|
|
|
--> $DIR/tilde-const-invalid-places.rs:14:50
|
|
|
|
|
|
|
|
|
LL | fn rpit_assoc_bound() -> impl IntoIterator<Item: ~const T> { Some(S) }
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
2021-08-28 07:37:30 +00:00
|
|
|
= note: only allowed on bounds on traits' associated types and functions, const fns, const impls and its associated functions
|
2021-08-25 15:21:55 +00:00
|
|
|
|
|
|
|
error: `~const` is not allowed here
|
|
|
|
--> $DIR/tilde-const-invalid-places.rs:17:48
|
|
|
|
|
|
|
|
|
LL | fn apit_assoc_bound(_: impl IntoIterator<Item: ~const T>) {}
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
2021-08-28 07:37:30 +00:00
|
|
|
= note: only allowed on bounds on traits' associated types and functions, const fns, const impls and its associated functions
|
2021-08-25 15:21:55 +00:00
|
|
|
|
|
|
|
error: `~const` is not allowed here
|
|
|
|
--> $DIR/tilde-const-invalid-places.rs:20:15
|
|
|
|
|
|
|
|
|
LL | fn generic<P: ~const T>() {}
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
2021-08-28 07:37:30 +00:00
|
|
|
= note: only allowed on bounds on traits' associated types and functions, const fns, const impls and its associated functions
|
2021-08-25 15:21:55 +00:00
|
|
|
|
|
|
|
error: `~const` is not allowed here
|
|
|
|
--> $DIR/tilde-const-invalid-places.rs:23:31
|
|
|
|
|
|
|
|
|
LL | fn where_clause<P>() where P: ~const T {}
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
2021-08-28 07:37:30 +00:00
|
|
|
= note: only allowed on bounds on traits' associated types and functions, const fns, const impls and its associated functions
|
2021-08-25 15:21:55 +00:00
|
|
|
|
|
|
|
error: `~const` and `?` are mutually exclusive
|
|
|
|
--> $DIR/tilde-const-invalid-places.rs:26:25
|
|
|
|
|
|
|
|
|
LL | struct TildeQuestion<T: ~const ?Sized>(std::marker::PhantomData<T>);
|
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: aborting due to 7 previous errors
|
|
|
|
|