summary refs log tree commit diff
path: root/compiler/rustc_feature/src
AgeCommit message (Collapse)AuthorLines
2024-02-03Bump version placeholdersMark Rousskov-6/+6
2024-01-30Remove the `abi_amdgpu_kernel` featureclubby789-2/+2
2024-01-24Add feature gateNadrieril-0/+3
2024-01-22Revert "Auto merge of #118133 - Urgau:stabilize_trait_upcasting, r=WaffleLapkin"Oli Scherer-3/+3
This reverts commit 6d2b84b3ed7848fd91b8d6151d4451b3103ed816, reversing changes made to 73bc12199ea8c7651ed98b069c0dd6b0bb5fabcf.
2024-01-19Split remaining offset_of features into new tracking issuesGeorge Bateman-2/+2
2024-01-19Stabilize simple offset_ofGeorge Bateman-0/+2
2024-01-17Improved collapse_debuginfo attribute, added command-line flag (no|external|yes)Andrew Zhogin-1/+1
2024-01-12Rollup merge of #119866 - smoelius:patch-2, r=compiler-errorsMatthias Krüger-1/+1
Convert `effects` description to doc comment So that it is visible here: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_feature/unstable/struct.Features.html#structfield.effects r? `@fee1-dead`
2024-01-11Set `c_str_literals` stabilization version back to `CURRENT_RUSTC_VERSION`Eduardo Sánchez Muñoz-1/+1
`c_str_literals`'s stabilization has been delayed to 1.77 (https://github.com/rust-lang/rust/pull/119528).
2024-01-11Convert `effects` description to doc commentSamuel Moelius-1/+1
So that it is visible here: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_feature/unstable/struct.Features.html#structfield.effects
2024-01-05Rollup merge of #119354 - fmease:negative_bounds-fixes, r=compiler-errorsMatthias Krüger-1/+1
Make `negative_bounds` internal & fix some of its issues r? compiler-errors
2023-12-31Update tracking issue of naked_functionsGary Guo-1/+1
The original tracking issue was superseded by a new one (constrainted naked functions) and therefore is closed.
2023-12-28Make feature `negative_bounds` internalLeón Orell Valerian Liehr-1/+1
2023-12-26Rollup merge of #119235 - Urgau:missing-feature-gate-sanitizer-cfi-cfgs, ↵Michael Goulet-0/+4
r=Nilstrieb Add missing feature gate for sanitizer CFI cfgs Found during the review of https://github.com/rust-lang/rust/pull/118494 in https://github.com/rust-lang/rust/pull/118494#discussion_r1416079288. cc `@rcvalle`
2023-12-23Auto merge of #119211 - rust-lang:pa-master-1.77, r=Mark-Simulacrumbors-7/+7
Bump stage0 to 1.76 beta r? `@Mark-Simulacrum`
2023-12-23Add missing CFI sanitizer cfgs feature gateUrgau-0/+4
2023-12-22update version placeholdersPietro Albini-7/+7
2023-12-19Desugar for await loopsEric Holk-1/+1
2023-12-19Plumb awaitness of for loopsEric Holk-0/+2
2023-12-10Remove edition umbrella features.Eric Huss-439/+433
2023-12-10Auto merge of #116952 - compiler-errors:lifetime_capture_rules_2024, r=TaKO8Kibors-0/+2
Implement 2024-edition lifetime capture rules RFC Implements rust-lang/rfcs#3498.
2023-12-06Auto merge of #118605 - fee1-dead-contrib:rm-rustc_host, r=compiler-errorsbors-6/+0
Remove `#[rustc_host]`, use internal desugaring Also removed a way for users to explicitly specify the host param since that isn't particularly useful. This should eliminate any pain with encoding attributes across crates and etc. r? `@compiler-errors`
2023-12-05Add lifetime_capture_rules_2024Michael Goulet-0/+2
2023-12-05Rollup merge of #118123 - RalfJung:internal-lib-features, r=compiler-errorsMichael Goulet-6/+14
Add support for making lib features internal We have the notion of an "internal" lang feature: a feature that is never intended to be stabilized, and using which can cause ICEs and other issues without that being considered a bug. This extends that idea to lib features as well. It is an alternative to https://github.com/rust-lang/rust/pull/115623: instead of using an attribute to declare lib features internal, we simply do this based on the name. Everything ending in `_internals` or `_internal` is considered internal. Then we rename `core_intrinsics` to `core_intrinsics_internal`, which fixes https://github.com/rust-lang/rust/issues/115597.
2023-12-05Rollup merge of #118598 - Nadrieril:remove_precise_pointer_size_matching, ↵Matthias Krüger-2/+3
r=davidtwco Remove the `precise_pointer_size_matching` feature gate `usize` and `isize` are special for pattern matching because their range might depend on the platform. To make code portable across platforms, the following is never considered exhaustive: ```rust let x: usize = ...; match x { 0..=18446744073709551615 => {} } ``` Because of how rust handles constants, this also unfortunately counts `0..=usize::MAX` as non-exhaustive. The [`precise_pointer_size_matching`](https://github.com/rust-lang/rust/issues/56354) feature gate was introduced both for this convenience and for the possibility that the lang team could decide to allow the above. Since then, [half-open range patterns](https://github.com/rust-lang/rust/issues/67264) have been implemented, and since #116692 they correctly support `usize`/`isize`: ```rust match 0usize { // exhaustive! 0..5 => {} 5.. => {} } ``` I believe this subsumes all the use cases of the feature gate. Moreover no attempt has been made to stabilize it in the 5 years of its existence. I therefore propose we retire this feature gate. Closes https://github.com/rust-lang/rust/issues/56354
2023-12-05Remove `#[rustc_host]`, use internal desugaringDeadbeef-6/+0
2023-12-04Remove the `precise_pointer_size_matching` feature gateNadrieril-2/+3
2023-12-02Auto merge of #118470 - nnethercote:cleanup-error-handlers, r=compiler-errorsbors-1/+1
Cleanup error handlers Mostly by making function naming more consistent. More to do after this, but this is enough for one PR. r? compiler-errors
2023-12-02Rename `HandlerInner::delay_span_bug` as `HandlerInner::span_delayed_bug`.Nicholas Nethercote-1/+1
Because the corresponding `Level` is `DelayedBug` and `span_delayed_bug` follows the pattern used everywhere else: `span_err`, `span_warning`, etc.
2023-12-01Auto merge of #117472 - jmillikin:stable-c-str-literals, r=Nilstriebbors-2/+2
Stabilize C string literals RFC: https://rust-lang.github.io/rfcs/3348-c-str-literal.html Tracking issue: https://github.com/rust-lang/rust/issues/105723 Documentation PR (reference manual): https://github.com/rust-lang/reference/pull/1423 # Stabilization report Stabilizes C string and raw C string literals (`c"..."` and `cr#"..."#`), which are expressions of type [`&CStr`](https://doc.rust-lang.org/stable/core/ffi/struct.CStr.html). Both new literals require Rust edition 2021 or later. ```rust const HELLO: &core::ffi::CStr = c"Hello, world!"; ``` C strings may contain any byte other than `NUL` (`b'\x00'`), and their in-memory representation is guaranteed to end with `NUL`. ## Implementation Originally implemented by PR https://github.com/rust-lang/rust/pull/108801, which was reverted due to unintentional changes to lexer behavior in Rust editions < 2021. The current implementation landed in PR https://github.com/rust-lang/rust/pull/113476, which restricts C string literals to Rust edition >= 2021. ## Resolutions to open questions from the RFC * Adding C character literals (`c'.'`) of type `c_char` is not part of this feature. * Support for `c"..."` literals does not prevent `c'.'` literals from being added in the future. * C string literals should not be blocked on making `&CStr` a thin pointer. * It's possible to declare constant expressions of type `&'static CStr` in stable Rust (as of v1.59), so C string literals are not adding additional coupling on the internal representation of `CStr`. * The unstable `concat_bytes!` macro should not accept `c"..."` literals. * C strings have two equally valid `&[u8]` representations (with or without terminal `NUL`), so allowing them to be used in `concat_bytes!` would be ambiguous. * Adding a type to represent C strings containing valid UTF-8 is not part of this feature. * Support for a hypothetical `&Utf8CStr` may be explored in the future, should such a type be added to Rust.
2023-11-30Enable link-arg link kind inside of #[link] attributezetanumbers-0/+3
- Implement link-arg as an attribute - Apply suggestions from review - Co-authored-by: Vadim Petrochenkov <vadim.petrochenkov@gmail.com> - Add unstable book entry
2023-11-29Rollup merge of #118157 - Nadrieril:never_pat-feature-gate, r=compiler-errorsMatthias Krüger-1/+3
Add `never_patterns` feature gate This PR adds the feature gate and most basic parsing for the experimental `never_patterns` feature. See the tracking issue (https://github.com/rust-lang/rust/issues/118155) for details on the experiment. `@scottmcm` has agreed to be my lang-team liaison for this experiment.
2023-11-29Add `never_patterns` feature gateNadrieril-1/+3
2023-11-26Cut code size for feature hashingMark Rousskov-2/+10
This locally cuts ~32 kB of .text instructions.
2023-11-23Add an experimental feature gate for function delegationVadim Petrochenkov-0/+2
In accordance with the [process](https://github.com/rust-lang/lang-team/blob/master/src/how_to/experiment.md). Detailed description of the feature can be found in the RFC repo - https://github.com/rust-lang/rfcs/pull/3530.
2023-11-23Rollup merge of #118167 - RalfJung:unadjusted-abi-is-internal, r=petrochenkovMatthias Krüger-1/+1
make the 'abi_unadjusted' feature internal As [suggested](https://github.com/rust-lang/rust/pull/118127#issuecomment-1820736389) by `@bjorn3.`
2023-11-22also make 'core_intrinsics' internalRalf Jung-1/+3
2023-11-22Stabilize RFC3324 dyn upcasting coercionUrgau-3/+3
Aka trait_upcasting feature. And also adjust the `deref_into_dyn_supertrait` lint.
2023-11-22make the 'abi_unadjusted' feature internalRalf Jung-1/+1
2023-11-21lib features ending in '_internals?' are internalRalf Jung-6/+12
2023-11-15Bump cfg(bootstrap)sMark Rousskov-3/+3
2023-11-15Substitute version placeholdersMark Rousskov-5/+5
2023-11-05Auto merge of #117537 - GKFX:offset-of-enum-feature, r=cjgillotbors-0/+2
Feature gate enums in offset_of As requested at https://github.com/rust-lang/rust/issues/106655#issuecomment-1790815262, put enums in offset_of behind their own feature gate. `@rustbot` label F-offset_of
2023-11-04Remove support for compiler plugins.Nicholas Nethercote-21/+4
They've been deprecated for four years. This commit includes the following changes. - It eliminates the `rustc_plugin_impl` crate. - It changes the language used for lints in `compiler/rustc_driver_impl/src/lib.rs` and `compiler/rustc_lint/src/context.rs`. External lints are now called "loaded" lints, rather than "plugins" to avoid confusion with the old plugins. This only has a tiny effect on the output of `-W help`. - E0457 and E0498 are no longer used. - E0463 is narrowed, now only relating to unfound crates, not plugins. - The `plugin` feature was moved from "active" to "removed". - It removes the entire plugins chapter from the unstable book. - It removes quite a few tests, mostly all of those in `tests/ui-fulldeps/plugin/`. Closes #29597.
2023-11-03Feature gate enums in offset_ofGeorge Bateman-0/+2
2023-11-01Stabilize C string literalsJohn Millikin-2/+2
2023-10-27Feature gate `gen` blocks, even in 2024 editionOli Scherer-0/+2
2023-10-24Rollup merge of #116943 - heiher:target-features, r=wesleywiserMatthias Krüger-0/+1
Add target features for LoongArch
2023-10-24compiler: Add target features for LoongArchWANG Rui-0/+1
2023-10-23Let's see what those opaque types actually areMichael Goulet-0/+1