@@ -4,53 +4,37 @@ error: `~const` is not allowed here
4
4
LL | fn rpit() -> impl ~const T { S }
5
5
| ^^^^^^^^
6
6
|
7
- = note: only allowed on bounds on traits' associated types and functions, const fns , const impls and its associated functions
7
+ = note: only allowed on bounds on functions, traits' associated types and functions, const impls and its associated functions
8
8
9
9
error: `~const` is not allowed here
10
10
--> $DIR/tilde-const-invalid-places.rs:11:17
11
11
|
12
12
LL | fn apit(_: impl ~const T) {}
13
13
| ^^^^^^^^
14
14
|
15
- = note: only allowed on bounds on traits' associated types and functions, const fns , const impls and its associated functions
15
+ = note: only allowed on bounds on functions, traits' associated types and functions, const impls and its associated functions
16
16
17
17
error: `~const` is not allowed here
18
18
--> $DIR/tilde-const-invalid-places.rs:14:50
19
19
|
20
20
LL | fn rpit_assoc_bound() -> impl IntoIterator<Item: ~const T> { Some(S) }
21
21
| ^^^^^^^^
22
22
|
23
- = note: only allowed on bounds on traits' associated types and functions, const fns , const impls and its associated functions
23
+ = note: only allowed on bounds on functions, traits' associated types and functions, const impls and its associated functions
24
24
25
25
error: `~const` is not allowed here
26
26
--> $DIR/tilde-const-invalid-places.rs:17:48
27
27
|
28
28
LL | fn apit_assoc_bound(_: impl IntoIterator<Item: ~const T>) {}
29
29
| ^^^^^^^^
30
30
|
31
- = note: only allowed on bounds on traits' associated types and functions, const fns, const impls and its associated functions
32
-
33
- error: `~const` is not allowed here
34
- --> $DIR/tilde-const-invalid-places.rs:20:15
35
- |
36
- LL | fn generic<P: ~const T>() {}
37
- | ^^^^^^^^
38
- |
39
- = note: only allowed on bounds on traits' associated types and functions, const fns, const impls and its associated functions
40
-
41
- error: `~const` is not allowed here
42
- --> $DIR/tilde-const-invalid-places.rs:23:31
43
- |
44
- LL | fn where_clause<P>() where P: ~const T {}
45
- | ^^^^^^^^
46
- |
47
- = note: only allowed on bounds on traits' associated types and functions, const fns, const impls and its associated functions
31
+ = note: only allowed on bounds on functions, traits' associated types and functions, const impls and its associated functions
48
32
49
33
error: `~const` and `?` are mutually exclusive
50
- --> $DIR/tilde-const-invalid-places.rs:26 :25
34
+ --> $DIR/tilde-const-invalid-places.rs:20 :25
51
35
|
52
36
LL | struct TildeQuestion<T: ~const ?Sized>(std::marker::PhantomData<T>);
53
37
| ^^^^^^^^^^^^^
54
38
55
- error: aborting due to 7 previous errors
39
+ error: aborting due to 5 previous errors
56
40
0 commit comments