<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_middle/src/query, branch 1.85.1</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.85.1</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.85.1'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2024-12-27T10:44:23+00:00</updated>
<entry>
<title>Spruce up the docs of several queries related to the type/trait system and const eval</title>
<updated>2024-12-27T10:44:23+00:00</updated>
<author>
<name>León Orell Valerian Liehr</name>
<email>me@fmease.dev</email>
</author>
<published>2024-12-26T13:09:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=454c09e355e0122fceaa770a3903c0ec9547bc0a'/>
<id>urn:sha1:454c09e355e0122fceaa770a3903c0ec9547bc0a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Re-export more `rustc_span::symbol` things from `rustc_span`.</title>
<updated>2024-12-18T02:38:53+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-12-12T23:29:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2620eb42d72d24baa1ca1056a769862b92c85f7f'/>
<id>urn:sha1:2620eb42d72d24baa1ca1056a769862b92c85f7f</id>
<content type='text'>
`rustc_span::symbol` defines some things that are re-exported from
`rustc_span`, such as `Symbol` and `sym`. But it doesn't re-export some
closely related things such as `Ident` and `kw`. So you can do `use
rustc_span::{Symbol, sym}` but you have to do `use
rustc_span::symbol::{Ident, kw}`, which is inconsistent for no good
reason.

This commit re-exports `Ident`, `kw`, and `MacroRulesNormalizedIdent`,
and changes many `rustc_span::symbol::` qualifiers in `compiler/` to
`rustc_span::`. This is a 200+ net line of code reduction, mostly
because many files with two `use rustc_span` items can be reduced to
one.
</content>
</entry>
<entry>
<title>rename rustc_attr to rustc_attr_parsing and create rustc_attr_data_structures</title>
<updated>2024-12-16T18:08:19+00:00</updated>
<author>
<name>Jonathan Dönszelmann</name>
<email>jonathan@donsz.nl</email>
</author>
<published>2024-12-13T13:47:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=efb98b6552abd00c58a2c1dd171b9086edf28214'/>
<id>urn:sha1:efb98b6552abd00c58a2c1dd171b9086edf28214</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add hir::Attribute</title>
<updated>2024-12-15T18:18:46+00:00</updated>
<author>
<name>Jonathan Dönszelmann</name>
<email>jonathan@donsz.nl</email>
</author>
<published>2024-10-16T23:14:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d50c0a5480257cbac33b312cb633777f3d2b2483'/>
<id>urn:sha1:d50c0a5480257cbac33b312cb633777f3d2b2483</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Auto merge of #134185 - compiler-errors:impl-trait-in-bindings, r=oli-obk</title>
<updated>2024-12-14T10:22:43+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2024-12-14T10:22:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f5079d00e63718235f95353df38ebb0891bab5b4'/>
<id>urn:sha1:f5079d00e63718235f95353df38ebb0891bab5b4</id>
<content type='text'>
(Re-)Implement `impl_trait_in_bindings`

This reimplements the `impl_trait_in_bindings` feature for local bindings.

"`impl Trait` in bindings" serve as a form of *trait* ascription, where the type basically functions as an infer var but additionally registering the `impl Trait`'s trait bounds for the infer type. These trait bounds can be used to enforce that predicates hold, and can guide inference (e.g. for closure signature inference):

```rust
let _: impl Fn(&amp;u8) -&gt; &amp;u8 = |x| x;
```

They are implemented as an additional set of bounds that are registered when the type is lowered during typeck, and then these bounds are tied to a given `CanonicalUserTypeAscription` for borrowck. We enforce these `CanonicalUserTypeAscription` bounds during borrowck to make sure that the `impl Trait` types are sensitive to lifetimes:

```rust
trait Static: 'static {}
impl&lt;T&gt; Static for T where T: 'static {}

let local = 1;
let x: impl Static = &amp;local;
//~^ ERROR `local` does not live long enough
```

r? oli-obk

cc #63065

---

Why can't we just use TAIT inference or something? Well, TAITs in bodies have the problem that they cannot reference lifetimes local to a body. For example:

```rust
type TAIT = impl Display;
let local = 0;
let x: TAIT = &amp;local;
//~^ ERROR `local` does not live long enough
```

That's because TAITs requires us to do *opaque type inference* which is pretty strict, since we need to remap all of the lifetimes of the hidden type to universal regions. This is simply not possible here.

---

I consider this part of the "impl trait everywhere" experiment. I'm not certain if this needs yet another lang team experiment.
</content>
</entry>
<entry>
<title>(Re-)Implement impl_trait_in_bindings</title>
<updated>2024-12-14T03:21:24+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2024-12-11T22:18:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d714a22e7bc38b158d09ee6294d1716acd1a727d'/>
<id>urn:sha1:d714a22e7bc38b158d09ee6294d1716acd1a727d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #134265 - compiler-errors:ty_def_id, r=oli-obk</title>
<updated>2024-12-14T03:09:36+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>matthias.krueger@famsik.de</email>
</author>
<published>2024-12-14T03:09:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c55a97ed849a0579e7bc71b5ba8b96ce74128656'/>
<id>urn:sha1:c55a97ed849a0579e7bc71b5ba8b96ce74128656</id>
<content type='text'>
Rename `ty_def_id` so people will stop using it by accident

This function is just for cycle detection, but people keep using it because they think it's the right way of getting the def id from a `Ty` (and I can't blame them necessarily).
</content>
</entry>
<entry>
<title>Auto merge of #134269 - matthiaskrgr:rollup-fkshwux, r=matthiaskrgr</title>
<updated>2024-12-13T23:09:16+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2024-12-13T23:09:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4a204bebdfd5cbc3e7edabf41cda3c3ff8b74917'/>
<id>urn:sha1:4a204bebdfd5cbc3e7edabf41cda3c3ff8b74917</id>
<content type='text'>
Rollup of 7 pull requests

Successful merges:

 - #133900 (Advent of `tests/ui` (misc cleanups and improvements) [1/N])
 - #133937 (Keep track of parse errors in `mod`s and don't emit resolve errors for paths involving them)
 - #133938 (`rustc_mir_dataflow` cleanups, including some renamings)
 - #134058 (interpret: reduce usage of TypingEnv::fully_monomorphized)
 - #134130 (Stop using driver queries in the public API)
 - #134140 (Add AST support for unsafe binders)
 - #134229 (Fix typos in docs on provenance)

r? `@ghost`
`@rustbot` modify labels: rollup
</content>
</entry>
<entry>
<title>Auto merge of #133099 - RalfJung:forbidden-hardfloat-features, r=workingjubilee</title>
<updated>2024-12-13T19:43:00+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2024-12-13T19:43:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=327c7ee4367ea587a49eff1d4715f462ab6db5f0'/>
<id>urn:sha1:327c7ee4367ea587a49eff1d4715f462ab6db5f0</id>
<content type='text'>
forbid toggling x87 and fpregs on hard-float targets

Part of https://github.com/rust-lang/rust/issues/116344, follow-up to https://github.com/rust-lang/rust/pull/129884:

The `x87`  target feature on x86 and the `fpregs` target feature on ARM must not be disabled on a hardfloat target, as that would change the float ABI. However, *enabling* `fpregs` on ARM is [explicitly requested](https://github.com/rust-lang/rust/issues/130988) as it seems to be useful. Therefore, we need to refine the distinction of "forbidden" target features and "allowed" target features: all (un)stable target features can determine on a per-target basis whether they should be allowed to be toggled or not. `fpregs` then checks whether the current target has the `soft-float` feature, and if yes, `fpregs` is permitted -- otherwise, it is not. (Same for `x87` on x86).

Also fixes https://github.com/rust-lang/rust/issues/132351. Since `fpregs` and `x87` can be enabled on some builds and disabled on others, it would make sense that one can query it via `cfg`. Therefore, I made them behave in `cfg` like any other unstable target feature.

The first commit prepares the infrastructure, but does not change behavior. The second commit then wires up `fpregs` and `x87` with that new infrastructure.

r? `@workingjubilee`
</content>
</entry>
<entry>
<title>Rename ty_def_id so people will stop using it by accident</title>
<updated>2024-12-13T16:36:38+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2024-12-13T16:18:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=efb66e7e385da37015925b23c199efdf3b246d35'/>
<id>urn:sha1:efb66e7e385da37015925b23c199efdf3b246d35</id>
<content type='text'>
</content>
</entry>
</feed>
