about summary refs log tree commit diff
path: root/src/test/ui/feature-gates
AgeCommit message (Collapse)AuthorLines
2019-04-23Stabilize futures_apiTaylor Cramer-14/+10
2019-04-23Update ui testsvarkor-1/+1
2019-04-23Remove unnecessary ignore-tidy-linelengthvarkor-1/+0
2019-04-23Auto merge of #60172 - varkor:tidy-double-trailing-newline, r=kennytmbors-6/+0
Disallow double trailing newlines in tidy This wasn't done previously in https://github.com/rust-lang/rust/pull/47064#issuecomment-354533010 as it affected too many files, but I think it's best to fix it now so that the number of files with double trailing newlines doesn't keep increasing. r? kennytm
2019-04-22Remove leading newlinesvarkor-2/+1
2019-04-22Remove double trailing newlinesvarkor-6/+0
2019-04-22update tests for migrate mode by defaultMatthew Jasper-18/+38
2019-04-20Update error message in testvarkor-2/+1
2019-04-20Check async in trait methodsvarkor-5/+26
2019-04-20Add test for async fn methods feature gatingvarkor-4/+19
2019-04-18hide `--explain` hint if error has no extended infoAndy Russell-12/+10
2019-04-11Reword tracking issue noteEsteban Küber-241/+241
2019-04-10Tweak unstable diagnostic outputEsteban Küber-270/+511
2019-03-11Update testsVadim Petrochenkov-231/+231
2019-03-05Update test falloutvarkor-16/+2
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-02Point at enum definition when match patterns are not exhaustiveEsteban Küber-0/+4
``` error[E0004]: non-exhaustive patterns: type `X` is non-empty --> file.rs:9:11 | 1 | / enum X { 2 | | A, | | - variant not covered 3 | | B, | | - variant not covered 4 | | C, | | - variant not covered 5 | | } | |_- `X` defined here ... 9 | match x { | ^ | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms error[E0004]: non-exhaustive patterns: `B` and `C` not covered --> file.rs:11:11 | 1 | / enum X { 2 | | A, 3 | | B, 4 | | C, | | - not covered 5 | | } | |_- `X` defined here ... 11 | match x { | ^ patterns `C` not covered ``` When a match expression doesn't have patterns covering every variant, point at the enum's definition span. On a best effort basis, point at the variant(s) that are missing. This does not handle the case when the missing pattern is due to a field's enum variants: ``` enum E1 { A, B, C, } enum E2 { A(E1), B, } fn foo() { match E2::A(E1::A) { E2::A(E1::B) => {} E2::B => {} } //~^ ERROR `E2::A(E1::A)` and `E2::A(E1::C)` not handled } ``` Unify look between match with no arms and match with some missing patterns. Fix #37518.
2019-02-27Rollup merge of #58761 - Mark-Simulacrum:add-feature-gate-unwind, r=CentrilMazdak Farrokhzad-1/+1
Add tracking issue for the unwind attribute cc https://github.com/rust-lang/rust/issues/58760
2019-02-27Rollup merge of #58678 - doctorn:refuse-async-fn-2015-edition, r=varkorMazdak Farrokhzad-6/+13
Deny `async fn` in 2015 edition This commit prevents code using `async fn` from being compiled in Rust 2015 edition. Compiling code of the form: ```rust async fn foo() {} ``` Will now result in the error: ``` error[E0670]: `async fn` is not permitted in the 2015 edition --> async.rs:1:1 | 1 | async fn foo() {} | ^^^^^ error: aborting due to error For more information about an error, try `rustc --explain E0670`. ``` This resolves #58652 and also resolves #53714. r? @varkor
2019-02-26Add tracking issue for the unwind attribute.Mark Rousskov-1/+1
2019-02-25Stabilize `unrestricted_attribute_tokens`Vadim Petrochenkov-27/+0
2019-02-24Deny `async fn` in 2015 editionNathan Corbyn-6/+13
Fix style issues and update diagnostic messages Update src/librustc_passes/diagnostics.rs Co-Authored-By: doctorn <me@nathancorbyn.com> Deny nested `async fn` in Rust 2015 edition Deny nested `async fn` in Rust 2015 edition Deny nested `async fn` in Rust 2015 edition
2019-02-23Implement ffi_returns_twice attributegnzlbg-0/+18
2019-02-16Don't abort early when collecting const genericsvarkor-1/+8
2019-02-11Require a list of features to allow in `allow_internal_unstable`Oliver Scherer-9/+9
2019-02-07Add const generics feature gate testvarkor-0/+31
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-07Auto merge of #57998 - niklasf:align-enum, r=nagisabors-0/+21
Allow #[repr(align(x))] on enums (#57996) Tracking issue: #57996 Implements an extension of [RFC 1358](https://github.com/rust-lang/rfcs/blob/master/text/1358-repr-align.md) behind a feature flag (`repr_align_enum`). Originally introduced here for structs: #39999. It seems like only HIR-level changes are required, since enums are already aware of their alignment (due to alignment of their limbs). cc @bitshifter
2019-02-01Auto merge of #57586 - Aaron1011:feature/pub-priv-dep, r=petrochenkovbors-0/+21
Implement public/private dependency feature Implements https://github.com/rust-lang/rust/issues/44663 The core implementation is done - however, there are a few issues that still need to be resolved: - [x] The `EXTERNAL_PRIVATE_DEPENDENCY` lint currently does notthing when the `public_private_dependencies` is not enabled. Should mentioning the lint (in an `allow` or `deny` attribute) be an error if the feature is not enabled? (Resolved- the feature was removed) - [x] Crates with the name `core` and `std` are always marked public, without the need to explcitily specify them on the command line. Is this what we want to do? Do we want to allow`no_std`/`no_core` crates to explicitly control this in some way? (Resolved - private crates are now explicitly specified) - [x] Should I add additional UI tests? (Resolved - added more tests) - [x] Does it make sense to be able to allow/deny the `EXTERNAL_PRIVATE_DEPENDENCY` on an individual item? (Resolved - this is implemented)
2019-02-01Rename external_private_dependency to exported_private_dependenciesAaron Hill-1/+1
2019-02-01Clippy fixes, rename stuff to match RFCAaron Hill-0/+21
2019-01-30Allow #[repr(align(x))] on enums (#57996)Niklas Fiekas-0/+21
2019-01-29Fix testsJohn Kåre Alsaker-10/+3
2019-01-26Rollup merge of #57407 - mehcode:stabilize-extern-crate-self, r=CentrilMazdak Farrokhzad-14/+0
Stabilize extern_crate_self Fixes #56409
2019-01-17Correct error location indicated by commentsKevin Leimkuhler-4/+4
2019-01-17Override `Iterator::is_sorted_by` in `slice::Iter` implLukas Kalbertodt-14/+4
Additionally, the root implementation was changed a bit: it now uses `all` instead of coding that logic manually. To avoid duplicate code, the inherent `[T]::is_sorted_by` method now calls `self.iter().is_sorted_by(...)`. This should always be inlined and not result in overhead.
2019-01-17Add is_sorted unstable documentationKevin Leimkuhler-3/+26
2019-01-17Add is_sorted impl for [T]Kevin Leimkuhler-1/+1
2019-01-17Add initial impl of is_sorted to IteratorKevin Leimkuhler-0/+35
2019-01-17Auto merge of #57520 - alexreg:tidy-copyright-lint, r=Mark-Simulacrumbors-14/+4
Add lint for copyright headers to 'tidy' tool r? @Mark-Simulacrum CC @centril
2019-01-16Auto merge of #57321 - petrochenkov:atokens, r=nikomatsakisbors-3/+3
Implement basic input validation for built-in attributes Correct top-level shape (`#[attr]` vs `#[attr(...)]` vs `#[attr = ...]`) is enforced for built-in attributes, built-in attributes must also fit into the "meta-item" syntax (aka the "classic attribute syntax"). For some subset of attributes (found by crater run), errors are lowered to deprecation warnings. NOTE: This PR previously included https://github.com/rust-lang/rust/pull/57367 as well.
2019-01-14stabilize extern_crate_selfRyan Leckey-14/+0
2019-01-14Rollup merge of #57572 - Centril:unaccept-extern-in-path, r=petrochenkovMazdak Farrokhzad-16/+0
Unaccept `extern_in_paths` Based on completed fcp-close in https://github.com/rust-lang/rust/issues/55600, this removes `extern_in_path` (e.g. `extern::foo::bar`) from the language. The changes are primarily reversing https://github.com/rust-lang/rust/commit/32db83b16e06cb5cca72d0e6a648a8008eda0fac. Closes https://github.com/rust-lang/rust/issues/55600 r? @petrochenkov
2019-01-14Stabilize `cfg_target_vendor`, #29718Jethro Beekman-46/+0
2019-01-13Removed more copyright notices.Alexander Regueiro-14/+4
2019-01-13remove extern_in_paths.Mazdak Farrokhzad-16/+0
2019-01-13Implement basic input validation for built-in attributesVadim Petrochenkov-3/+3
2019-01-13Update the const fn tracking issue to the new metabugvarkor-4/+4
2019-01-12Auto merge of #56759 - petrochenkov:prestabuni, r=nikomatsakisbors-69/+0
Stabilize `uniform_paths` Address all the things described in https://github.com/rust-lang/rust/issues/56417. Assign visibilities to `macro_rules` items - `pub` to `macro_export`-ed macros and `pub(crate)` to non-exported macros, these visibilities determine how far these macros can be reexported with `use`. Prohibit use of reexported inert attributes and "tool modules", after renaming (e.g. `use inline as imported_inline`) their respective tools and even compiler passes won't be able to recognize and properly check them. Also turn use of uniform paths in 2015 macros into an error, I'd prefer to neither remove nor stabilize them right away because I still want to make some experiments in this area (uniform path fallback was added to 2015 macros used on 2018 edition in https://github.com/rust-lang/rust/pull/56053#issuecomment-441405140). UPDATE: The last commit also stabilizes the feature `uniform_paths`. Closes https://github.com/rust-lang/rust/issues/53130 Closes https://github.com/rust-lang/rust/issues/55618 Closes https://github.com/rust-lang/rust/issues/56326 Closes https://github.com/rust-lang/rust/issues/56398 Closes https://github.com/rust-lang/rust/issues/56417 Closes https://github.com/rust-lang/rust/issues/56821 Closes https://github.com/rust-lang/rust/issues/57252 Closes https://github.com/rust-lang/rust/issues/57422
2019-01-12Stabilize `uniform_paths`Vadim Petrochenkov-69/+0
2019-01-12Auto merge of #57542 - Centril:rollup, r=Centrilbors-132/+1
Rollup of 26 pull requests Successful merges: - #56425 (Redo the docs for Vec::set_len) - #56906 (Issue #56905) - #57042 (Don't call `FieldPlacement::count` when count is too large) - #57175 (Stabilize `let` bindings and destructuring in constants and const fn) - #57192 (Change std::error::Error trait documentation to talk about `source` instead of `cause`) - #57296 (Fixed the link to the ? operator) - #57368 (Use CMAKE_{C,CXX}_COMPILER_LAUNCHER for ccache) - #57400 (Rustdoc: update Source Serif Pro and replace Heuristica italic) - #57417 (rustdoc: use text-based doctest parsing if a macro is wrapping main) - #57433 (Add link destination for `read-ownership`) - #57434 (Remove `CrateNum::Invalid`.) - #57441 (Supporting backtrace for x86_64-fortanix-unknown-sgx.) - #57450 (actually take a slice in this example) - #57459 (Reference tracking issue for inherent associated types in diagnostic) - #57463 (docs: Fix some 'second-edition' links) - #57466 (Remove outdated comment) - #57493 (use structured suggestion when casting a reference) - #57498 (make note of one more normalization that Paths do) - #57499 (note that FromStr does not work for borrowed types) - #57505 (Remove submodule step from README) - #57510 (Add a profiles section to the manifest) - #57511 (Fix undefined behavior) - #57519 (Correct RELEASES.md for 1.32.0) - #57522 (don't unwrap unexpected tokens in `format!`) - #57530 (Fixing a typographical error.) - #57535 (Stabilise irrefutable if-let and while-let patterns) Failed merges: r? @ghost
2019-01-12Rollup merge of #57535 - varkor:stabilise-if-while-let-patterns, r=CentrilMazdak Farrokhzad-17/+0
Stabilise irrefutable if-let and while-let patterns This stabilises RFC 2086 (https://github.com/rust-lang/rust/issues/44495). This replaces https://github.com/rust-lang/rust/pull/55639, as we want to stabilise this in time for the beta cut-off. Closes https://github.com/rust-lang/rust/pull/55639. r? @Centril