<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_trait_selection/src/errors.rs, branch beta</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=beta</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=beta'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-08-07T21:18:00+00:00</updated>
<entry>
<title>Use `tcx.short_string()` in more diagnostics</title>
<updated>2025-08-07T21:18:00+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2025-07-16T19:45:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=99196657fcb5c1e20c13e76166c7f52d35584e88'/>
<id>urn:sha1:99196657fcb5c1e20c13e76166c7f52d35584e88</id>
<content type='text'>
`TyCtxt::short_string` ensures that user visible type paths aren't overwhelming on the terminal output, and properly saves the long name to disk as a side-channel. We already use these throughout the compiler and have been using them as needed when users find cases where the output is verbose. This is a proactive search of some cases to use `short_string`.

We add support for shortening the path of "trait path only".

Every manual use of `short_string` is a bright marker that that error should be using structured diagnostics instead (as they have proper handling of long types without the maintainer having to think abou tthem).

When we don't actually print out a shortened type we don't need the "use `--verbose`" note.

On E0599 show type identity to avoid expanding the receiver's generic parameters.

Unify wording on `long_ty_path` everywhere.
</content>
</entry>
<entry>
<title>parse `const trait Trait`</title>
<updated>2025-07-17T10:06:26+00:00</updated>
<author>
<name>Deadbeef</name>
<email>ent3rm4n@gmail.com</email>
</author>
<published>2025-07-13T08:49:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=69326878eeabb713e2d4a85215b87f18e498313c'/>
<id>urn:sha1:69326878eeabb713e2d4a85215b87f18e498313c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>setup CI and tidy to use typos for spellchecking and fix few typos</title>
<updated>2025-07-03T07:51:06+00:00</updated>
<author>
<name>klensy</name>
<email>klensy@users.noreply.github.com</email>
</author>
<published>2024-12-07T10:51:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c76d032f0144b650a438ee1efba89c475e0b115b'/>
<id>urn:sha1:c76d032f0144b650a438ee1efba89c475e0b115b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Make E0621 missing lifetime suggestion verbose</title>
<updated>2025-06-09T19:55:00+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2025-06-04T21:10:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3fce086d79afd9bc5b52a13e051934694cf196c1'/>
<id>urn:sha1:3fce086d79afd9bc5b52a13e051934694cf196c1</id>
<content type='text'>
```
error[E0621]: explicit lifetime required in the type of `x`
  --&gt; $DIR/42701_one_named_and_one_anonymous.rs:10:9
   |
LL |         &amp;*x
   |         ^^^ lifetime `'a` required
   |
help: add explicit lifetime `'a` to the type of `x`
   |
LL | fn foo2&lt;'a&gt;(a: &amp;'a Foo, x: &amp;'a i32) -&gt; &amp;'a i32 {
   |                             ++
```
</content>
</entry>
<entry>
<title>Auto merge of #138677 - shepmaster:consistent-elided-lifetime-syntax, r=traviscross,jieyouxu</title>
<updated>2025-06-05T19:49:30+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2025-06-05T19:49:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ccf3198de316b488ee17441935182e9d5292b4d3'/>
<id>urn:sha1:ccf3198de316b488ee17441935182e9d5292b4d3</id>
<content type='text'>
Add a new `mismatched-lifetime-syntaxes` lint

The lang-team [discussed this](https://hackmd.io/nf4ZUYd7Rp6rq-1svJZSaQ) and I attempted to [summarize](https://github.com/rust-lang/rust/pull/120808#issuecomment-2701863833) their decision. The summary-of-the-summary is:

- Using two different kinds of syntax for elided lifetimes is confusing. In rare cases, it may even [lead to unsound code](https://github.com/rust-lang/rust/issues/48686)! Some examples:

    ```rust
    // Lint will warn about these
    fn(v: ContainsLifetime) -&gt; ContainsLifetime&lt;'_&gt;;
    fn(&amp;'static u8) -&gt; &amp;u8;
    ```

- Matching up references with no lifetime syntax, references with anonymous lifetime syntax, and paths with anonymous lifetime syntax is an exception to the simplest possible rule:

    ```rust
    // Lint will not warn about these
    fn(&amp;u8) -&gt; &amp;'_ u8;
    fn(&amp;'_ u8) -&gt; &amp;u8;
    fn(&amp;u8) -&gt; ContainsLifetime&lt;'_&gt;;
    ```

- Having a lint for consistent syntax of elided lifetimes will make the [future goal](https://github.com/rust-lang/rust/issues/91639) of warning-by-default for paths participating in elision much simpler.

---

This new lint attempts to accomplish the goal of enforcing consistent syntax. In the process, it supersedes and replaces the existing `elided-named-lifetimes` lint, which means it starts out life as warn-by-default.
</content>
</entry>
<entry>
<title>Add `iter` macro</title>
<updated>2025-06-03T17:52:32+00:00</updated>
<author>
<name>Oli Scherer</name>
<email>github333195615777966@oli-obk.de</email>
</author>
<published>2025-02-27T09:51:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5fbdfc3e1018072e0c272d19308d72ac5165f01a'/>
<id>urn:sha1:5fbdfc3e1018072e0c272d19308d72ac5165f01a</id>
<content type='text'>
This adds an `iter!` macro that can be used to create movable
generators.

This also adds a yield_expr feature so the `yield` keyword can be used
within iter! macro bodies. This was needed because several unstable
features each need `yield` expressions, so this allows us to stabilize
them separately from any individual feature.

Co-authored-by: Oli Scherer &lt;github35764891676564198441@oli-obk.de&gt;
Co-authored-by: Jieyou Xu &lt;jieyouxu@outlook.com&gt;
Co-authored-by: Travis Cross &lt;tc@traviscross.com&gt;
</content>
</entry>
<entry>
<title>Rename `LifetimeSyntax` variants to lang-team-approved names</title>
<updated>2025-06-03T13:06:08+00:00</updated>
<author>
<name>Jake Goulding</name>
<email>jake.goulding@gmail.com</email>
</author>
<published>2025-05-09T13:38:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d2bf16ad6d80827800798a00ba584f95e9689573'/>
<id>urn:sha1:d2bf16ad6d80827800798a00ba584f95e9689573</id>
<content type='text'>
</content>
</entry>
<entry>
<title>do away with `_Self` and `TraitName` and check generic params for rustc_on_unimplemented</title>
<updated>2025-05-17T13:15:53+00:00</updated>
<author>
<name>mejrs</name>
<email>59372212+mejrs@users.noreply.github.com</email>
</author>
<published>2025-05-17T13:15:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9ffd0bf75a30b4fce1ffa35732666a37a7e9a736'/>
<id>urn:sha1:9ffd0bf75a30b4fce1ffa35732666a37a7e9a736</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Disarm `time` bomb (diagnostics)</title>
<updated>2025-05-09T10:09:15+00:00</updated>
<author>
<name>Jieyou Xu</name>
<email>jieyouxu@outlook.com</email>
</author>
<published>2024-11-20T12:29:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7dae31828baaeb26f913dcad6c83bbed5a8700b4'/>
<id>urn:sha1:7dae31828baaeb26f913dcad6c83bbed5a8700b4</id>
<content type='text'>
Revert "Rollup merge of #129343 - estebank:time-version, r=jieyouxu"

This reverts commit 26f75a65d70773e4520634b9f6599ddf08c499e6, reversing
changes made to 2572e0e8c9d5d671eccb1d5791e55c929c4720f4.

Imports are modified to fix merge conflicts and remove unused ones.
</content>
</entry>
<entry>
<title>Rollup merge of #140307 - mejrs:condition_parser, r=nnethercote</title>
<updated>2025-05-05T04:20:57+00:00</updated>
<author>
<name>Trevor Gross</name>
<email>t.gross35@gmail.com</email>
</author>
<published>2025-05-05T04:20:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e9a50b8a0a01808ff135b2706d6f7093789c02e3'/>
<id>urn:sha1:e9a50b8a0a01808ff135b2706d6f7093789c02e3</id>
<content type='text'>
Refactor rustc_on_unimplemented's filter parser

Followup to https://github.com/rust-lang/rust/pull/139091; I plan on moving most of this code into `rustc_attr_parsing` at some point, but want to land this separately first.

I have taken care to preserve the original behavior as much as I could:
- All but one of the new error variants are replacements for the ones originally emitted by the cfg parsing machinery; so these errors are not "new".
- the `InvalidFlag` variant is new, this PR turns this (from being ignored and silently doing nothing) into an error:
    ```rust
    #[rustc_on_unimplemented(on(something, message = "y"))]
    //~^ ERROR invalid boolean flag
    //~^^ NOTE expected one of `crate_local`, `direct` or `from_desugaring`, not `something`
    trait InvalidFlag {}
    ```
    This does not occur anywhere except in this test. I couldn't find a way that I liked to keep allowing this or to do nothing, erroring was the cleanest solution.
- There are a bunch of FIXME throughout this and the previous PR, I plan on addressing those in follow up prs..

Finally, this gets rid of the "longest" dependency in rustc:
![image](https://github.com/user-attachments/assets/3c3eb3a0-b7b3-40d9-aada-a752e28c8678)
</content>
</entry>
</feed>
