<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_parse/src/parser/path.rs, branch 1.80.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.80.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.80.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2024-06-05T22:26:54+00:00</updated>
<entry>
<title>Reduce `pub` exposure.</title>
<updated>2024-06-05T22:26:54+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-06-03T05:47:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=95b4c07ef897974a8978b4a43d0d98103a824f58'/>
<id>urn:sha1:95b4c07ef897974a8978b4a43d0d98103a824f58</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rename HIR `TypeBinding` to `AssocItemConstraint` and related cleanup</title>
<updated>2024-05-30T20:52:33+00:00</updated>
<author>
<name>León Orell Valerian Liehr</name>
<email>me@fmease.dev</email>
</author>
<published>2024-05-27T21:53:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=34c56c45cff1d0029dafd7d19c524975292382af'/>
<id>urn:sha1:34c56c45cff1d0029dafd7d19c524975292382af</id>
<content type='text'>
</content>
</entry>
<entry>
<title>delegation: Implement list delegation</title>
<updated>2024-05-14T23:32:59+00:00</updated>
<author>
<name>Vadim Petrochenkov</name>
<email>vadim.petrochenkov@gmail.com</email>
</author>
<published>2024-03-15T11:21:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c30b41012d474586d407392a6b154e7f19c38b2c'/>
<id>urn:sha1:c30b41012d474586d407392a6b154e7f19c38b2c</id>
<content type='text'>
```rust
reuse prefix::{a, b, c}
```
</content>
</entry>
<entry>
<title>Remove a `Span` from `TokenKind::Interpolated`.</title>
<updated>2024-05-13T00:30:30+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-04-22T06:29:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9a63a42cb787476930f094fdbd9885251ae01de0'/>
<id>urn:sha1:9a63a42cb787476930f094fdbd9885251ae01de0</id>
<content type='text'>
This span records the declaration of the metavariable in the LHS of the macro.
It's used in a couple of error messages. Unfortunately, it gets in the way of
the long-term goal of removing `TokenKind::Interpolated`. So this commit
removes it, which degrades a couple of (obscure) error messages but makes
things simpler and enables the next commit.
</content>
</entry>
<entry>
<title>ignore generics args in attribute paths</title>
<updated>2024-05-10T16:13:27+00:00</updated>
<author>
<name>bohan</name>
<email>bohan-zhang@foxmail.com</email>
</author>
<published>2024-04-24T03:28:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f70f9000362e4d207a6c7d0d63f3b11272878ccc'/>
<id>urn:sha1:f70f9000362e4d207a6c7d0d63f3b11272878ccc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>parser: remove ununsed(no reads) max_angle_bracket_count field</title>
<updated>2024-04-23T08:23:20+00:00</updated>
<author>
<name>klensy</name>
<email>klensy@users.noreply.github.com</email>
</author>
<published>2024-04-23T08:23:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9bd175c8a206cabbca2818d9cf509939b95301a8'/>
<id>urn:sha1:9bd175c8a206cabbca2818d9cf509939b95301a8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rename ModSep to PathSep</title>
<updated>2024-04-04T17:44:04+00:00</updated>
<author>
<name>León Orell Valerian Liehr</name>
<email>me@fmease.dev</email>
</author>
<published>2024-04-04T17:03:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3cbc9e956095401af31a95f82f2d663dc0c8d343'/>
<id>urn:sha1:3cbc9e956095401af31a95f82f2d663dc0c8d343</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Suggest assoc ty bound on lifetime in eq constraint</title>
<updated>2024-03-22T23:17:30+00:00</updated>
<author>
<name>León Orell Valerian Liehr</name>
<email>me@fmease.dev</email>
</author>
<published>2024-03-06T22:49:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3879acbec090b36454c0384cd8602047b806f47a'/>
<id>urn:sha1:3879acbec090b36454c0384cd8602047b806f47a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #122540 - WaffleLapkin:ununexpected, r=estebank</title>
<updated>2024-03-20T04:51:22+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>matthias.krueger@famsik.de</email>
</author>
<published>2024-03-20T04:51:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9fb40efa6d152745aaf118ad2635bc761ef539fe'/>
<id>urn:sha1:9fb40efa6d152745aaf118ad2635bc761ef539fe</id>
<content type='text'>
Do not use `?`-induced skewing of type inference in the compiler

This prevents breakage from #122412 and is generally a good idea.

r? `@estebank`
</content>
</entry>
<entry>
<title>Auto merge of #122055 - compiler-errors:stabilize-atb, r=oli-obk</title>
<updated>2024-03-19T00:04:09+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2024-03-19T00:04:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=21d94a3d2c63cacf8eaf9d0ca770c0b450c558d4'/>
<id>urn:sha1:21d94a3d2c63cacf8eaf9d0ca770c0b450c558d4</id>
<content type='text'>
Stabilize associated type bounds (RFC 2289)

This PR stabilizes associated type bounds, which were laid out in [RFC 2289]. This gives us a shorthand to express nested type bounds that would otherwise need to be expressed with nested `impl Trait` or broken into several `where` clauses.

### What are we stabilizing?

We're stabilizing the associated item bounds syntax, which allows us to put bounds in associated type position within other bounds, i.e. `T: Trait&lt;Assoc: Bounds...&gt;`. See [RFC 2289] for motivation.

In all position, the associated type bound syntax expands into a set of two (or more) bounds, and never anything else (see "How does this differ[...]" section for more info).

Associated type bounds are stabilized in four positions:
* **`where` clauses (and APIT)** - This is equivalent to breaking up the bound into two (or more) `where` clauses. For example, `where T: Trait&lt;Assoc: Bound&gt;` is equivalent to `where T: Trait, &lt;T as Trait&gt;::Assoc: Bound`.
* **Supertraits** - Similar to above, `trait CopyIterator: Iterator&lt;Item: Copy&gt; {}`. This is almost equivalent to breaking up the bound into two (or more) `where` clauses; however, the bound on the associated item is implied whenever the trait is used. See #112573/#112629.
* **Associated type item bounds** - This allows constraining the *nested* rigid projections that are associated with a trait's associated types. e.g. `trait Trait { type Assoc: Trait2&lt;Assoc2: Copy&gt;; }`.
* **opaque item bounds (RPIT, TAIT)** - This allows constraining associated types that are associated with the opaque without having to *name* the opaque. For example, `impl Iterator&lt;Item: Copy&gt;` defines an iterator whose item is `Copy` without having to actually name that item bound.

The latter three are not expressible in surface Rust (though for associated type item bounds, this will change in #120752, which I don't believe should block this PR), so this does represent a slight expansion of what can be expressed in trait bounds.

### How does this differ from the RFC?

Compared to the RFC, the current implementation *always* desugars associated type bounds to sets of `ty::Clause`s internally. Specifically, it does *not* introduce a position-dependent desugaring as laid out in [RFC 2289], and in particular:
* It does *not* desugar to anonymous associated items in associated type item bounds.
* It does *not* desugar to nested RPITs in RPIT bounds, nor nested TAITs in TAIT bounds.

This position-dependent desugaring laid out in the RFC existed simply to side-step limitations of the trait solver, which have mostly been fixed in #120584. The desugaring laid out in the RFC also added unnecessary complication to the design of the feature, and introduces its own limitations to, for example:
* Conditionally lowering to nested `impl Trait` in certain positions such as RPIT and TAIT means that we inherit the limitations of RPIT/TAIT, namely lack of support for higher-ranked opaque inference. See this code example: https://github.com/rust-lang/rust/pull/120752#issuecomment-1979412531.
* Introducing anonymous associated types makes traits no longer object safe, since anonymous associated types are not nameable, and all associated types must be named in `dyn` types.

This last point motivates why this PR is *not* stabilizing support for associated type bounds in `dyn` types, e.g, `dyn Assoc&lt;Item: Bound&gt;`. Why? Because `dyn` types need to have *concrete* types for all associated items, this would necessitate a distinct lowering for associated type bounds, which seems both complicated and unnecessary compared to just requiring the user to write `impl Trait` themselves. See #120719.

### Implementation history:

Limited to the significant behavioral changes and fixes and relevant PRs, ping me if I left something out--
* #57428
* #108063
* #110512
* #112629
* #120719
* #120584

Closes #52662

[RFC 2289]: https://rust-lang.github.io/rfcs/2289-associated-type-bounds.html
</content>
</entry>
</feed>
