about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/ty/generics.rs
AgeCommit message (Collapse)AuthorLines
2023-12-10clean up leftover FIXMEDeadbeef-2/+4
2023-12-10Revert "Don't print host effect param in pretty path_generic_args"Deadbeef-8/+4
This reverts commit f1bf874fb13703d706fc8184407c6df12555d8e9.
2023-12-10filter out trailing effect param in `own_args_no_defaults`Deadbeef-0/+2
2023-12-09Don't print host effect param in pretty path_generic_argsMichael Goulet-4/+8
2023-11-21Fix `clippy::needless_borrow` in the compilerNilstrieb-1/+1
`x clippy compiler -Aclippy::all -Wclippy::needless_borrow --fix`. Then I had to remove a few unnecessary parens and muts that were exposed now.
2023-11-14finish `RegionKind` renamelcnr-5/+5
- `ReFree` -> `ReLateParam` - `ReEarlyBound` -> `ReEarlyParam`
2023-10-27Account for type param from other item in `note_and_explain`Esteban Küber-0/+28
Fix #89868.
2023-10-15Duplicate `~const` bounds with a non-const one in effects desugaringDeadbeef-0/+4
2023-09-14treat host effect params as erased generics in codegenDeadbeef-2/+4
This fixes the changes brought to codegen tests when effect params are added to libcore, by not attempting to monomorphize functions that get the host param by being `const fn`.
2023-09-11add `is_host_effect` to `GenericParamDefKind::Const` and address reviewDeadbeef-3/+3
2023-07-17Rename arg_iter to iter_instantiatedMichael Goulet-1/+1
2023-07-14refactor(rustc_middle): Substs -> GenericArgMahdi Dibaiee-22/+22
2023-07-05Move `TyCtxt::mk_x` to `Ty::new_x` where applicableBoxy-2/+2
2023-07-05Auto merge of #113210 - fee1-dead-contrib:effects-mvp, r=oli-obkbors-0/+3
Effects/keyword generics MVP This adds `feature(effects)`, which adds `const host: bool` to the generics of const functions, const traits and const impls. This will be used to replace the current logic around const traits. r? `@oli-obk`
2023-07-04include `host_effect_index` in `Generics`Deadbeef-0/+3
2023-07-04Replace `const_error` methods with `Const::new_error`Boxy-3/+5
2023-06-26Migrate predicates_of and caller_bounds to ClauseMichael Goulet-4/+3
2023-05-30Rollup merge of #112060 - lcnr:early-binder, r=jackh726Nilstrieb-2/+2
`EarlyBinder::new` -> `EarlyBinder::bind` for consistency with `Binder::bind`. it may make sense to also add `EarlyBinder::dummy` in places where we know that no parameters exist, but I left that out of this PR. r? `@jackh726` `@kylematsuda`
2023-05-29Rename `tcx.mk_re_*` => `Region::new_*`Maybe Waffle-1/+1
2023-05-29EarlyBinder::new -> EarlyBinder::bindlcnr-2/+2
2023-05-28Replace EarlyBinder(x) with EarlyBinder::new(x)Kyle Matsuda-2/+2
2023-05-24Use `Option::is_some_and` and `Result::is_ok_and` in the compilerMaybe Waffle-1/+1
2023-05-14Rename const error methods for consistencyMichael Goulet-1/+1
2023-02-22Rename ty_error_with_guaranteed to ty_error, ty_error to ty_error_miscMichael Goulet-1/+1
2023-02-16remove bound_type_of query; make type_of return EarlyBinder; change type_of ↵Kyle Matsuda-2/+2
in metadata
2023-02-15Add specialized variants of `mk_region`.Nicholas Nethercote-1/+1
Much like there are specialized variants of `mk_ty`. This will enable some optimization in the next commit. Also rename the existing `re_error*` functions as `mk_re_error*`, for consistency.
2023-02-09Use `ErrorGuaranteed` more in `ReError`Esteban Küber-1/+1
2023-02-09Change to `ReError(ErrorGuaranteed)`Esteban Küber-1/+1
2023-02-09Introduce `ReError`Esteban Küber-1/+1
CC #69314
2023-01-15instantiate_own doesn't need to return a pair of vectorsMichael Goulet-9/+3
2023-01-14change const_param_default query to return EarlyBinder; remove ↵Kyle Matsuda-1/+1
bound_const_param_default query; add EarlyBinder to const_param_default in metadata
2022-12-20Remove an unused functionOli Scherer-8/+0
2022-12-10Rollup merge of #105410 - TaKO8Ki:fix-105257, r=BoxyUwUMatthias Krüger-0/+9
Consider `parent_count` for const param defaults Fixes #105257
2022-12-08add a test case for `generic_const_exprs` in trait itemsTakayuki Maeda-2/+2
2022-12-07consider `parent_count` for const param defaultsTakayuki Maeda-0/+9
2022-12-06Add GenericParamDef::to_error and InternalSubsts::extend_with_errorMichael Goulet-0/+14
2022-11-24Use kw::Empty for elided lifetimes in path.Camille GILLOT-1/+10
2022-09-19remove the `Subst` trait, always use `EarlyBinder`lcnr-2/+1
2022-09-08update `ParamKindOrd`lcnr-2/+3
2022-09-07Add instrument and debug callsSantiago Pastorino-0/+1
2022-08-31Fix a bunch of typoDezhi Wu-1/+1
This PR will fix some typos detected by [typos]. I only picked the ones I was sure were spelling errors to fix, mostly in the comments. [typos]: https://github.com/crate-ci/typos
2022-08-29Rollup merge of #99821 - cjgillot:ast-lifetimes-2, r=compiler-errorsDylan DPC-2/+1
Remove separate indexing of early-bound regions ~Based on https://github.com/rust-lang/rust/pull/99728.~ This PR copies some modifications from https://github.com/rust-lang/rust/pull/97839 around object lifetime defaults. These modifications allow to stop counting generic parameters during lifetime resolution, and rely on the indexing given by `rustc_typeck::collect`.
2022-08-21More docsMichael Goulet-0/+4
2022-08-21Rework ambiguity errorsMichael Goulet-0/+11
2022-08-03Compute `object_lifetime_default` per parameter.Camille GILLOT-2/+1
2022-07-07Add bound_const_param_defaultJack Huey-2/+2
2022-06-11Address commentsMichael Goulet-0/+7
2022-06-08note that methods should only be used for diagslcnr-0/+4
2022-06-08dedup diagnostics default params handlinglcnr-1/+36
2022-06-02add new `emit_inference_failure_err`lcnr-0/+29