-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Report correct SelectionError for ConstArgHasType in new solver fulfill
- Loading branch information
1 parent
409998c
commit 5922599
Showing
4 changed files
with
40 additions
and
3 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
4 changes: 2 additions & 2 deletions
4
...14918/const-in-impl-fn-return-type.stderr → ...nst-in-impl-fn-return-type.current.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
15 changes: 15 additions & 0 deletions
15
tests/ui/typeck/issue-114918/const-in-impl-fn-return-type.next.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,15 @@ | ||
error[E0308]: mismatched types | ||
--> $DIR/const-in-impl-fn-return-type.rs:20:39 | ||
| | ||
LL | fn func<const N: u32>() -> [(); { () }] { | ||
| ^^ expected `usize`, found `()` | ||
|
||
error: the constant `N` is not of type `usize` | ||
--> $DIR/const-in-impl-fn-return-type.rs:12:32 | ||
| | ||
LL | fn func<const N: u32>() -> [(); N]; | ||
| ^^^^^^^ expected `usize`, found `u32` | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0308`. |
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