diff options
| author | Ralf Jung <post@ralfj.de> | 2024-10-12 20:37:35 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-10-25 20:52:39 +0200 |
| commit | 8849ac6042770500db91aca860ec8d86af2c74a3 (patch) | |
| tree | 71e46c27b69586ca57b35052526aa8751b31fadf /src/librustdoc/clean | |
| parent | 36dda4571dc3b98ac9759b8af67887e170a426d7 (diff) | |
| download | rust-8849ac6042770500db91aca860ec8d86af2c74a3.tar.gz rust-8849ac6042770500db91aca860ec8d86af2c74a3.zip | |
tcx.is_const_fn doesn't work the way it is described, remove it
Then we can rename the _raw functions to drop their suffix, and instead explicitly use is_stable_const_fn for the few cases where that is really what you want.
Diffstat (limited to 'src/librustdoc/clean')
| -rw-r--r-- | src/librustdoc/clean/types.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustdoc/clean/types.rs b/src/librustdoc/clean/types.rs index 1c060fa0150..c62144be3da 100644 --- a/src/librustdoc/clean/types.rs +++ b/src/librustdoc/clean/types.rs @@ -640,7 +640,7 @@ impl Item { asyncness: ty::Asyncness, ) -> hir::FnHeader { let sig = tcx.fn_sig(def_id).skip_binder(); - let constness = if tcx.is_const_fn_raw(def_id) { + let constness = if tcx.is_const_fn(def_id) { hir::Constness::Const } else { hir::Constness::NotConst @@ -662,7 +662,7 @@ impl Item { safety }, abi, - constness: if tcx.is_const_fn_raw(def_id) { + constness: if tcx.is_const_fn(def_id) { hir::Constness::Const } else { hir::Constness::NotConst |
