about summary refs log tree commit diff
path: root/compiler/rustc_feature
AgeCommit message (Collapse)AuthorLines
2021-08-16Don't mark `if_let_guard` as an incomplete featureLéo Lanteri Thauvin-1/+1
2021-08-16feature gate doc(primitive)Joshua Nelson-0/+3
2021-08-10Replace #[plugin_registrar] with exporting __rustc_plugin_registrarbjorn3-16/+4
2021-08-03rustc: Fill out remaining parts of C-unwind ABIAlex Crichton-9/+5
This commit intends to fill out some of the remaining pieces of the C-unwind ABI. This has a number of other changes with it though to move this design space forward a bit. Notably contained within here is: * On `panic=unwind`, the `extern "C"` ABI is now considered as "may unwind". This fixes a longstanding soundness issue where if you `panic!()` in an `extern "C"` function defined in Rust that's actually UB because the LLVM representation for the function has the `nounwind` attribute, but then you unwind. * Whether or not a function unwinds now mainly considers the ABI of the function instead of first checking the panic strategy. This fixes a miscompile of `extern "C-unwind"` with `panic=abort` because that ABI can still unwind. * The aborting stub for non-unwinding ABIs with `panic=unwind` has been reimplemented. Previously this was done as a small tweak during MIR generation, but this has been moved to a separate and dedicated MIR pass. This new pass will, for appropriate functions and function calls, insert a `cleanup` landing pad for any function call that may unwind within a function that is itself not allowed to unwind. Note that this subtly changes some behavior from before where previously on an unwind which was caught-to-abort it would run active destructors in the function, and now it simply immediately aborts the process. * The `#[unwind]` attribute has been removed and all users in tests and such are now using `C-unwind` and `#![feature(c_unwind)]`. I think this is largely the last piece of the RFC to implement. Unfortunately I believe this is still not stabilizable as-is because activating the feature gate changes the behavior of the existing `extern "C"` ABI in a way that has no replacement. My thinking for how to enable this is that we add support for the `C-unwind` ABI on stable Rust first, and then after it hits stable we change the behavior of the `C` ABI. That way anyone straddling stable/beta/nightly can switch to `C-unwind` safely.
2021-08-02Rollup merge of #86176 - nbdd0121:explicit-generic-args, r=jackh726Cameron Steffen-0/+3
Implement a `explicit_generic_args_with_impl_trait` feature gate Implements #83701 When this gate is enabled, explicit generic arguments can be specified even if `impl Trait` is used in argument position. Generic arguments can only be specified for explicit generic parameters but not for the synthetic type parameters from `impl Trait` So code like this will be accepted: ```rust #![feature(explicit_generic_args_with_impl_trait)] fn foo<T: ?Sized>(_f: impl AsRef<T>) {} fn main() { foo::<str>("".to_string()); } ```
2021-08-02Auto merge of #87535 - lf-:authors, r=Mark-Simulacrumbors-1/+0
rfc3052 followup: Remove authors field from Cargo manifests Since RFC 3052 soft deprecated the authors field, hiding it from crates.io, docs.rs, and making Cargo not add it by default, and it is not generally up to date/useful information for contributors, we may as well remove it from crates in this repo.
2021-08-02Implement a `explicit_generic_args_with_impl_trait` feature gateGary Guo-0/+3
When this gate is enabled, explicit generic arguments can be specified even if `impl Trait` is used in argument position. Generic arguments can only be specified for explicit generic parameters but not for the synthetic type parameters from `impl Trait`
2021-07-31Add feature gate tests.Charles Lew-1/+1
2021-07-31Added feature gate.Alexander Regueiro-0/+4
2021-07-30Auto merge of #87237 - jonas-schievink:const-for-and-try, r=oli-obkbors-0/+6
Add feature gates for `for` and `?` in consts These operations seems *relatively* straightforward to support, and only seem to be blocked on `impl const Trait`. I have included a working test for `const_try`, but `const_for` is currently unusable without reimplementing *every single* defaulted `Iterator` method, so I didn't do that. (both features still need tracking issues before this is merged)
2021-07-29rfc3052: Remove authors field from Cargo manifestsJade-1/+0
Since RFC 3052 soft deprecated the authors field anyway, hiding it from crates.io, docs.rs, and making Cargo not add it by default, and it is not generally up to date/useful information, we should remove it from crates in this repo.
2021-07-29Add tracking issuesJonas Schievink-2/+2
2021-07-29Add feature gates for `for` and `?` in constsJonas Schievink-0/+6
2021-07-28min_type_alias_impl_trait is going to be removed in 1.56Santiago Pastorino-1/+1
2021-07-28Stabilize `arbitrary_enum_discriminant`Deadbeef-3/+2
2021-07-28Rollup merge of #87501 - spastorino:remove-min-tait, r=oli-obkYuki Okushi-5/+6
Remove min_type_alias_impl_trait in favor of type_alias_impl_trait r? ``@oli-obk``
2021-07-28Auto merge of #86735 - jhpratt:rfc-3107, r=petrochenkovbors-0/+3
Implement RFC 3107: `#[derive(Default)]` on enums with a `#[default]` attribute This PR implements RFC 3107, which permits `#[derive(Default)]` on enums where a unit variant has a `#[default]` attribute. See comments for current status.
2021-07-27Stabilize `const_fn_union`Jacob Pratt-3/+2
2021-07-27Stabilize `const_fn_transmute`Jacob Pratt-3/+2
2021-07-27Permit deriving default on enums with `#[default]`Jacob Pratt-0/+3
2021-07-27Auto merge of #83484 - JulianKnodt:infer, r=oli-obk,lcnrbors-0/+3
Add hir::GenericArg::Infer In order to extend inference to consts, make an Infer type on hir::GenericArg.
2021-07-27Remove min_type_alias_impl_trait featureSantiago Pastorino-3/+4
2021-07-27existential_type was removed in favor of type_alias_impl_traitSantiago Pastorino-1/+1
2021-07-27Use type_alias_impl_trait instead of min in compiler and libSantiago Pastorino-1/+1
2021-07-27Auto merge of #85305 - MarcusDunn:master, r=pnkfelixbors-4/+3
Stabilize bindings_after_at attempting to stabilze bindings_after_at [#65490](https://github.com/rust-lang/rust/issues/65490), im pretty new to the whole thing so any pointers are greatly appreciated.
2021-07-26Actually infer args in visitorskadmin-0/+3
2021-07-20Add internal attribute and tests.Charles Lew-0/+1
2021-07-19Improve impl_trait_in_bindings removed feature textSantiago Pastorino-1/+1
2021-07-18Remove impl_trait_in_bindings feature flagSantiago Pastorino-3/+4
2021-07-16Auto merge of #87201 - GuillaumeGomez:rollup-4loi2q9, r=GuillaumeGomezbors-1/+1
Rollup of 7 pull requests Successful merges: - #87107 (Loop over all opaque types instead of looking at just the first one with the same DefId) - #87158 (Suggest full enum variant for local modules) - #87174 (Stabilize `[T; N]::map()`) - #87179 (Mark `const_trait_impl` as active) - #87180 (feat(rustdoc): open sidebar menu when links inside it are focused) - #87188 (Add GUI test for auto-hide-trait-implementations setting) - #87200 (TAIT: Infer all inference variables in opaque type substitutions via InferCx) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-07-16Make GATs no longer incompleteJack Huey-1/+1
2021-07-16Mark `const_trait_impl` as activeDeadbeef-1/+1
2021-07-13expand: Support helper attributes for built-in derive macrosVadim Petrochenkov-1/+5
2021-07-13Auto merge of #86922 - joshtriplett:target-abi, r=oli-obkbors-0/+4
target abi Implement cfg(target_abi) (RFC 2992) Add an `abi` field to `TargetOptions`, defaulting to "". Support using `cfg(target_abi = "...")` for conditional compilation on that field. Gated by `feature(cfg_target_abi)`. Add a test for `target_abi`, and a test for the feature gate. Add `target_abi` to tidy as a platform-specific cfg. Update targets to use `target_abi` All eabi targets have `target_abi = "eabi".` All eabihf targets have `target_abi = "eabihf"`. `armv6_unknown_freebsd` and `armv7_unknown_freebsd` have `target_abi = "eabihf"`. All abi64 targets have `target_abi = "abi64"`. All ilp32 targets have `target_abi = "ilp32"`. All softfloat targets have `target_abi = "softfloat"`. All *-uwp-windows-* targets have `target_abi = "uwp"`. All spe targets have `target_abi = "spe"`. All macabi targets have `target_abi = "macabi"`. aarch64-apple-ios-sim has `target_abi = "sim"`. `x86_64-fortanix-unknown-sgx` has `target_abi = "fortanix"`. `x86_64-unknown-linux-gnux32` has `target_abi = "x32"`. Add FIXME entries for targets for which existing values need to change once `cfg_target_abi` becomes stable. (All of them are tier 3 targets.) Add a test for `target_abi` in `--print cfg`.
2021-07-13Auto merge of #86857 - fee1-dead:add-attr, r=oli-obkbors-0/+6
Add #[default_method_body_is_const] `@rustbot` label F-const_trait_impl
2021-07-10Applied suggestionsDeadbeef-5/+6
2021-07-10Add #[default_method_body_is_const]Deadbeef-0/+5
2021-07-10remove const_raw_ptr_to_usize_cast featureRalf Jung-3/+4
2021-07-07Implement cfg(target_abi) (RFC 2992)Josh Triplett-0/+4
Add an `abi` field to `TargetOptions`, defaulting to "". Support using `cfg(target_abi = "...")` for conditional compilation on that field. Gated by `feature(cfg_target_abi)`. Add a test for `target_abi`, and a test for the feature gate. Add `target_abi` to tidy as a platform-specific cfg. This does not add an abi to any existing target.
2021-07-07Change linked tracking issue for more qualified pathsRyan Levick-1/+1
2021-06-28Panic on trying to find non-feature incompletenessSmitty-1/+4
2021-06-28Make incomplete features part of delcarationSmitty-44/+38
This prevents mistakes where the feature is in the list of incomplete features but not actually a feature by making the incompleteness a part of the declaration.
2021-06-28Don't make `rustc_insignificant_dtor` feature gateSmitty-1/+0
This isn't a feature gate, it's an attribute that is feature gated behind the `rustc_attrs` attribute. Closes #85680.
2021-06-10Add support for using qualified paths with structs in expression and patternRyan Levick-0/+3
position.
2021-06-06Auto merge of #79608 - alessandrod:bpf, r=nagisabors-0/+1
BPF target support This adds `bpfel-unknown-none` and `bpfeb-unknown-none`, two new no_std targets that generate little and big endian BPF. The approach taken is very similar to the cuda target, where `TargetOptions::obj_is_bitcode` is enabled and code generation is done by the linker. I added the targets to `dist-various-2`. There are [some tests](https://github.com/alessandrod/bpf-linker/tree/main/tests/assembly) in bpf-linker and I'm planning to add more. Those are currently not ran as part of rust CI.
2021-06-04changeded bindings_after_at from active to acceptedmarcusdunn-1/+1
2021-06-04updated the feature-gate listingmarcusdunn-4/+3
2021-06-04Remove `doc(include)`Joshua Nelson-3/+4
2021-06-01Auto merge of #85331 - cjgillot:dirty-dancing, r=Aaron1011bors-4/+0
Make rustc_dirty/clean annotations exhaustive by default Fixes #45009
2021-05-30BPF: review fixesAlessandro Decina-1/+1