-
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.
Rollup merge of #114670 - compiler-errors:issue-114660, r=cjgillot
Don't use `type_of` to determine if item has intrinsic shim When we're calling `resolve_instance` on an inline const, we were previously looking at the `type_of` for that const, seeing that it was an `extern "intrinsic"` fn def, and treating it as if we were computing the instance of that intrinsic itself. This is incorrect. Instead, we should be using the def-id of the item we're computing to determine if it's an intrinsic. Fixes #114660
- Loading branch information
Showing
2 changed files
with
40 additions
and
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// check-pass | ||
// issue: 114660 | ||
|
||
#![feature(inline_const)] | ||
|
||
fn main() { | ||
const { core::mem::transmute::<u8, u8> }; | ||
// Don't resolve the instance of this inline constant to be an intrinsic, | ||
// even if the type of the constant is `extern "intrinsic" fn(u8) -> u8`. | ||
} |