-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use correct
hir_id
for array const arg infers
- Loading branch information
Showing
3 changed files
with
22 additions
and
5 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
12 changes: 12 additions & 0 deletions
12
tests/ui/const-generics/generic_arg_infer/array-repeat-expr-lib.rs
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,12 @@ | ||
//@ check-pass | ||
|
||
#![feature(generic_arg_infer)] | ||
#![crate_type = "lib"] | ||
|
||
// Test that encoding the hallucinated `DefId` for the `_` const argument doesn't | ||
// ICE (see #133468). This requires this to be a library crate. | ||
|
||
pub fn foo() { | ||
let s: [u8; 10]; | ||
s = [0; _]; | ||
} |