<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_parse/src/parser/path.rs, branch 1.79.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.79.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.79.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2024-04-23T08:23:20+00:00</updated>
<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>
<entry>
<title>Make `unexpected` always "return" `PResult&lt;()&gt;` &amp; add `unexpected_any`</title>
<updated>2024-03-15T11:36:21+00:00</updated>
<author>
<name>Maybe Waffle</name>
<email>waffle.lapkin@gmail.com</email>
</author>
<published>2024-03-15T11:36:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=defcc44238d9d79b7bcf5dfae2ec33001f568dd0'/>
<id>urn:sha1:defcc44238d9d79b7bcf5dfae2ec33001f568dd0</id>
<content type='text'>
This prevents breakage when `?` no longer skews inference.
</content>
</entry>
<entry>
<title>Fix ICE in diagnostics for parenthesized type arguments</title>
<updated>2024-03-12T20:32:21+00:00</updated>
<author>
<name>Daniel Sedlak</name>
<email>daniel@sedlak.dev</email>
</author>
<published>2024-03-12T18:23:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=eab1f30c297027f2349ecd1322573ae3b5c9d668'/>
<id>urn:sha1:eab1f30c297027f2349ecd1322573ae3b5c9d668</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Improve diagnostics for parenthesized type arguments</title>
<updated>2024-03-09T21:15:50+00:00</updated>
<author>
<name>Daniel Sedlak</name>
<email>daniel@sedlak.dev</email>
</author>
<published>2024-03-07T18:06:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=58f6aaa710916865253482ff99ef9c87e52d763a'/>
<id>urn:sha1:58f6aaa710916865253482ff99ef9c87e52d763a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Stabilize associated type bounds</title>
<updated>2024-03-08T20:56:25+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2024-03-05T18:23:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c63f3feb0fcde0d59004f30ab8f8d2f38da74754'/>
<id>urn:sha1:c63f3feb0fcde0d59004f30ab8f8d2f38da74754</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rename all `ParseSess` variables/fields/lifetimes as `psess`.</title>
<updated>2024-03-04T21:11:45+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-03-04T05:31:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=80d2bdb6191609c8a3940a1a7959ac1ac16e8ed6'/>
<id>urn:sha1:80d2bdb6191609c8a3940a1a7959ac1ac16e8ed6</id>
<content type='text'>
Existing names for values of this type are `sess`, `parse_sess`,
`parse_session`, and `ps`. `sess` is particularly annoying because
that's also used for `Session` values, which are often co-located, and
it can be difficult to know which type a value named `sess` refers to.
(That annoyance is the main motivation for this change.) `psess` is nice
and short, which is good for a name used this much.

The commit also renames some `parse_sess_created` values as
`psess_created`.
</content>
</entry>
</feed>
