diff options
| author | Michael Goulet <michael@errs.io> | 2023-03-13 18:54:05 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-03-21 15:38:51 +0000 |
| commit | 2eb1c08e433aadf2362a65f2ef1387670a6d34cf (patch) | |
| tree | 1d8465f4d80adbbe4a44dd72eedc3361bd2b8f7c /compiler/rustc_passes/src/check_const.rs | |
| parent | a01b4cc9f375f1b95fa8195daeea938d3d9c4c34 (diff) | |
| download | rust-2eb1c08e433aadf2362a65f2ef1387670a6d34cf.tar.gz rust-2eb1c08e433aadf2362a65f2ef1387670a6d34cf.zip | |
Use local key in providers
Diffstat (limited to 'compiler/rustc_passes/src/check_const.rs')
| -rw-r--r-- | compiler/rustc_passes/src/check_const.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_passes/src/check_const.rs b/compiler/rustc_passes/src/check_const.rs index 526b829bf67..30dd3e4d016 100644 --- a/compiler/rustc_passes/src/check_const.rs +++ b/compiler/rustc_passes/src/check_const.rs @@ -104,9 +104,7 @@ impl<'tcx> CheckConstVisitor<'tcx> { // If this crate is not using stability attributes, or this function is not claiming to be a // stable `const fn`, that is all that is required. - if !tcx.features().staged_api - || tcx.has_attr(def_id.to_def_id(), sym::rustc_const_unstable) - { + if !tcx.features().staged_api || tcx.has_attr(def_id, sym::rustc_const_unstable) { return true; } |
