<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_feature/src, branch 1.50.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.50.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.50.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2020-12-12T16:18:44+00:00</updated>
<entry>
<title>tidy: Re-enable check for inline unit tests</title>
<updated>2020-12-12T16:18:44+00:00</updated>
<author>
<name>Vadim Petrochenkov</name>
<email>vadim.petrochenkov@gmail.com</email>
</author>
<published>2020-12-12T16:18:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ec09616078e89deab5f97e578b3400b045c09575'/>
<id>urn:sha1:ec09616078e89deab5f97e578b3400b045c09575</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Accept arbitrary expressions in key-value attributes at parse time</title>
<updated>2020-12-09T18:37:32+00:00</updated>
<author>
<name>Vadim Petrochenkov</name>
<email>vadim.petrochenkov@gmail.com</email>
</author>
<published>2020-11-07T13:09:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=31d72c2658e3ca3c51bb08ff5152c815d595e7ac'/>
<id>urn:sha1:31d72c2658e3ca3c51bb08ff5152c815d595e7ac</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rename `optin_builtin_traits` to `auto_traits`</title>
<updated>2020-11-23T22:14:06+00:00</updated>
<author>
<name>Camelid</name>
<email>camelidcamel@gmail.com</email>
</author>
<published>2020-11-23T03:54:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=810324d1f31eb8d75e8f0044df720652986ef133'/>
<id>urn:sha1:810324d1f31eb8d75e8f0044df720652986ef133</id>
<content type='text'>
They were originally called "opt-in, built-in traits" (OIBITs), but
people realized that the name was too confusing and a mouthful, and so
they were renamed to just "auto traits". The feature flag's name wasn't
updated, though, so that's what this PR does.

There are some other spots in the compiler that still refer to OIBITs,
but I don't think changing those now is worth it since they are internal
and not particularly relevant to this PR.

Also see &lt;https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/opt-in.2C.20built-in.20traits.20(auto.20traits).20feature.20name&gt;.
</content>
</entry>
<entry>
<title>Auto merge of #78801 - sexxi-goose:min_capture, r=nikomatsakis</title>
<updated>2020-11-17T03:56:03+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2020-11-17T03:56:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b5c37e86ff1782923e3abfbf5491dd383fcf827d'/>
<id>urn:sha1:b5c37e86ff1782923e3abfbf5491dd383fcf827d</id>
<content type='text'>
RFC-2229: Implement Precise Capture Analysis

### This PR introduces
- Feature gate for RFC-2229 (incomplete) `capture_disjoint_field`
- Rustc Attribute to print out the capture analysis `rustc_capture_analysis`
- Precise capture analysis

### Description of the analysis
1. If the feature gate is not set then all variables that are not local to the closure will be added to the list of captures. (This is for backcompat)
2. The rest of the analysis is based entirely on how the captured `Place`s are used within the closure. Precise information (i.e. projections) about the `Place` is maintained throughout.
3. To reduce the amount of information we need to keep track of, we do a minimization step. In this step, we determine a list such that no Place within this list represents an ancestor path to another entry in the list.  Check rust-lang/project-rfc-2229#9 for more detailed examples.
4. To keep the compiler functional as before we implement a Bridge between the results of this new analysis to existing data structures used for closure captures. Note the new capture analysis results are only part of MaybeTypeckTables that is the information is only available during typeck-ing.

### Known issues
- Statements like `let _ = x` will make the compiler ICE when used within a closure with the feature enabled. More generally speaking the issue is caused by `let` statements that create no bindings and are init'ed using a Place expression.

### Testing
We removed the code that would handle the case where the feature gate is not set, to enable the feature as default and did a bors try and perf run. More information here: #78762

### Thanks
This has been slowly in the works for a while now.
I want to call out `@Azhng` `@ChrisPardy` `@null-sleep` `@jenniferwills` `@logmosier` `@roxelo` for working on this and the previous PRs that led up to this, `@nikomatsakis` for guiding us.

Closes rust-lang/project-rfc-2229#7
Closes rust-lang/project-rfc-2229#9
Closes rust-lang/project-rfc-2229#6
Closes rust-lang/project-rfc-2229#19

r? `@nikomatsakis`
</content>
</entry>
<entry>
<title>Rollup merge of #77802 - jyn514:bootstrap-specific, r=nikomatsakis</title>
<updated>2020-11-15T12:39:43+00:00</updated>
<author>
<name>Jonas Schievink</name>
<email>jonasschievink@gmail.com</email>
</author>
<published>2020-11-15T12:39:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8825942e86e4c73a70b5bd18c5ca5b5c005b28e6'/>
<id>urn:sha1:8825942e86e4c73a70b5bd18c5ca5b5c005b28e6</id>
<content type='text'>
Allow making `RUSTC_BOOTSTRAP` conditional on the crate name

Motivation: This came up in the [Zulip stream](https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Require.20users.20to.20confirm.20they.20know.20RUSTC_.E2.80.A6.20compiler-team.23350/near/208403962) for https://github.com/rust-lang/compiler-team/issues/350.
See also https://github.com/rust-lang/cargo/pull/6608#issuecomment-458546258; this implements https://github.com/rust-lang/cargo/issues/6627.
The goal is for this to eventually allow prohibiting setting `RUSTC_BOOTSTRAP` in build.rs (https://github.com/rust-lang/cargo/issues/7088).

## User-facing changes

- `RUSTC_BOOTSTRAP=1` still works; there is no current plan to remove this.
- Things like `RUSTC_BOOTSTRAP=0` no longer activate nightly features. In practice this shouldn't be a big deal, since `RUSTC_BOOTSTRAP` is the opposite of stable and everyone uses `RUSTC_BOOTSTRAP=1` anyway.
- `RUSTC_BOOTSTRAP=x` will enable nightly features only for crate `x`.
- `RUSTC_BOOTSTRAP=x,y` will enable nightly features only for crates `x` and `y`.

## Implementation changes

The main change is that `UnstableOptions::from_environment` now requires
an (optional) crate name. If the crate name is unknown (`None`), then the new feature is not available and you still have to use `RUSTC_BOOTSTRAP=1`. In practice this means the feature is only available for `--crate-name`, not for `#![crate_name]`; I'm interested in supporting the second but I'm not sure how.

Other major changes:

- Added `Session::is_nightly_build()`, which uses the `crate_name` of
the session
- Added `nightly_options::match_is_nightly_build`, a convenience method
for looking up `--crate-name` from CLI arguments.
`Session::is_nightly_build()`should be preferred where possible, since
it will take into account `#![crate_name]` (I think).
- Added `unstable_features` to `rustdoc::RenderOptions`

I'm not sure whether this counts as T-compiler or T-lang; _technically_ RUSTC_BOOTSTRAP is an implementation detail, but it's been used so much it seems like this counts as a language change too.

r? `@joshtriplett`
cc `@Mark-Simulacrum` `@hsivonen`
</content>
</entry>
<entry>
<title>Indroduce feature flag for RFC-2229</title>
<updated>2020-11-11T01:58:28+00:00</updated>
<author>
<name>Aman Arora</name>
<email>me@aman-arora.com</email>
</author>
<published>2020-10-11T04:14:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=88310cc0ebf4144205743dbb3a65223deffcf8e6'/>
<id>urn:sha1:88310cc0ebf4144205743dbb3a65223deffcf8e6</id>
<content type='text'>
Signed-off-by: Aman Arora &lt;me@aman-arora.com&gt;
</content>
</entry>
<entry>
<title>Add `#[cfg(panic = "...")]`</title>
<updated>2020-11-09T15:30:49+00:00</updated>
<author>
<name>David Hewitt</name>
<email>1939362+davidhewitt@users.noreply.github.com</email>
</author>
<published>2020-07-25T18:02:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8d43b3cbb91b7327b42b0da721525e7ae2911f0b'/>
<id>urn:sha1:8d43b3cbb91b7327b42b0da721525e7ae2911f0b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Allow making `RUSTC_BOOTSTRAP` conditional on the crate name</title>
<updated>2020-11-07T18:45:11+00:00</updated>
<author>
<name>Joshua Nelson</name>
<email>jyn514@gmail.com</email>
</author>
<published>2020-10-10T18:27:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=622c48e4f1a5bc3727f8ead89767c8a9e367a77e'/>
<id>urn:sha1:622c48e4f1a5bc3727f8ead89767c8a9e367a77e</id>
<content type='text'>
The main change is that `UnstableOptions::from_environment` now requires
an (optional) crate name. If the crate name is unknown (`None`), then the new feature is not available and you still have to use `RUSTC_BOOTSTRAP=1`. In practice this means the feature is only available for `--crate-name`, not for `#![crate_name]`; I'm interested in supporting the second but I'm not sure how.

Other major changes:

- Added `Session::is_nightly_build()`, which uses the `crate_name` of
the session
- Added `nightly_options::match_is_nightly_build`, a convenience method
for looking up `--crate-name` from CLI arguments.
`Session::is_nightly_build()`should be preferred where possible, since
it will take into account `#![crate_name]` (I think).
- Added `unstable_features` to `rustdoc::RenderOptions`

  There is a user-facing change here: things like `RUSTC_BOOTSTRAP=0` no
  longer active nightly features. In practice this shouldn't be a big
  deal, since `RUSTC_BOOTSTRAP` is the opposite of stable and everyone
  uses `RUSTC_BOOTSTRAP=1` anyway.

- Add tests

  Check against `Cheat`, not whether nightly features are allowed.
  Nightly features are always allowed on the nightly channel.

- Only call `is_nightly_build()` once within a function

- Use booleans consistently for rustc_incremental

  Sessions can't be passed through threads, so `read_file` couldn't take a
  session. To be consistent, also take a boolean in `write_file_header`.
</content>
</entry>
<entry>
<title>Implement destructuring assignment for tuples</title>
<updated>2020-11-07T13:17:19+00:00</updated>
<author>
<name>Fabian Zaiser</name>
<email>fabian.zaiser@gmail.com</email>
</author>
<published>2020-11-04T16:32:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3a7a997323436ecf255c39898667320935445f62'/>
<id>urn:sha1:3a7a997323436ecf255c39898667320935445f62</id>
<content type='text'>
Co-authored-by: varkor &lt;github@varkor.com&gt;
</content>
</entry>
<entry>
<title>Fix even more clippy warnings</title>
<updated>2020-10-30T14:13:39+00:00</updated>
<author>
<name>Joshua Nelson</name>
<email>jyn514@gmail.com</email>
</author>
<published>2020-10-27T01:02:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=57c6ed0c07aaea9c89a192e54b3274464ebe6fbf'/>
<id>urn:sha1:57c6ed0c07aaea9c89a192e54b3274464ebe6fbf</id>
<content type='text'>
</content>
</entry>
</feed>
