about summary refs log tree commit diff
path: root/src/test/ui/feature-gates
AgeCommit message (Collapse)AuthorLines
2020-11-23Rename `optin_builtin_traits` to `auto_traits`Camelid-4/+4
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 <https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/opt-in.2C.20built-in.20traits.20(auto.20traits).20feature.20name>.
2020-11-22Auto merge of #79243 - Nadrieril:consolidate-tests, r=varkorbors-10/+15
Consolidate exhaustiveness-related tests I hunted for tests that only exercised the match exhaustiveness algorithm and regrouped them. I also improved integer-range tests since I had found them lacking while hacking around. The interest is mainly so that one can pass `--test-args patterns` and catch most relevant tests. r? `@varkor` `@rustbot` modify labels: +A-exhaustiveness-checking
2020-11-22resolve: Do not put macros into `module.unexpanded_invocations` unless necessaryVadim Petrochenkov-64/+64
2020-11-21Improve integer range testsNadrieril-10/+15
2020-11-19Rollup merge of #78961 - CraftSpider:22565, r=oli-obkDylan DPC-12/+12
Make bad "rust-call" arguments no longer ICE The simplest of bad rust-call definitions will no longer cause an ICE. There is a FIXME added for future work, as I wanted to get this easy fix in before trying to either add a hack or mess with the whole obligation system fixes #22565
2020-11-11Missing feature-gate-abi fileRune Tynan-6/+6
2020-11-11Add a sane error for rust-call functions not taking tuples during type ↵Rune Tynan-6/+6
checking, and associated UI tests
2020-11-09Add `#[cfg(panic = "...")]`David Hewitt-0/+32
2020-11-07Implement destructuring assignment for tuplesFabian Zaiser-0/+18
Co-authored-by: varkor <github@varkor.com>
2020-10-27Make tidy happySantiago Pastorino-2/+2
2020-10-27Add unsized_fn_params featureSantiago Pastorino-3/+55
2020-10-25Rollup merge of #78208 - liketechnik:issue-69399, r=oli-obkYuki Okushi-1/+29
replace `#[allow_internal_unstable]` with `#[rustc_allow_const_fn_unstable]` for `const fn`s `#[allow_internal_unstable]` is currently used to side-step feature gate and stability checks. While it was originally only meant to be used only on macros, its use was expanded to `const fn`s. This pr adds stricter checks for the usage of `#[allow_internal_unstable]` (only on macros) and introduces the `#[rustc_allow_const_fn_unstable]` attribute for usage on `const fn`s. This pr does not change any of the functionality associated with the use of `#[allow_internal_unstable]` on macros or the usage of `#[rustc_allow_const_fn_unstable]` (instead of `#[allow_internal_unstable]`) on `const fn`s (see https://github.com/rust-lang/rust/issues/69399#issuecomment-712911540). Note: The check for `#[rustc_allow_const_fn_unstable]` currently only validates that the attribute is used on a function, because I don't know how I would check if the function is a `const fn` at the place of the check. I therefore openend this as a 'draft pull request'. Closes rust-lang/rust#69399 r? @oli-obk
2020-10-21validate allow_internal_unstable targetFlorian Warzecha-1/+11
Adds a check to make sure `#[allow_internal_unstable]` can be applied only to macro definitions.
2020-10-21add rustc_allow_const_fn_unstable attributeFlorian Warzecha-0/+18
allow_internal_unstable is currently used to side-step feature gate and stability checks. While it was originally only meant to be used only on macros, its use was expanded to const functions. This commit prepares stricter checks for the usage of allow_internal_unstable (only on macros) and introduces the rustc_allow_const_fn_unstable attribute for usage on functions. See rust-lang/rust#69399
2020-10-20review commentsEsteban Küber-5/+5
2020-10-20Tweak "object unsafe" errorsEsteban Küber-23/+39
Fix #77598.
2020-10-16stabilize union with 'ManuallyDrop' fields and 'impl Drop for Union'Ralf Jung-36/+22
2020-10-09Auto merge of #77578 - euclio:max-suggestion, r=davidtwcobors-1/+4
suggest `MAX` constant if -1 is assigned to unsigned type Fixes #76413. Fixes #77416.
2020-10-08suggest `MAX` constant if -1 is assigned to unsigned typeAndy Russell-1/+4
2020-10-06Update to chalk 0.31. Implement some unimplemented. Ignore some tests in ↵Jack Huey-13/+14
compare mode chalk don't finish.
2020-10-06Fix tests from rebaseMatthew Jasper-29/+28
2020-10-06Fix rebaseMatthew Jasper-5/+18
2020-10-06Fix tests and bootstrapMatthew Jasper-17/+18
2020-10-06Separate bounds and predicates for associated/opaque typesMatthew Jasper-18/+35
2020-09-25Rollup merge of #77160 - ecstatic-morse:const-fn-transmute-suggestion, r=oli-obkJonas Schievink-37/+46
Suggest `const_fn_transmute`, not `const_fn` More fallout from #76850 in the vein of #77134. The fix is the same. I looked through the structured errors file and didn't see any more of this kind of diagnostics bug. r? @oli-obk
2020-09-24Bless testsDylan MacKenzie-37/+46
2020-09-21Add feature gate ui test for cfg(target_has_atomic_equal_alignment).Mara Bos-1/+67
2020-09-21Add feature gate ui test for cfg(target_has_atomic_load_store).Mara Bos-1/+67
2020-09-14Stabilize doc_alias featureGuillaume Gomez-16/+0
2020-09-02pretty: trim paths of unique symbolsDan Aloni-21/+20
If a symbol name can only be imported from one place for a type, and as long as it was not glob-imported anywhere in the current crate, we can trim its printed path and print only the name. This has wide implications on error messages with types, for example, shortening `std::vec::Vec` to just `Vec`, as long as there is no other `Vec` importable anywhere. This adds a new '-Z trim-diagnostic-paths=false' option to control this feature. On the good path, with no diagnosis printed, we should try to avoid issuing this query, so we need to prevent trimmed_def_paths query on several cases. This change also relies on a previous commit that differentiates between `Debug` and `Display` on various rustc types, where the latter is trimmed and presented to the user and the former is not.
2020-08-08Auto merge of #74877 - lcnr:min_const_generics, r=oli-obkbors-8/+8
Implement the `min_const_generics` feature gate Implements both https://github.com/rust-lang/lang-team/issues/37 and https://github.com/rust-lang/compiler-team/issues/332. Adds the new feature gate `#![feature(min_const_generics)]`. This feature gate adds the following limitations to using const generics: - generic parameters must only be used in types if they are trivial. (either `N` or `{ N }`) - generic parameters must be either integers, `bool` or `char`. We do allow arbitrary expressions in associated consts though, meaning that the following is allowed, even if `<[u8; 0] as Foo>::ASSOC` is not const evaluatable. ```rust trait Foo { const ASSOC: usize; } impl<const N: usize> Foo for [u8; N] { const ASSOC: usize = 64 / N; } ``` r? @varkor cc @eddyb @withoutboats
2020-08-06Fix ICE when using asm! on an unsupported architectureAmanieu d'Antras-2/+2
Fixes #75220
2020-08-05impl reviewBastian Kauschke-8/+8
2020-07-27mv std libs to library/mark-1/+1
2020-07-25Use the proper span when WF-checking an impl self typeAaron Hill-2/+2
2020-07-16Revert "Remove "important traits" feature"Manish Goregaokar-0/+16
This reverts commit 1244ced9580b942926afc06815e0691cf3f4a846.
2020-07-14Suggest borrowing in more unsized fn param casesEsteban Küber-1/+4
2020-07-14Remove `Sized` `on_unimplemented` noteEsteban Küber-4/+0
2020-07-14Suggest boxing or borrowing unsized fieldsEsteban Küber-2/+2
2020-07-11Rollup merge of #74168 - JohnTitor:help-for-in-band-lifetimes, r=petrochenkovManish Goregaokar-0/+22
Add a help to use `in_band_lifetimes` in nightly Fixes #73775
2020-07-11Stabilize `transmute` in constants and statics but not const fnOliver Scherer-19/+147
2020-07-10Tweak wordingYuki Okushi-16/+16
2020-07-10Add a help to use `in_band_lifetimes` in nightlyYuki Okushi-0/+22
2020-07-05Address code reviewsYuki Okushi-4/+4
2020-07-05Explain exhaustive matching on {usize,isize} maximum valuesYuki Okushi-0/+4
2020-06-30Stabilize `#[track_caller]`.Adam Perry-17/+0
Does not yet make its constness stable, though. Use of `Location::caller` in const contexts is still gated by `#![feature(const_caller_location)]`.
2020-06-23Rollup merge of #73398 - oli-obk:const_raw_ptr_cmp, r=varkor,RalfJung,nagisaManish Goregaokar-10/+4
A way forward for pointer equality in const eval r? @varkor on the first commit and @RalfJung on the second commit cc #53020
2020-06-20Move bounds on associated types to the typeMatthew Jasper-25/+7
Given `trait X { type U; }` the bound `<Self as X>::U` now lives on the type, rather than the trait. This is feature gated on `feature(generic_associated_types)` for now until more testing can be done. The also enabled type-generic associated types since we no longer need "implies bounds".
2020-06-19Remove the const_raw_ptr_comparison feature gate.Oliver Scherer-10/+4
We can never supply a meaningful implementation of this. Instead, the follow up commits will create two intrinsics that approximate comparisons: * `ptr_maybe_eq` * `ptr_maybe_ne` The fact that `ptr_maybe_eq(a, b)` is not necessarily the same value as `!ptr_maybe_ne(a, b)` is a symptom of this entire problem.
2020-06-15Auto merge of #72080 - matthewjasper:uniform-impl-trait, r=nikomatsakisbors-63/+31
Clean up type alias impl trait implementation - Removes special case for top-level impl trait - Removes associated opaque types - Forbid lifetime elision in let position impl trait. This is consistent with the behavior for inferred types. - Handle lifetimes in type alias impl trait more uniformly with other parameters cc #69323 cc #63063 Closes #57188 Closes #62988 Closes #69136 Closes #73061