rust/compiler/rustc_trait_selection/src/traits
许杰友 Jieyou Xu (Joe) b477f89041
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
2024-06-04 08:25:48 +01:00
..
error_reporting Align Term methods with GenericArg methods 2024-06-03 20:36:27 -04:00
query Nits and formatting 2024-06-03 10:02:08 -04:00
select Rollup merge of #125750 - compiler-errors:expect, r=lcnr 2024-06-04 08:25:48 +01:00
specialize Remove LintDiagnostic::msg 2024-05-23 04:08:35 +02:00
auto_trait.rs Align Term methods with GenericArg methods 2024-06-03 20:36:27 -04:00
coherence.rs Opt-in diagnostics reporting to avoid doing extra work in the new solver 2024-06-03 09:27:52 -04:00
const_evaluatable.rs Remove extern crate rustc_middle from rustc_trait_selection. 2024-05-13 08:20:18 +10:00
engine.rs Nits and formatting 2024-06-03 10:02:08 -04:00
fulfill.rs Auto merge of #125380 - compiler-errors:wc-obj-safety, r=oli-obk 2024-06-04 02:34:20 +00:00
misc.rs Opt-in diagnostics reporting to avoid doing extra work in the new solver 2024-06-03 09:27:52 -04:00
mod.rs Nits and formatting 2024-06-03 10:02:08 -04:00
normalize.rs Align Term methods with GenericArg methods 2024-06-03 20:36:27 -04:00
object_safety.rs check_is_object_safe -> is_object_safe 2024-06-03 09:49:30 -04:00
outlives_bounds.rs Remove extern crate rustc_middle from rustc_trait_selection. 2024-05-13 08:20:18 +10:00
project.rs Auto merge of #124662 - zetanumbers:needs_async_drop, r=oli-obk 2024-05-31 10:12:24 +00:00
structural_match.rs Remove extern crate rustc_middle from rustc_trait_selection. 2024-05-13 08:20:18 +10:00
structural_normalize.rs Nits and formatting 2024-06-03 10:02:08 -04:00
util.rs Auto merge of #125775 - compiler-errors:uplift-closure-args, r=lcnr 2024-06-01 19:07:03 +00:00
vtable.rs Rename ToPredicate for Upcast 2024-05-16 14:23:47 -04:00
wf.rs Align Term methods with GenericArg methods 2024-06-03 20:36:27 -04:00