summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/astconv
AgeCommit message (Collapse)AuthorLines
2023-07-05Move `TyCtxt::mk_x` to `Ty::new_x` where applicableBoxy-47/+48
2023-07-05Only use a single loop over the associated typesOli Scherer-5/+2
2023-07-05Prefer `retain` over hand-rolling an inefficient version of itOli Scherer-7/+3
2023-07-05tidy: move a large function out of an even larger fileOli Scherer-406/+418
2023-07-05Lint now-unnecessary associated type boundsOli Scherer-3/+21
2023-07-05Don't require associated types with `Self: Sized` bounds in `dyn Trait` objectsOli Scherer-0/+10
2023-07-04Replace `const_error` methods with `Const::new_error`Boxy-10/+10
2023-07-04Replace `mk_const` with `Const::new_x` methodsBoxy-6/+6
2023-07-03remove TypeWellFormedFromEnvMichael Goulet-2/+1
2023-07-03Don't perform selection if IATs are not enabledLeón Orell Valerian Liehr-5/+9
2023-07-01Auto merge of #113154 - lcnr:better-probe-check, r=compiler-errorsbors-1/+1
change snapshot tracking in fulfillment contexts use the exact snapshot number to prevent misuse even when created inside of a snapshot
2023-06-29Intern OpaqueTy on ItemKind::OpaqueTySantiago Pastorino-1/+1
2023-06-29change snapshot tracking in fulfillment contextslcnr-1/+1
2023-06-27pass PredicateFilter to compute_boundsMichael Goulet-35/+45
2023-06-26TypeWellFormedInEnvMichael Goulet-1/+2
2023-06-26Migrate predicates_of and caller_bounds to ClauseMichael Goulet-35/+24
2023-06-23Rollup merge of #112983 - spastorino:new-rpitit-23, r=compiler-errorsMichael Goulet-6/+14
Fix return type notation associated type suggestion when -Zlower-impl-trait-in-trait-to-assoc-ty This avoid suggesting the associated types generated for RPITITs when the one the code refers to doesn't exist and rustc looks for a suggestion. r? `@compiler-errors`
2023-06-23Fix associated type suggestion when -Zlower-impl-trait-in-trait-to-assoc-tySantiago Pastorino-6/+14
2023-06-23Fix return type notation errors with -Zlower-impl-trait-in-trait-to-assoc-tySantiago Pastorino-1/+1
2023-06-21Rollup merge of #112853 - GuillaumeGomez:type_alias_type, r=oli-obkGuillaume Gomez-1/+1
Add `lazy_type_alias` feature gate Add the `type_alias_type` to be able to have the weak alias used without restrictions. Part of #112792. cc `@compiler-errors` r? `@oli-obk`
2023-06-21Add `lazy_type_alias` feature gateGuillaume Gomez-1/+1
2023-06-19Fully fledged Clause typeMichael Goulet-2/+2
2023-06-19s/Clause/ClauseKindMichael Goulet-11/+13
2023-06-18Rollup merge of #112734 - dswij:bounds-predicates-clause, r=compiler-errorsMatthias Krüger-2/+4
Make `Bound::predicates` use `Clause` Part of #107250 `Bound::predicates` returns an iterator over `Binder<_, Clause>` instead of `Predicate`. I tried updating `explicit_predicates_of` as well, but it seems that it needs a lot more change than I thought. Will do it in a separate PR instead.
2023-06-17Move some bounds computation out of astconv into its own fileMichael Goulet-567/+585
2023-06-17Move ConstEvaluatable to ClauseMichael Goulet-2/+2
2023-06-17Move WF goal to clauseMichael Goulet-3/+4
2023-06-17`Bound::predicates` to return `Clause`dswij-2/+4
2023-06-16Pacify tidyOli Scherer-116/+128
2023-06-16Add `AliasKind::Weak` for type aliases.Oli Scherer-1/+13
Only use it when the type alias contains an opaque type. Also does wf-checking on such type aliases.
2023-06-11iat selection: normalize self ty & completely erase bound varsLeón Orell Valerian Liehr-19/+57
2023-06-07Auto merge of #111047 - compiler-errors:rtn-no-ty-ct-params, r=spastorinobors-39/+24
Emit an error when return-type-notation is used with type/const params These are not intended to be supported initially, even though the compiler supports them internally...
2023-06-05Remove redundant InferCtxtExt::fresh_item_substsMichael Goulet-36/+1
2023-06-05Emit an error when RTN is used with ty/ct paramsMichael Goulet-3/+23
2023-06-05Merge method, type and const object safety checksOli Scherer-0/+4
2023-06-05Avoid going through queries if a value of type `AssocItem` is already availableOli Scherer-1/+1
2023-05-30Rollup merge of #112060 - lcnr:early-binder, r=jackh726Nilstrieb-1/+1
`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-15/+17
2023-05-29EarlyBinder::new -> EarlyBinder::bindlcnr-1/+1
2023-05-28Replace EarlyBinder(x) with EarlyBinder::new(x)Kyle Matsuda-1/+1
2023-05-26print const and type errors in braces not square bracketsBoxy-1/+1
2023-05-24Use `Option::is_some_and` and `Result::is_ok_and` in the compilerMaybe Waffle-3/+3
2023-05-18Rollup merge of #111633 - nnethercote:avoid-ref-format, r=WaffleLapkinDylan DPC-2/+2
Avoid `&format("...")` calls in error message code. Some error message cleanups. Best reviewed one commit at a time. r? `@davidtwco`
2023-05-17Rollup merge of #111588 - MU001999:diag/improve-e0782, r=fee1-deadDylan DPC-4/+3
Emits E0599 when meeting `MyTrait::missing_method` Fixes #111312
2023-05-17Emits E0599 when meeting MyTrait::missing_methodmu001999-4/+3
2023-05-16Avoid `&format("...")` calls in error message code.Nicholas Nethercote-2/+2
Error message all end up passing into a function as an `impl Into<{D,Subd}iagnosticMessage>`. If an error message is creatd as `&format("...")` that means we allocate a string (in the `format!` call), then take a reference, and then clone (allocating again) the reference to produce the `{D,Subd}iagnosticMessage`, which is silly. This commit removes the leading `&` from a lot of these cases. This means the original `String` is moved into the `{D,Subd}iagnosticMessage`, avoiding the double allocations. This requires changing some function argument types from `&str` to `String` (when all arguments are `String`) or `impl Into<{D,Subd}iagnosticMessage>` (when some arguments are `String` and some are `&str`).
2023-05-14Rename const error methods for consistencyMichael Goulet-4/+4
2023-05-08Rollup merge of #109410 - fmease:iat-alias-kind-inherent, r=compiler-errorsMichael Goulet-26/+35
Introduce `AliasKind::Inherent` for inherent associated types Allows us to check (possibly generic) inherent associated types for well-formedness. Type inference now also works properly. Follow-up to #105961. Supersedes #108430. Fixes #106722. Fixes #108957. Fixes #109768. Fixes #109789. Fixes #109790. ~Not to be merged before #108860 (`AliasKind::Weak`).~ CC `@jackh726` r? `@compiler-errors` `@rustbot` label T-types F-inherent_associated_types
2023-05-07Auto merge of #111161 - compiler-errors:rtn-super, r=cjgillotbors-8/+49
Support return-type bounds on associated methods from supertraits Support `T: Trait<method(): Bound>` when `method` comes from a supertrait, aligning it with the behavior of associated type bounds (both equality and trait bounds). The only wrinkle is that I have to extend `super_predicates_that_define_assoc_type` to look for *all* items, not just `AssocKind::Ty`. This will also be needed to support `feature(associated_const_equality)` as well, which is subtly broken when it comes to supertraits, though this PR does not fix those yet. There's a slight chance there's a perf regression here, in which case I guess I could split it out into a separate query.
2023-05-04IAT: Introduce AliasKind::InherentLeón Orell Valerian Liehr-26/+35