about summary refs log tree commit diff
path: root/compiler/rustc_query_impl/src
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2024-06-04 08:25:48 +0100
committerGitHub <noreply@github.com>2024-06-04 08:25:48 +0100
commitb477f890417fedbb4178b1f7385e939cb6eac32f (patch)
tree25d8b36e031118811cc099f974fc68456a842efa /compiler/rustc_query_impl/src
parent6c2cf0b0386e34bfe372c5f949bd0dfcd226283e (diff)
parent273b990554fa2a7efdd975ccf2ef490c6c90cbaf (diff)
downloadrust-b477f890417fedbb4178b1f7385e939cb6eac32f.tar.gz
rust-b477f890417fedbb4178b1f7385e939cb6eac32f.zip
Rollup merge of #125750 - compiler-errors:expect, r=lcnr
Align `Term` methods with `GenericArg` methods, add `Term::expect_*`

* `Term::ty` -> `Term::as_type`.
* `Term::ct` -> `Term::as_const`.
* Adds `Term::expect_type` and `Term::expect_const`, and uses them in favor of `.ty().unwrap()`, etc.

I could also shorten these to `as_ty` and then do `GenericArg::as_ty` as well, but I do think the `as_` is important to signal that this is a conversion method, and not a getter, like `Const::ty` is.

r? types
Diffstat (limited to 'compiler/rustc_query_impl/src')
0 files changed, 0 insertions, 0 deletions