about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/traits/auto_trait.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-07-18 11:01:19 +0000
committerbors <bors@rust-lang.org>2024-07-18 11:01:19 +0000
commitb01a977b0737e177f9b03949b908c250020d0119 (patch)
treec62596a31c5c6fa8fdd541958183ef4e9b1ab6b1 /compiler/rustc_trait_selection/src/traits/auto_trait.rs
parent52f3c71c8dc4aaed71e3035995fcbdd6d78c98c6 (diff)
parent16d2b61335c33d7ef6db93ef533ebcca3991e4a2 (diff)
downloadrust-b01a977b0737e177f9b03949b908c250020d0119.tar.gz
rust-b01a977b0737e177f9b03949b908c250020d0119.zip
Auto merge of #127906 - tgross35:rollup-41bhgce, r=tgross35
Rollup of 7 pull requests

Successful merges:

 - #127491 (Migrate 8 very similar FFI `run-make` tests to rmake)
 - #127687 (Const-to-pattern-to-MIR cleanup)
 - #127822 (Migrate `issue-85401-static-mir`, `missing-crate-dependency` and `unstable-flag-required` `run-make` tests to rmake)
 - #127842 (Remove `TrailingToken`.)
 - #127864 (cleanup: remove support for 3DNow! cpu features)
 - #127899 (Mark myself as on leave)
 - #127901 (Add missing GHA group for building `llvm-bitcode-linker`)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits/auto_trait.rs')
-rw-r--r--compiler/rustc_trait_selection/src/traits/auto_trait.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/auto_trait.rs b/compiler/rustc_trait_selection/src/traits/auto_trait.rs
index 1d32ef2ccd9..796f7fd5a54 100644
--- a/compiler/rustc_trait_selection/src/traits/auto_trait.rs
+++ b/compiler/rustc_trait_selection/src/traits/auto_trait.rs
@@ -765,8 +765,8 @@ impl<'tcx> AutoTraitFinder<'tcx> {
                                 unevaluated,
                                 obligation.cause.span,
                             ) {
-                                Ok(Some(valtree)) => Ok(ty::Const::new_value(selcx.tcx(),valtree, self.tcx.type_of(unevaluated.def).instantiate(self.tcx, unevaluated.args))),
-                                Ok(None) => {
+                                Ok(Ok(valtree)) => Ok(ty::Const::new_value(selcx.tcx(),valtree, self.tcx.type_of(unevaluated.def).instantiate(self.tcx, unevaluated.args))),
+                                Ok(Err(_)) => {
                                     let tcx = self.tcx;
                                     let reported =
                                         tcx.dcx().emit_err(UnableToConstructConstantValue {