-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
103 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/test/ui/rfc-2632-const-trait-impl/call-generic-method-fail.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
src/test/ui/rfc-2632-const-trait-impl/impl-tilde-const-trait.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
error: expected a trait, found type | ||
--> $DIR/impl-tilde-const-trait.rs:6:6 | ||
| | ||
LL | impl ~const T for S {} | ||
| ^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
src/test/ui/rfc-2632-const-trait-impl/tilde-const-invalid-places.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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, 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, 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, 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, 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, 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, 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 | ||
|