summaryrefslogtreecommitdiffstats
path: root/src/test/ui/rfc-2632-const-trait-impl/tilde-const-invalid-places.stderr
blob: 033ec21ba8408defa7bc509cef0053531482df2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
error: `~const` is not allowed here
  --> $DIR/tilde-const-invalid-places.rs:8:19
   |
LL | fn rpit() -> impl ~const T { S }
   |                   ^^^^^^^^
   |
   = note: only allowed on bounds on traits' associated types and functions, const fns, const impls and its associated functions

error: `~const` is not allowed here
  --> $DIR/tilde-const-invalid-places.rs:11:17
   |
LL | fn apit(_: impl ~const T) {}
   |                 ^^^^^^^^
   |
   = note: only allowed on bounds on traits' associated types and functions, const fns, const impls and its associated functions

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) }
   |                                                  ^^^^^^^^
   |
   = note: only allowed on bounds on traits' associated types and functions, const fns, const impls and its associated functions

error: `~const` is not allowed here
  --> $DIR/tilde-const-invalid-places.rs:17:48
   |
LL | fn apit_assoc_bound(_: impl IntoIterator<Item: ~const T>) {}
   |                                                ^^^^^^^^
   |
   = note: only allowed on bounds on traits' associated types and functions, const fns, const impls and its associated functions

error: `~const` is not allowed here
  --> $DIR/tilde-const-invalid-places.rs:20:15
   |
LL | fn generic<P: ~const T>() {}
   |               ^^^^^^^^
   |
   = note: only allowed on bounds on traits' associated types and functions, const fns, const impls and its associated functions

error: `~const` is not allowed here
  --> $DIR/tilde-const-invalid-places.rs:23:31
   |
LL | fn where_clause<P>() where P: ~const T {}
   |                               ^^^^^^^^
   |
   = note: only allowed on bounds on traits' associated types and functions, const fns, const impls and its associated functions

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