@@ -7,50 +7,77 @@ LL | fn rpit() -> impl ~const T { S }
77 = note: only allowed on bounds on traits' associated types and functions, const fns, const impls and its associated functions
88
99error: `~const` is not allowed here
10- --> $DIR/tilde-const-invalid-places.rs:11 :17
10+ --> $DIR/tilde-const-invalid-places.rs:12 :17
1111 |
1212LL | fn apit(_: impl ~const T) {}
1313 | ^^^^^^^^
1414 |
1515 = note: only allowed on bounds on traits' associated types and functions, const fns, const impls and its associated functions
1616
1717error: `~const` is not allowed here
18- --> $DIR/tilde-const-invalid-places.rs:14 :50
18+ --> $DIR/tilde-const-invalid-places.rs:15 :50
1919 |
2020LL | fn rpit_assoc_bound() -> impl IntoIterator<Item: ~const T> { Some(S) }
2121 | ^^^^^^^^
2222 |
2323 = note: only allowed on bounds on traits' associated types and functions, const fns, const impls and its associated functions
2424
2525error: `~const` is not allowed here
26- --> $DIR/tilde-const-invalid-places.rs:17 :48
26+ --> $DIR/tilde-const-invalid-places.rs:19 :48
2727 |
2828LL | fn apit_assoc_bound(_: impl IntoIterator<Item: ~const T>) {}
2929 | ^^^^^^^^
3030 |
3131 = note: only allowed on bounds on traits' associated types and functions, const fns, const impls and its associated functions
3232
3333error: `~const` is not allowed here
34- --> $DIR/tilde-const-invalid-places.rs:20 :15
34+ --> $DIR/tilde-const-invalid-places.rs:22 :15
3535 |
3636LL | fn generic<P: ~const T>() {}
3737 | ^^^^^^^^
3838 |
3939 = note: only allowed on bounds on traits' associated types and functions, const fns, const impls and its associated functions
4040
4141error: `~const` is not allowed here
42- --> $DIR/tilde-const-invalid-places.rs:23 :31
42+ --> $DIR/tilde-const-invalid-places.rs:25 :31
4343 |
4444LL | fn where_clause<P>() where P: ~const T {}
4545 | ^^^^^^^^
4646 |
4747 = note: only allowed on bounds on traits' associated types and functions, const fns, const impls and its associated functions
4848
4949error: `~const` and `?` are mutually exclusive
50- --> $DIR/tilde-const-invalid-places.rs:26 :25
50+ --> $DIR/tilde-const-invalid-places.rs:28 :25
5151 |
5252LL | struct TildeQuestion<T: ~const ?Sized>(std::marker::PhantomData<T>);
5353 | ^^^^^^^^^^^^^
5454
55- error: aborting due to 7 previous errors
55+ error[E0277]: the trait bound `S: T` is not satisfied
56+ --> $DIR/tilde-const-invalid-places.rs:8:14
57+ |
58+ LL | fn rpit() -> impl ~const T { S }
59+ | ^^^^^^^^^^^^^ the trait `T` is not implemented for `S`
60+ |
61+ note: the trait `T` is implemented for `S`, but that implementation is not `const`
62+ --> $DIR/tilde-const-invalid-places.rs:8:14
63+ |
64+ LL | fn rpit() -> impl ~const T { S }
65+ | ^^^^^^^^^^^^^
66+ = help: the trait `T` is implemented for `S`
67+
68+ error[E0277]: the trait bound `S: T` is not satisfied
69+ --> $DIR/tilde-const-invalid-places.rs:15:26
70+ |
71+ LL | fn rpit_assoc_bound() -> impl IntoIterator<Item: ~const T> { Some(S) }
72+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `T` is not implemented for `S`
73+ |
74+ note: the trait `T` is implemented for `S`, but that implementation is not `const`
75+ --> $DIR/tilde-const-invalid-places.rs:15:26
76+ |
77+ LL | fn rpit_assoc_bound() -> impl IntoIterator<Item: ~const T> { Some(S) }
78+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
79+ = help: the trait `T` is implemented for `S`
80+
81+ error: aborting due to 9 previous errors
5682
83+ For more information about this error, try `rustc --explain E0277`.
0 commit comments