<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_middle/src/ty/error.rs, branch 1.87.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.87.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.87.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-02-25T16:56:03+00:00</updated>
<entry>
<title>Teach structured errors to display short `Ty`</title>
<updated>2025-02-25T16:56:03+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2025-02-18T01:15:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d12ecaed558426ec7998816d64b240ea685a2a8f'/>
<id>urn:sha1:d12ecaed558426ec7998816d64b240ea685a2a8f</id>
<content type='text'>
Make it so that every structured error annotated with `#[derive(Diagnostic)]` that has a field of type `Ty&lt;'_&gt;`, the printing of that value into a `String` will look at the thread-local storage `TyCtxt` in order to shorten to a length appropriate with the terminal width. When this happen, the resulting error will have a note with the file where the full type name was written to.

```
error[E0618]: expected function, found `((..., ..., ..., ...), ..., ..., ...)``
 --&gt; long.rs:7:5
  |
6 | fn foo(x: D) { //~ `x` has type `(...
  |        - `x` has type `((..., ..., ..., ...), ..., ..., ...)`
7 |     x(); //~ ERROR expected function, found `(...
  |     ^--
  |     |
  |     call expression requires function
  |
  = note: the full name for the type has been written to 'long.long-type-14182675702747116984.txt'
  = note: consider using `--verbose` to print the full type name to the console
```
</content>
</entry>
<entry>
<title>Rework "long type names" printing logic</title>
<updated>2025-01-31T20:39:01+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2025-01-31T03:26:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0751e9036af0525c3e42b74cce5597ed66dd7849'/>
<id>urn:sha1:0751e9036af0525c3e42b74cce5597ed66dd7849</id>
<content type='text'>
Make it so more type-system types can be printed in a shortened version (like `Predicate`s).

Centralize printing the information about the "full type name path".

Make the "long type path" for the file where long types are written part of `Diag`, so that it becomes easier to keep track of it, and ensure it will always will be printed out last in the diagnostic by making its addition to the output implicit.

Tweak the shortening of types in "expected/found" labels.

Remove dead file `note.rs`.
</content>
</entry>
<entry>
<title>mir_transform: implement forced inlining</title>
<updated>2025-01-10T18:37:54+00:00</updated>
<author>
<name>David Wood</name>
<email>david.wood2@arm.com</email>
</author>
<published>2024-09-23T17:46:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f86169a58f212b174a01aa721545df009e96bfda'/>
<id>urn:sha1:f86169a58f212b174a01aa721545df009e96bfda</id>
<content type='text'>
Adds `#[rustc_force_inline]` which is similar to always inlining but
reports an error if the inlining was not possible, and which always
attempts to inline annotated items, regardless of optimisation levels.
It can only be applied to free functions to guarantee that the MIR
inliner will be able to resolve calls.
</content>
</entry>
<entry>
<title>Begin to implement type system layer of unsafe binders</title>
<updated>2024-12-22T21:57:57+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2024-12-21T17:05:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9a1c5eb5b385adb3cd04af0049cbf5c225cefdc3'/>
<id>urn:sha1:9a1c5eb5b385adb3cd04af0049cbf5c225cefdc3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Simplify array length mismatch error reporting</title>
<updated>2024-11-24T03:32:11+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2024-11-23T05:02:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=28970a2cb0885ba7922820d6fb0e14c7e166df9b'/>
<id>urn:sha1:28970a2cb0885ba7922820d6fb0e14c7e166df9b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix type shortening writing to file</title>
<updated>2024-11-02T03:08:04+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2024-10-25T02:41:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c6017badb4ca22b85c70916746c233340be53c97'/>
<id>urn:sha1:c6017badb4ca22b85c70916746c233340be53c97</id>
<content type='text'>
Make sure that we append to the file for long ty paths. Do not write the same type more than once. Shorten the calculated width a bit.
</content>
</entry>
<entry>
<title>remove `PredicatePolarity` and `BoundConstness` relate impls</title>
<updated>2024-10-22T22:52:37+00:00</updated>
<author>
<name>lcnr</name>
<email>rust@lcnr.de</email>
</author>
<published>2024-10-22T22:52:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=00266eeaa5957f0dde0b17f2823fd4b4ea6996c2'/>
<id>urn:sha1:00266eeaa5957f0dde0b17f2823fd4b4ea6996c2</id>
<content type='text'>
Also removes `TypeError::ConstnessMismatch`. It is unused.
</content>
</entry>
<entry>
<title>Reformat using the new identifier sorting from rustfmt</title>
<updated>2024-09-22T23:11:29+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2024-09-22T23:05:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c682aa162b0d41e21cc6748f4fecfe01efb69d1f'/>
<id>urn:sha1:c682aa162b0d41e21cc6748f4fecfe01efb69d1f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Shrink `TyKind::FnPtr`.</title>
<updated>2024-08-09T04:33:25+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-08-08T07:18:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c4717cc9d15d30e08f03f51845c950175979bcc4'/>
<id>urn:sha1:c4717cc9d15d30e08f03f51845c950175979bcc4</id>
<content type='text'>
By splitting the `FnSig` within `TyKind::FnPtr` into `FnSigTys` and
`FnHeader`, which can be packed more efficiently. This reduces the size
of the hot `TyKind` type from 32 bytes to 24 bytes on 64-bit platforms.
This reduces peak memory usage by a few percent on some benchmarks. It
also reduces cache misses and page faults similarly, though this doesn't
translate to clear cycles or wall-time improvements on CI.
</content>
</entry>
<entry>
<title>Reformat `use` declarations.</title>
<updated>2024-07-28T22:26:52+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-07-28T22:13:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=84ac80f1921afc243d71fd0caaa4f2838c294102'/>
<id>urn:sha1:84ac80f1921afc243d71fd0caaa4f2838c294102</id>
<content type='text'>
The previous commit updated `rustfmt.toml` appropriately. This commit is
the outcome of running `x fmt --all` with the new formatting options.
</content>
</entry>
</feed>
