-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Yeet mir::Const::from_anon_const
#116446
Yeet mir::Const::from_anon_const
#116446
Conversation
r? @b-naber (rustbot has picked a reviewer for you, use r? to override) |
@@ -647,15 +647,35 @@ impl<'tcx> Cx<'tcx> { | |||
out_expr: out_expr.map(|expr| self.mirror_expr(expr)), | |||
}, | |||
hir::InlineAsmOperand::Const { ref anon_const } => { | |||
let value = | |||
mir::Const::from_anon_const(tcx, anon_const.def_id, self.param_env); | |||
let value = mir::Const::Unevaluated( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code is duplicated below. Maybe put this in a function?
☔ The latest upstream changes (presumably #117405) made this pull request unmergeable. Please resolve the merge conflicts. |
@rustbot ready |
ee4cfe8
to
6de5ea5
Compare
@bors r+ rollup |
…_const, r=b-naber Yeet `mir::Const::from_anon_const` Only had one callsite which was easily simplified. Uplifted a comment that I think is much more useful living in `ty::Const` world.
…_const, r=b-naber Yeet `mir::Const::from_anon_const` Only had one callsite which was easily simplified. Uplifted a comment that I think is much more useful living in `ty::Const` world.
Rollup of 6 pull requests Successful merges: - rust-lang#116446 (Yeet `mir::Const::from_anon_const`) - rust-lang#116750 (Add Seek::seek_relative) - rust-lang#117110 (Suggest field typo through derefs) - rust-lang#117961 (Add `x suggest` entries for testing `mir-opt` and `coverage`) - rust-lang#118020 (Fix links to `From<{OwnedHandle, OwnedFd}> for std::process::Child{Stdin, Stdout, Stderr}` in 1.74 release notes) - rust-lang#118034 (bump few deps to fix unsoundness and drop few dup deps) r? `@ghost` `@rustbot` modify labels: rollup
@bors r- |
This pull request caused an error here. |
6de5ea5
to
8bf9c18
Compare
Limited test to just x86_64 for asm support @bors r=b-naber |
…_const, r=b-naber Yeet `mir::Const::from_anon_const` Only had one callsite which was easily simplified. Uplifted a comment that I think is much more useful living in `ty::Const` world.
…llaumeGomez Rollup of 6 pull requests Successful merges: - rust-lang#116446 (Yeet `mir::Const::from_anon_const`) - rust-lang#117871 (remove unused pub fns) - rust-lang#118017 (rustc_lint: address latent TODO) - rust-lang#118199 (Remove `HirId` from `QPath::LangItem`) - rust-lang#118272 (resolve: Avoid clones of `MacroData`) - rust-lang#118291 (rustdoc-search: clean up some DOM code) Failed merges: - rust-lang#118201 (Miscellaneous `ObligationCauseCode` cleanups) - rust-lang#118256 (rustc: `hir().local_def_id_to_hir_id()` -> `tcx.local_def_id_to_hir_id()` cleanup) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#116446 - compiler-errors:yeet-mir-from_anon_const, r=b-naber Yeet `mir::Const::from_anon_const` Only had one callsite which was easily simplified. Uplifted a comment that I think is much more useful living in `ty::Const` world.
/// Literals are converted to `Const::Val`, const generic parameters are eagerly | ||
/// converted to a constant, everything else becomes `Unevaluated`. | ||
#[instrument(skip(tcx), level = "debug", ret)] | ||
pub fn from_anon_const( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for removing this... I never had any clue what it really does, it was such a complicated mess, but it's all sorts of stuff I didn't understand so I was not able to clean it up.
Only had one callsite which was easily simplified.
Uplifted a comment that I think is much more useful living in
ty::Const
world.