-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Rename tcx.ensure()
to tcx.ensure_ok()
, and improve the associated docs
#136279
Conversation
Some changes occurred to the CTFE / Miri interpreter cc @rust-lang/miri, @rust-lang/wg-const-eval Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3 Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
(All of the changes outside the query system are just applying the renames.) |
This comment has been minimized.
This comment has been minimized.
Also adjust query calls in librustdoc (diff). |
This comment has been minimized.
This comment has been minimized.
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
Also fix clippy (diff). |
This comment has been minimized.
This comment has been minimized.
r? @oli-obk |
☔ The latest upstream changes (presumably #136332) made this pull request unmergeable. Please resolve the merge conflicts. |
r=me after a rebase |
Rebased to resolve conflicts; I'll put this in the queue when PR CI is green. |
@bors r=oli-obk This might be rotty, but I'll worry about that if it actually starts conflicting. |
Rename `tcx.ensure()` to `tcx.ensure_ok()`, and improve the associated docs This is all based on my archaeology for https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/.60TyCtxtEnsure.60. The main renamings are: - `tcx.ensure()` → `tcx.ensure_ok()` - `tcx.ensure_with_value()` → `tcx.ensure_done()` - Query modifier `ensure_forwards_result_if_red` → `return_result_from_ensure_ok` Hopefully these new names are a better fit for the *actual* function and purpose of these query call modes.
Rollup of 11 pull requests Successful merges: - rust-lang#133266 (ci: fix explanation why LLVM download is disabled for windows-gnu) - rust-lang#134740 (Add amdgpu target) - rust-lang#135836 (bootstrap: only build `crt{begin,end}.o` when compiling to MUSL) - rust-lang#136154 (Use +secure-plt for powerpc-unknown-linux-gnu{,spe}) - rust-lang#136279 (Rename `tcx.ensure()` to `tcx.ensure_ok()`, and improve the associated docs) - rust-lang#136283 (Update encode_utf16 to mention it is native endian) - rust-lang#136309 (set rustc dylib on manually constructed rustc command) - rust-lang#136328 (Rework "long type names" printing logic) - rust-lang#136339 (CompileTest: Add Directives to Ignore `arm-unknown-*` Targets) - rust-lang#136358 (`#[optimize(none)]` implies `#[inline(never)]`) - rust-lang#136368 (Make comma separated lists of anything easier to make for errors) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 11 pull requests Successful merges: - rust-lang#133266 (ci: fix explanation why LLVM download is disabled for windows-gnu) - rust-lang#134740 (Add amdgpu target) - rust-lang#135836 (bootstrap: only build `crt{begin,end}.o` when compiling to MUSL) - rust-lang#136154 (Use +secure-plt for powerpc-unknown-linux-gnu{,spe}) - rust-lang#136279 (Rename `tcx.ensure()` to `tcx.ensure_ok()`, and improve the associated docs) - rust-lang#136283 (Update encode_utf16 to mention it is native endian) - rust-lang#136309 (set rustc dylib on manually constructed rustc command) - rust-lang#136328 (Rework "long type names" printing logic) - rust-lang#136339 (CompileTest: Add Directives to Ignore `arm-unknown-*` Targets) - rust-lang#136358 (`#[optimize(none)]` implies `#[inline(never)]`) - rust-lang#136368 (Make comma separated lists of anything easier to make for errors) r? `@ghost` `@rustbot` modify labels: rollup
Rename `tcx.ensure()` to `tcx.ensure_ok()`, and improve the associated docs This is all based on my archaeology for https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/.60TyCtxtEnsure.60. The main renamings are: - `tcx.ensure()` → `tcx.ensure_ok()` - `tcx.ensure_with_value()` → `tcx.ensure_done()` - Query modifier `ensure_forwards_result_if_red` → `return_result_from_ensure_ok` Hopefully these new names are a better fit for the *actual* function and purpose of these query call modes.
Rollup of 10 pull requests Successful merges: - rust-lang#133266 (ci: fix explanation why LLVM download is disabled for windows-gnu) - rust-lang#134740 (Add amdgpu target) - rust-lang#135836 (bootstrap: only build `crt{begin,end}.o` when compiling to MUSL) - rust-lang#136279 (Rename `tcx.ensure()` to `tcx.ensure_ok()`, and improve the associated docs) - rust-lang#136283 (Update encode_utf16 to mention it is native endian) - rust-lang#136309 (set rustc dylib on manually constructed rustc command) - rust-lang#136328 (Rework "long type names" printing logic) - rust-lang#136339 (CompileTest: Add Directives to Ignore `arm-unknown-*` Targets) - rust-lang#136358 (`#[optimize(none)]` implies `#[inline(never)]`) - rust-lang#136368 (Make comma separated lists of anything easier to make for errors) r? `@ghost` `@rustbot` modify labels: rollup try-job: dist-powerpc64-linux
Rename `tcx.ensure()` to `tcx.ensure_ok()`, and improve the associated docs This is all based on my archaeology for https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/.60TyCtxtEnsure.60. The main renamings are: - `tcx.ensure()` → `tcx.ensure_ok()` - `tcx.ensure_with_value()` → `tcx.ensure_done()` - Query modifier `ensure_forwards_result_if_red` → `return_result_from_ensure_ok` Hopefully these new names are a better fit for the *actual* function and purpose of these query call modes.
Rollup of 5 pull requests Successful merges: - rust-lang#133266 (ci: fix explanation why LLVM download is disabled for windows-gnu) - rust-lang#135836 (bootstrap: only build `crt{begin,end}.o` when compiling to MUSL) - rust-lang#136279 (Rename `tcx.ensure()` to `tcx.ensure_ok()`, and improve the associated docs) - rust-lang#136328 (Rework "long type names" printing logic) - rust-lang#136358 (`#[optimize(none)]` implies `#[inline(never)]`) r? `@ghost` `@rustbot` modify labels: rollup try-job: dist-powerpc64-linux
Rollup of 11 pull requests Successful merges: - rust-lang#133266 (ci: fix explanation why LLVM download is disabled for windows-gnu) - rust-lang#134740 (Add amdgpu target) - rust-lang#135836 (bootstrap: only build `crt{begin,end}.o` when compiling to MUSL) - rust-lang#136154 (Use +secure-plt for powerpc-unknown-linux-gnu{,spe}) - rust-lang#136279 (Rename `tcx.ensure()` to `tcx.ensure_ok()`, and improve the associated docs) - rust-lang#136283 (Update encode_utf16 to mention it is native endian) - rust-lang#136309 (set rustc dylib on manually constructed rustc command) - rust-lang#136328 (Rework "long type names" printing logic) - rust-lang#136339 (CompileTest: Add Directives to Ignore `arm-unknown-*` Targets) - rust-lang#136358 (`#[optimize(none)]` implies `#[inline(never)]`) - rust-lang#136368 (Make comma separated lists of anything easier to make for errors) r? `@ghost` `@rustbot` modify labels: rollup try-job: dist-powerpc64-linux
Rollup of 11 pull requests Successful merges: - rust-lang#133266 (ci: fix explanation why LLVM download is disabled for windows-gnu) - rust-lang#134740 (Add amdgpu target) - rust-lang#135836 (bootstrap: only build `crt{begin,end}.o` when compiling to MUSL) - rust-lang#136154 (Use +secure-plt for powerpc-unknown-linux-gnu{,spe}) - rust-lang#136279 (Rename `tcx.ensure()` to `tcx.ensure_ok()`, and improve the associated docs) - rust-lang#136283 (Update encode_utf16 to mention it is native endian) - rust-lang#136309 (set rustc dylib on manually constructed rustc command) - rust-lang#136328 (Rework "long type names" printing logic) - rust-lang#136339 (CompileTest: Add Directives to Ignore `arm-unknown-*` Targets) - rust-lang#136358 (`#[optimize(none)]` implies `#[inline(never)]`) - rust-lang#136368 (Make comma separated lists of anything easier to make for errors) r? `@ghost` `@rustbot` modify labels: rollup try-job: dist-powerpc64-linux
Rename `tcx.ensure()` to `tcx.ensure_ok()`, and improve the associated docs This is all based on my archaeology for https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/.60TyCtxtEnsure.60. The main renamings are: - `tcx.ensure()` → `tcx.ensure_ok()` - `tcx.ensure_with_value()` → `tcx.ensure_done()` - Query modifier `ensure_forwards_result_if_red` → `return_result_from_ensure_ok` Hopefully these new names are a better fit for the *actual* function and purpose of these query call modes.
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#133266 (ci: fix explanation why LLVM download is disabled for windows-gnu) - rust-lang#134740 (Add amdgpu target) - rust-lang#136133 (Fix sentence in process::abort) - rust-lang#136154 (Use +secure-plt for powerpc-unknown-linux-gnu{,spe}) - rust-lang#136279 (Rename `tcx.ensure()` to `tcx.ensure_ok()`, and improve the associated docs) - rust-lang#136328 (Rework "long type names" printing logic) - rust-lang#136358 (`#[optimize(none)]` implies `#[inline(never)]`) - rust-lang#136368 (Make comma separated lists of anything easier to make for errors) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#133266 (ci: fix explanation why LLVM download is disabled for windows-gnu) - rust-lang#134740 (Add amdgpu target) - rust-lang#136133 (Fix sentence in process::abort) - rust-lang#136154 (Use +secure-plt for powerpc-unknown-linux-gnu{,spe}) - rust-lang#136279 (Rename `tcx.ensure()` to `tcx.ensure_ok()`, and improve the associated docs) - rust-lang#136328 (Rework "long type names" printing logic) - rust-lang#136358 (`#[optimize(none)]` implies `#[inline(never)]`) - rust-lang#136368 (Make comma separated lists of anything easier to make for errors) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#133266 (ci: fix explanation why LLVM download is disabled for windows-gnu) - rust-lang#134740 (Add amdgpu target) - rust-lang#136133 (Fix sentence in process::abort) - rust-lang#136154 (Use +secure-plt for powerpc-unknown-linux-gnu{,spe}) - rust-lang#136279 (Rename `tcx.ensure()` to `tcx.ensure_ok()`, and improve the associated docs) - rust-lang#136328 (Rework "long type names" printing logic) - rust-lang#136358 (`#[optimize(none)]` implies `#[inline(never)]`) - rust-lang#136368 (Make comma separated lists of anything easier to make for errors) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#133266 (ci: fix explanation why LLVM download is disabled for windows-gnu) - rust-lang#136133 (Fix sentence in process::abort) - rust-lang#136279 (Rename `tcx.ensure()` to `tcx.ensure_ok()`, and improve the associated docs) - rust-lang#136328 (Rework "long type names" printing logic) - rust-lang#136358 (`#[optimize(none)]` implies `#[inline(never)]`) - rust-lang#136368 (Make comma separated lists of anything easier to make for errors) - rust-lang#136412 (Tweak fn pointer suggestion span) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#136279 - Zalathar:ensure-ok, r=oli-obk Rename `tcx.ensure()` to `tcx.ensure_ok()`, and improve the associated docs This is all based on my archaeology for https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/.60TyCtxtEnsure.60. The main renamings are: - `tcx.ensure()` → `tcx.ensure_ok()` - `tcx.ensure_with_value()` → `tcx.ensure_done()` - Query modifier `ensure_forwards_result_if_red` → `return_result_from_ensure_ok` Hopefully these new names are a better fit for the *actual* function and purpose of these query call modes.
Rename `tcx.ensure()` to `tcx.ensure_ok()`, and improve the associated docs This is all based on my archaeology for https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/.60TyCtxtEnsure.60. The main renamings are: - `tcx.ensure()` → `tcx.ensure_ok()` - `tcx.ensure_with_value()` → `tcx.ensure_done()` - Query modifier `ensure_forwards_result_if_red` → `return_result_from_ensure_ok` Hopefully these new names are a better fit for the *actual* function and purpose of these query call modes.
Rename `tcx.ensure()` to `tcx.ensure_ok()`, and improve the associated docs This is all based on my archaeology for https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/.60TyCtxtEnsure.60. The main renamings are: - `tcx.ensure()` → `tcx.ensure_ok()` - `tcx.ensure_with_value()` → `tcx.ensure_done()` - Query modifier `ensure_forwards_result_if_red` → `return_result_from_ensure_ok` Hopefully these new names are a better fit for the *actual* function and purpose of these query call modes.
This is all based on my archaeology for https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/.60TyCtxtEnsure.60.
The main renamings are:
tcx.ensure()
→tcx.ensure_ok()
tcx.ensure_with_value()
→tcx.ensure_done()
ensure_forwards_result_if_red
→return_result_from_ensure_ok
Hopefully these new names are a better fit for the actual function and purpose of these query call modes.