diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-03-14 09:10:28 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-03-18 09:34:08 +0000 |
| commit | adda9da604a7f384d2714ec055d9c70018b163d1 (patch) | |
| tree | fd98ef0d7e242c835b705d2bccad0b9df0ec96f6 /compiler/rustc_trait_selection/src/traits/const_evaluatable.rs | |
| parent | a42873e85bcdcc83c3161309e0408f2147778523 (diff) | |
| download | rust-adda9da604a7f384d2714ec055d9c70018b163d1.tar.gz rust-adda9da604a7f384d2714ec055d9c70018b163d1.zip | |
Avoid various uses of `Option<Span>` in favor of using `DUMMY_SP` in the few cases that used `None`
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits/const_evaluatable.rs')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/const_evaluatable.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs b/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs index 7f0f9a12d6a..9ca1dd4557d 100644 --- a/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs +++ b/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs @@ -68,7 +68,7 @@ pub fn is_const_evaluatable<'tcx>( tcx.dcx().span_bug(span, "evaluating `ConstKind::Expr` is not currently supported"); } ty::ConstKind::Unevaluated(uv) => { - let concrete = infcx.const_eval_resolve(param_env, uv, Some(span)); + let concrete = infcx.const_eval_resolve(param_env, uv, span); match concrete { Err(ErrorHandled::TooGeneric(_)) => { Err(NotConstEvaluatable::Error(infcx.dcx().span_delayed_bug( @@ -99,7 +99,7 @@ pub fn is_const_evaluatable<'tcx>( // and hopefully soon change this to an error. // // See #74595 for more details about this. - let concrete = infcx.const_eval_resolve(param_env, uv, Some(span)); + let concrete = infcx.const_eval_resolve(param_env, uv, span); match concrete { // If we're evaluating a generic foreign constant, under a nightly compiler while // the current crate does not enable `feature(generic_const_exprs)`, abort |
