about summary refs log tree commit diff
path: root/compiler/rustc_feature/src/active.rs
AgeCommit message (Collapse)AuthorLines
2023-03-31Auto merge of #109824 - GuillaumeGomez:rollup-i5r4uts, r=GuillaumeGomezbors-1/+1
Rollup of 7 pull requests Successful merges: - #109104 (rustdoc: Fix invalid suggestions on ambiguous intra doc links v2) - #109443 (Move `doc(primitive)` future incompat warning to `invalid_doc_attributes`) - #109680 (Fix subslice capture in closure) - #109798 (fluent_messages macro: don't emit the OS error in a note) - #109805 (Source map cleanups) - #109818 (rustdoc: Add GUI test for jump to collapsed item) - #109820 (rustdoc-search: update docs for comma in `?` help popover) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-03-30Rename doc(primitive) into rustc_doc_primitiveGuillaume Gomez-1/+1
2023-03-28Feature gateMichael Goulet-0/+2
2023-03-23Rollup merge of #108549 - clubby789:fix-link-cfg-issue, r=eholkMatthias Krüger-2/+2
Remove issue number for `link_cfg` Fixes #72059 Per #37406 and its [unstable book entry](https://doc.rust-lang.org/beta/unstable-book/language-features/link-cfg.html), this is an internal feature, and therefore perma-unstable and not being tracked
2023-03-15Bump version placeholdersMark Rousskov-3/+3
2023-03-12Remove `box_syntax` from AST and use in toolsclubby789-2/+0
2023-03-02Stabilize movbe target featureCaleb Zulawski-1/+0
2023-03-02Revert "Stabilize `#![feature(target_feature_11)]`"Léo Lanteri Thauvin-0/+2
This reverts commit b379d216eefaba083a0627b1724d73f99d4bdf5c.
2023-03-01Rollup merge of #108550 - clubby789:remove-disjoint, r=compiler-errorsMatthias Krüger-2/+0
Remove the `capture_disjoint_fields` feature As best I can tell, this was stabilized for Edition 2021 in #88126 but the feature was never removed.
2023-02-28Auto merge of #106774 - Nugine:master, r=Amanieubors-1/+0
Stabilize cmpxchg16b_target_feature Tracking issue for target features + #44839 stdarch issue + https://github.com/rust-lang/stdarch/issues/827 stdarch PR + https://github.com/rust-lang/stdarch/pull/1358 reference PR + https://github.com/rust-lang/reference/pull/1331 It's my first time contributing to rust-lang/rust. Please tell me if I missed something.
2023-02-28Remove the `capture_disjoint_fields` featureclubby789-2/+0
2023-02-28Auto merge of #99767 - LeSeulArtichaut:stable-target-feature-11, r=estebankbors-2/+0
Stabilize `#![feature(target_feature_11)]` ## Stabilization report ### Summary Allows for safe functions to be marked with `#[target_feature]` attributes. Functions marked with `#[target_feature]` are generally considered as unsafe functions: they are unsafe to call, cannot be assigned to safe function pointers, and don't implement the `Fn*` traits. However, calling them from other `#[target_feature]` functions with a superset of features is safe. ```rust // Demonstration function #[target_feature(enable = "avx2")] fn avx2() {} fn foo() { // Calling `avx2` here is unsafe, as we must ensure // that AVX is available first. unsafe { avx2(); } } #[target_feature(enable = "avx2")] fn bar() { // Calling `avx2` here is safe. avx2(); } ``` ### Test cases Tests for this feature can be found in [`src/test/ui/rfcs/rfc-2396-target_feature-11/`](https://github.com/rust-lang/rust/tree/b67ba9ba208ac918228a18321fc3a11a99b1c62b/src/test/ui/rfcs/rfc-2396-target_feature-11/). ### Edge cases - https://github.com/rust-lang/rust/issues/73631 Closures defined inside functions marked with `#[target_feature]` inherit the target features of their parent function. They can still be assigned to safe function pointers and implement the appropriate `Fn*` traits. ```rust #[target_feature(enable = "avx2")] fn qux() { let my_closure = || avx2(); // this call to `avx2` is safe let f: fn() = my_closure; } ``` This means that in order to call a function with `#[target_feature]`, you must show that the target-feature is available while the function executes *and* for as long as whatever may escape from that function lives. ### Documentation - Reference: https://github.com/rust-lang/reference/pull/1181 --- cc tracking issue #69098 r? `@ghost`
2023-02-28Remove issue number for `link_cfg`clubby789-2/+2
2023-02-18Adjust tracking issue for non_lifetime_bindersMichael Goulet-1/+1
2023-02-17Rollup merge of #107489 - compiler-errors:non_lifetime_binders, r=cjgillotMatthias Krüger-0/+2
Implement partial support for non-lifetime binders This implements support for non-lifetime binders. It's pretty useless currently, but I wanted to put this up so the implementation can be discussed. Specifically, this piggybacks off of the late-bound lifetime collection code in `rustc_hir_typeck::collect::lifetimes`. This seems like a necessary step given the fact we don't resolve late-bound regions until this point, and binders are sometimes merged. Q: I'm not sure if I should go along this route, or try to modify the earlier nameres code to compute the right bound var indices for type and const binders eagerly... If so, I'll need to rename all these queries to something more appropriate (I've done this for `resolve_lifetime::Region` -> `resolve_lifetime::ResolvedArg`) cc rust-lang/types-team#81 r? `@ghost`
2023-02-16note issue for feature(packed_bundled_libs)BelovDV-2/+2
2023-02-16Add feature gate for non_lifetime_bindersMichael Goulet-0/+2
2023-02-10[link] enable packed bundled lib in non stable casesDaniil Belov-0/+2
2023-02-01Stabilize `#![feature(target_feature_11)]`Léo Lanteri Thauvin-2/+0
2023-02-01Stabilize cmpxchg16b_target_featureNugine-1/+0
2023-01-31Auto merge of #107297 - Mark-Simulacrum:bump-bootstrap, r=pietroalbinibors-1/+1
Bump bootstrap compiler to 1.68 This also changes our stage0.json to include the rustc component for the rustfmt pinned nightly toolchain, which is currently necessary due to rustfmt dynamically linking to that toolchain's librustc_driver and libstd. r? `@pietroalbini`
2023-01-28Reintroduce multiple_supertrait_upcastable lintGary Guo-0/+2
2023-01-25Set version placeholders to 1.68Mark Rousskov-1/+1
2023-01-13Auto merge of #106004 - fee1-dead-contrib:const-closures, r=oli-obkbors-1/+3
Const closures cc https://github.com/rust-lang/rust/issues/106003
2023-01-13Rollup merge of #105795 - nicholasbishop:bishop-stabilize-efiapi, r=joshtriplettYuki Okushi-2/+0
Stabilize `abi_efiapi` feature Tracking issue: https://github.com/rust-lang/rust/issues/65815 Closes #65815
2023-01-11Rollup merge of #106323 - starkat99:stabilize-f16c_target_feature, ↵Michael Goulet-1/+0
r=petrochenkov Stabilize f16c_target_feature Resolves https://github.com/rust-lang/stdarch/issues/1234 Library PR for stabilizing corresponding intrinsics: https://github.com/rust-lang/stdarch/pull/1366 See also #44839 tracking issue for target_feature
2023-01-12gate const closuresDeadbeef-1/+3
2023-01-11Stabilize `abi_efiapi` featureNicholas Bishop-2/+0
Tracking issue: https://github.com/rust-lang/rust/issues/65815
2023-01-09[RFC 2397] Initial implementationCaio-0/+2
2023-01-01Use the correct tracking issue for `dyn_star`Léo Lanteri Thauvin-1/+1
2022-12-30Stabilize f16c_target_featureKathryn Long-1/+0
2022-12-29Revert "Implement allow-by-default multiple_supertrait_upcastable lint"David Tolnay-2/+0
This reverts commit 5e44a65517bfcccbe6624a70b54b9f192baa94f3.
2022-12-28update stabilization version numbersPietro Albini-2/+2
2022-12-28Rollup merge of #105484 - nbdd0121:upcast, r=compiler-errorsfee1-dead-0/+2
Implement allow-by-default `multiple_supertrait_upcastable` lint The lint detects when an object-safe trait has multiple supertraits. Enabled in libcore and liballoc as they are low-level enough that many embedded programs will use them. r? `@nikomatsakis`
2022-12-16Auto merge of #102318 - Amanieu:default_alloc_error_handler, r=oli-obkbors-2/+0
Stabilize default_alloc_error_handler Tracking issue: #66741 This turns `feature(default_alloc_error_handler)` on by default, which causes the compiler to automatically generate a default OOM handler which panics if `#[alloc_error_handler]` is not provided. The FCP completed over 2 years ago but the stabilization was blocked due to an issue with unwinding. This was fixed by #88098 so stabilization can be unblocked. Closes #66741
2022-12-09Implement allow-by-default multiple_supertrait_upcastable lintGary Guo-0/+2
2022-11-27Stabilize native library modifier `verbatim`Vadim Petrochenkov-2/+0
2022-11-21Auto merge of #103491 - cjgillot:self-rpit, r=oli-obkbors-0/+2
Support using `Self` or projections inside an RPIT/async fn I reuse the same idea as https://github.com/rust-lang/rust/pull/103449 to use variances to encode whether a lifetime parameter is captured by impl-trait. The current implementation of async and RPIT replace all lifetimes from the parent generics by `'static`. This PR changes the scheme ```rust impl<'a> Foo<'a> { fn foo<'b, T>() -> impl Into<Self> + 'b { ... } } opaque Foo::<'_a>::foo::<'_b, T>::opaque<'b>: Into<Foo<'_a>> + 'b; impl<'a> Foo<'a> { // OLD fn foo<'b, T>() -> Foo::<'static>::foo::<'static, T>::opaque::<'b> { ... } ^^^^^^^ the `Self` becomes `Foo<'static>` // NEW fn foo<'b, T>() -> Foo::<'a>::foo::<'b, T>::opaque::<'b> { ... } ^^ the `Self` stays `Foo<'a>` } ``` There is the same issue with projections. In the example, substitute `Self` by `<T as Trait<'b>>::Assoc` in the sugared version, and `Foo<'_a>` by `<T as Trait<'_b>>::Assoc` in the desugared one. This allows to support `Self` in impl-trait, since we do not replace lifetimes by `'static` any more. The same trick allows to use projections like `T::Assoc` where `Self` is allowed. The feature is gated behind a `impl_trait_projections` feature gate. The implementation relies on 2 tweaking rules for opaques in 2 places: - we only relate substs that correspond to captured lifetimes during TypeRelation; - we only list captured lifetimes in choice region computation. For simplicity, I encoded the "capturedness" of lifetimes as a variance, `Bivariant` vs `Invariant` for unused vs captured lifetimes. The `variances_of` query used to ICE for opaques. Impl-trait that do not reference `Self` or projections will have their variances as: - `o` (invariant) for each parent type or const; - `*` (bivariant) for each parent lifetime --> will not participate in borrowck; - `o` (invariant) for each own lifetime. Impl-trait that does reference `Self` and/or projections will have some parent lifetimes marked as `o` (as the example above), and participate in type relation and borrowck. In the example above, `variances_of(opaque) = ['_a: o, '_b: *, T: o, 'b: o]`. r? types cc `@compiler-errors` , as you asked about the issue with `Self` and projections.
2022-11-18rename to `string_deref_patterns`Deadbeef-2/+2
2022-11-17Add feature gateDeadbeef-0/+2
2022-11-14Auto merge of #103858 - Mark-Simulacrum:bump-bootstrap, r=pietroalbinibors-2/+2
Bump bootstrap compiler to 1.66 This PR: - Bumps version placeholders to release - Bumps to latest beta - cfg-steps code r? `@pietroalbini`
2022-11-12Rollup merge of #104117 - crlf0710:update_feature_gate, r=jackh726Guillaume Gomez-3/+3
Mark `trait_upcasting` feature no longer incomplete. This marks the `trait_upcasting` feature no longer incomplete since #101336 has been settled for a little while. r? ``````@jackh726``````
2022-11-12Add tracking issue number.Camille GILLOT-1/+1
2022-11-12Make impl_trait_projections a feature gate.Camille GILLOT-0/+2
2022-11-11Mark `trait_upcasting` feature no longer incomplete.Charles Lew-3/+3
2022-11-08Add support for custom MIR parsingJakob Degen-0/+2
2022-11-06Bump version placeholders to releaseMark Rousskov-2/+2
2022-11-05Auto merge of #102458 - JohnTitor:stabilize-instruction-set, r=oli-obkbors-2/+0
Stabilize the `instruction_set` feature Closes https://github.com/rust-lang/rust/issues/74727 FCP is complete on https://github.com/rust-lang/rust/issues/74727#issuecomment-1242773253 r? `@pnkfelix` and/or `@nikomatsakis` cc `@xd009642` Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-11-03Stabilize default_alloc_error_handlerAmanieu d'Antras-2/+0
Closes #66741
2022-10-30Rollup merge of #97971 - Soveu:varargs, r=jackh726Michael Howell-0/+3
Enable varargs support for calling conventions other than C or cdecl This patch makes it possible to use varargs for calling conventions, which are either based on C (efiapi) or C is based on them (sysv64 and win64). Also pinging ``@phlopsi,`` because he noticed first this oversight when writing a library for UEFI.