about summary refs log tree commit diff
path: root/src/test/ui/stability-attribute
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-2468/+0
2023-01-09fix: fix CI errorsEzra Shaw-1/+1
2022-12-13Make some diagnostics not depend on the source of what they reference being ↵Oli Scherer-3/+0
available
2022-10-19Allow #[unstable] impl for fn() -> UnstableType.Mara Bos-0/+3
(But not fn() -> !, which is stable.)
2022-10-19Add test for #[unstable] impl for fn() -> !.Mara Bos-1/+13
2022-10-19Add test.Mara Bos-4/+11
2022-10-15Auto merge of #99292 - Aaron1011:stability-use-tree, r=cjgillotbors-1/+27
Correctly handle path stability for 'use tree' items PR #95956 started checking the stability of path segments. However, this was not applied to 'use tree' items (e.g. 'use some::path::{ItemOne, ItemTwo}') due to the way that we desugar these items in HIR lowering. This PR modifies 'use tree' lowering to preserve resolution information, which is needed by stability checking.
2022-10-01bless ui testsMaybe Waffle-1/+1
2022-09-16bless testsDeadbeef-1/+2
2022-08-12enum variant ctor inherits stability of variantMichael Goulet-0/+16
2022-07-26Improve error message for unstable default bodyMaybe Waffle-7/+13
2022-07-26Add tests for `#[rustc_default_body_unstable]`Maybe Waffle-0/+119
2022-07-20passes: check implied feature existsDavid Wood-0/+18
Add a check confirming that features referenced in `implied_by` meta items actually exist. Signed-off-by: David Wood <david.wood@huawei.com>
2022-07-20passes: improved partial stabilization diagnosticDavid Wood-4/+20
Improves the diagnostic when a feature attribute is specified unnecessarily but the feature implies another (i.e. it was partially stabilized) to refer to the implied feature. Signed-off-by: David Wood <david.wood@huawei.com>
2022-07-20middle: add `implies_by` to `#[unstable]`David Wood-0/+102
If part of a feature is stabilized and a new feature is added for the remaining parts, then the `implied_by` attribute can be used to indicate which now-stable feature previously contained a item. If the now-stable feature is still active (if the user has only just updated rustc, for example) then there will not be an stability error for uses of the item from the implied feature. Signed-off-by: David Wood <david.wood@huawei.com>
2022-07-20attr: fix expected meta-item for `#[stable]`David Wood-2/+2
When an unexpected meta item is provided to `#[stable]`, the diagnostic lists "since" and "note" as expected meta-items, however the surrounding code actually expects "feature" and "since". Signed-off-by: David Wood <david.wood@huawei.com>
2022-07-15Correctly handle path stability for 'use tree' itemsAaron Hill-1/+27
PR #5956 started checking the stability of path segments. However, this was not applied to 'use tree' items (e.g. 'use some::path::{ItemOne, ItemTwo}') due to the way that we desugar these items in HIR lowering. This PR modifies 'use tree' lowering to preserve resolution information, which is needed by stability checking.
2022-07-15Mark stabilized intrinsics with `rustc_allowed_through_unstable_modules`Aaron Hill-0/+17
Fixes #99286 PR #95956 accidentally made these intrinsics unstable when accessed through the unstable path segment 'std::intrinsics'
2022-07-08fixes post rebaseJane Losare-Lusby-17/+1
2022-07-08add rt flag to allowed internal unstable for RustcEncodable/DecodableJane Lusby-0/+8
2022-07-08add opt in attribute for stable-in-unstable itemsJane Lusby-0/+64
2022-07-08Support unstable moves via stable in unstable itemsJane Lusby-0/+104
2022-07-07Reword comments and rename HIR visiting methods.Camille GILLOT-6/+6
2022-06-04Allow unstable items to be re-exported unstably without requiring the ↵cole-0/+66
feature be enabled
2022-05-19Proper const stability check, default to unstableJacob Pratt-5/+20
Rather than deferring to const eval for checking if a trait is const, we now check up-front. This allows the error to be emitted earlier, notably at the same time as other stability checks. Also included in this commit is a change of the default const stability level to UNstable. Previously, an item that was `const` but did not explicitly state it was unstable was implicitly stable.
2022-04-14Use native duplicate attribute checkJacob Pratt-10/+14
2022-03-09Permit `#[deprecated]` in stdlibJacob Pratt-103/+59
2022-03-04Change `rustc_deprecated` to use `note`Jacob Pratt-46/+46
This keeps `reason` around for the time being. This is necessary to avoid breakage during the bootstrap process. This change, as a whole, brings `#[rustc_deprecated]` more in line with `#[deprecated]`.
2022-03-03Cleanup feature gates.Camille GILLOT-3/+10
2022-03-03Gate stability attrs with other attributes.Camille GILLOT-6/+22
2022-03-03Bless test.Camille GILLOT-2/+17
2022-02-24don't special case `DefKind::Ctor` in encodinglcnr-8/+8
2022-02-03Add missing const stability attributesJacob Pratt-7/+9
2022-02-03Require const stability on all stable const itemsJacob Pratt-9/+27
This was supposed to be the case previously, but a missed method call meant that trait impls were not checked.
2022-01-12Bless tests.Camille GILLOT-105/+129
2021-11-23Rollup merge of #90856 - ↵Matthias Krüger-0/+58
ken-matsui:suggestion-to-wrap-vec-allocator-api-in-tuple, r=davidtwco Suggestion to wrap inner types using 'allocator_api' in tuple This PR provides a suggestion to wrap the inner types in tuple when being along with 'allocator_api'. Closes https://github.com/rust-lang/rust/issues/83250 ```rust fn main() { let _vec: Vec<u8, _> = vec![]; //~ ERROR use of unstable library feature 'allocator_api' } ``` ```diff error[E0658]: use of unstable library feature 'allocator_api' --> $DIR/suggest-vec-allocator-api.rs:2:23 | LL | let _vec: Vec<u8, _> = vec![]; - | ^ + | ----^ + | | + | help: consider wrapping the inner types in tuple: `(u8, _)` | = note: see issue #32838 <https://github.com/rust-lang/rust/issues/32838> for more information = help: add `#![feature(allocator_api)]` to the crate attributes to enable ```
2021-11-24Suggestion to wrap inner types using `allocator_api` in tupleKen Matsui-0/+58
2021-11-18Move some tests to more reasonable directoriesCaio-0/+19
2021-11-08Don't abort compilation after giving a lint errorJoshua Nelson-11/+24
The only reason to use `abort_if_errors` is when the program is so broken that either: 1. later passes get confused and ICE 2. any diagnostics from later passes would be noise This is never the case for lints, because the compiler has to be able to deal with `allow`-ed lints. So it can continue to lint and compile even if there are lint errors.
2021-07-26Add long explanation for E0544.Chris Midgley-1/+1
2021-06-15Use last segmenthi-rustin-18/+18
2021-06-15shrinking the deprecated method spanhi-rustin-8/+8
2021-06-04Revert "shrinking the deprecated method span"Rich Kadel-8/+8
2021-05-24shrinking the deprecated method spanhi-rustin-8/+8
2021-05-09remove const_fn feature gateRalf Jung-1/+1
2021-04-03Remove redundant `ignore-tidy-linelength` annotationsSimon Jakobi-74/+72
This is step 2 towards fixing #77548. In the codegen and codegen-units test suites, the `//` comment markers were kept in order not to affect any source locations. This is because these tests cannot be automatically `--bless`ed.
2021-03-15More precise spans for HIR pathsVadim Petrochenkov-4/+4
2021-03-05Auto merge of #71481 - estebank:inherit-stability, r=nikomatsakisbors-21/+23
Inherit `#[stable(..)]` annotations in enum variants and fields from its item Lint changes for #65515. The stdlib will have to be updated once this lands in beta and that version is promoted in master.
2021-02-18Add long explanation for E0549Jesus Rubio-1/+1
2021-02-17Add long explanation for E0543Jesus Rubio-1/+1