<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_monomorphize, branch 1.69.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.69.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.69.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2023-02-23T20:32:24+00:00</updated>
<entry>
<title>Rename many interner functions.</title>
<updated>2023-02-23T20:32:24+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2023-02-17T03:33:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2200911616c3054f0c090db54ea78bdfb666dade'/>
<id>urn:sha1:2200911616c3054f0c090db54ea78bdfb666dade</id>
<content type='text'>
(This is a large commit. The changes to
`compiler/rustc_middle/src/ty/context.rs` are the most important ones.)

The current naming scheme is a mess, with a mix of `_intern_`, `intern_`
and `mk_` prefixes, with little consistency. In particular, in many
cases it's easy to use an iterator interner when a (preferable) slice
interner is available.

The guiding principles of the new naming system:
- No `_intern_` prefixes.
- The `intern_` prefix is for internal operations.
- The `mk_` prefix is for external operations.
- For cases where there is a slice interner and an iterator interner,
  the former is `mk_foo` and the latter is `mk_foo_from_iter`.

Also, `slice_interners!` and `direct_interners!` can now be `pub` or
non-`pub`, which helps enforce the internal/external operations
division.

It's not perfect, but I think it's a clear improvement.

The following lists show everything that was renamed.

slice_interners
- const_list
  - mk_const_list -&gt; mk_const_list_from_iter
  - intern_const_list -&gt; mk_const_list
- substs
  - mk_substs -&gt; mk_substs_from_iter
  - intern_substs -&gt; mk_substs
  - check_substs -&gt; check_and_mk_substs (this is a weird one)
- canonical_var_infos
  - intern_canonical_var_infos -&gt; mk_canonical_var_infos
- poly_existential_predicates
  - mk_poly_existential_predicates -&gt; mk_poly_existential_predicates_from_iter
  - intern_poly_existential_predicates -&gt; mk_poly_existential_predicates
  - _intern_poly_existential_predicates -&gt; intern_poly_existential_predicates
- predicates
  - mk_predicates -&gt; mk_predicates_from_iter
  - intern_predicates -&gt; mk_predicates
  - _intern_predicates -&gt; intern_predicates
- projs
  - intern_projs -&gt; mk_projs
- place_elems
  - mk_place_elems -&gt; mk_place_elems_from_iter
  - intern_place_elems -&gt; mk_place_elems
- bound_variable_kinds
  - mk_bound_variable_kinds -&gt; mk_bound_variable_kinds_from_iter
  - intern_bound_variable_kinds -&gt; mk_bound_variable_kinds

direct_interners
- region
  - intern_region (unchanged)
- const
  - mk_const_internal -&gt; intern_const
- const_allocation
  - intern_const_alloc -&gt; mk_const_alloc
- layout
  - intern_layout -&gt; mk_layout
- adt_def
  - intern_adt_def -&gt; mk_adt_def_from_data (unusual case, hard to avoid)
  - alloc_adt_def(!) -&gt; mk_adt_def
- external_constraints
  - intern_external_constraints -&gt; mk_external_constraints

Other
- type_list
  - mk_type_list -&gt; mk_type_list_from_iter
  - intern_type_list -&gt; mk_type_list
- tup
  - mk_tup -&gt; mk_tup_from_iter
  - intern_tup -&gt; mk_tup
</content>
</entry>
<entry>
<title>Auto merge of #108340 - eggyal:remove_traversal_trait_aliases, r=oli-obk</title>
<updated>2023-02-22T18:26:51+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2023-02-22T18:26:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fdbc4329cb781c7768ffa6d76c8fa2d032d3fe20'/>
<id>urn:sha1:fdbc4329cb781c7768ffa6d76c8fa2d032d3fe20</id>
<content type='text'>
Remove type-traversal trait aliases

#107924 moved the type traversal (folding and visiting) traits into the type library, but created trait aliases in `rustc_middle` to minimise both the API churn for trait consumers and the arising boilerplate.  As mentioned in that PR, an alternative approach of defining subtraits with blanket implementations of the respective supertraits was also considered at that time but was ruled out as not adding much value.

Unfortunately, it has since emerged that rust-analyzer has difficulty with these trait aliases at present, resulting in a degraded contributor experience (see the recent [r-a has become useless](https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/r-a.20has.20become.20useless) topic on the #t-compiler/help Zulip stream).

This PR removes the trait aliases, and accordingly the underlying type library traits are now used directly; they are parameterised by `TyCtxt&lt;'tcx&gt;` rather than just the `'tcx` lifetime, and imports have been updated to reflect the fact that the trait aliases' explicitly named traits are no longer automatically brought into scope.  These changes also roll-back the (no-longer required) workarounds to #107747 that were made in b409329c624b9e3bbd7d8e07697e2e9f861a45b6.

Since this PR is just a find+replace together with the changes necessary for compilation &amp; tidy to pass, it's currently just one mega-commit.  Let me know if you'd like it broken up.

r? `@oli-obk`
</content>
</entry>
<entry>
<title>Remove type-traversal trait aliases</title>
<updated>2023-02-22T17:04:58+00:00</updated>
<author>
<name>Alan Egerton</name>
<email>eggyal@gmail.com</email>
</author>
<published>2023-02-22T02:18:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=695072daa6cc04045f2aa79d751d884ad5263080'/>
<id>urn:sha1:695072daa6cc04045f2aa79d751d884ad5263080</id>
<content type='text'>
</content>
</entry>
<entry>
<title>errors: generate typed identifiers in each crate</title>
<updated>2023-02-22T09:15:53+00:00</updated>
<author>
<name>David Wood</name>
<email>david.wood@huawei.com</email>
</author>
<published>2022-10-13T09:13:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d1fcf611175e695c35c6cc0537d710277c1a5c6f'/>
<id>urn:sha1:d1fcf611175e695c35c6cc0537d710277c1a5c6f</id>
<content type='text'>
Instead of loading the Fluent resources for every crate in
`rustc_error_messages`, each crate generates typed identifiers for its
own diagnostics and creates a static which are pulled together in the
`rustc_driver` crate and provided to the diagnostic emitter.

Signed-off-by: David Wood &lt;david.wood@huawei.com&gt;
</content>
</entry>
<entry>
<title>remove bound_type_of query; make type_of return EarlyBinder; change type_of in metadata</title>
<updated>2023-02-17T00:05:56+00:00</updated>
<author>
<name>Kyle Matsuda</name>
<email>kyle.yoshio.matsuda@gmail.com</email>
</author>
<published>2023-02-07T08:29:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c183110cc26abb506dba0a4def917735fb6eb6f0'/>
<id>urn:sha1:c183110cc26abb506dba0a4def917735fb6eb6f0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>change usages of type_of to bound_type_of</title>
<updated>2023-02-17T00:01:52+00:00</updated>
<author>
<name>Kyle Matsuda</name>
<email>kyle.yoshio.matsuda@gmail.com</email>
</author>
<published>2023-02-07T00:48:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d822b97a27e50f5a091d2918f6ff0ffd2d2827f5'/>
<id>urn:sha1:d822b97a27e50f5a091d2918f6ff0ffd2d2827f5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Move query out of path.</title>
<updated>2023-02-14T20:27:38+00:00</updated>
<author>
<name>Camille GILLOT</name>
<email>gillot.camille@gmail.com</email>
</author>
<published>2023-02-14T18:12:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=065f0b222d4e23ae3d4215061c5df7d248855717'/>
<id>urn:sha1:065f0b222d4e23ae3d4215061c5df7d248855717</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Do not fetch HIR to monomorphize impls.</title>
<updated>2023-02-14T20:26:04+00:00</updated>
<author>
<name>Camille GILLOT</name>
<email>gillot.camille@gmail.com</email>
</author>
<published>2023-02-12T19:46:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0d39f9d94d2eddd31e4743ae1e3ea269bb3e0984'/>
<id>urn:sha1:0d39f9d94d2eddd31e4743ae1e3ea269bb3e0984</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add `of_trait` to DefKind::Impl.</title>
<updated>2023-02-14T19:55:44+00:00</updated>
<author>
<name>Camille GILLOT</name>
<email>gillot.camille@gmail.com</email>
</author>
<published>2023-02-12T18:26:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=03dff82d598233d4f1193d763f73c71a76ad6187'/>
<id>urn:sha1:03dff82d598233d4f1193d763f73c71a76ad6187</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Make visiting traits generic over the Interner</title>
<updated>2023-02-13T10:24:49+00:00</updated>
<author>
<name>Alan Egerton</name>
<email>eggyal@gmail.com</email>
</author>
<published>2023-02-09T19:38:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=dea342d8615fcd0dd6638a3f0f1cda9062286d8e'/>
<id>urn:sha1:dea342d8615fcd0dd6638a3f0f1cda9062286d8e</id>
<content type='text'>
</content>
</entry>
</feed>
