about summary refs log tree commit diff
path: root/src/test/ui/feature-gate
AgeCommit message (Collapse)AuthorLines
2021-01-12Put all feature gate tests under `feature-gates/`Camelid-12/+0
There was one directory that had only a single test and there was also a test in the top-level directory. This moves both of them to `feature-gates/`.
2021-01-01Allow references to interior mutable data behind a feature gateoli-0/+12
2021-01-01Move feature gate-related testsYuki Okushi-3329/+0
2020-11-20rustc_expand: Mark inner `#![test]` attributes as soft-unstableVadim Petrochenkov-1/+2
2020-10-04Enforce crate level attributes checksGuillaume Gomez-345/+305
2020-10-03Strenghten tests for crate-level attributes checkGuillaume Gomez-18/+107
2020-10-03Run attributes check at crate levelGuillaume Gomez-292/+293
2020-09-12Auto merge of #73461 - calebzulawski:validate-attribute-placement, ↵bors-379/+766
r=matthewjasper Validate built-in attribute placement Closes #54584, closes #47725, closes #54044. I've changed silently ignoring some incorrectly placed attributes to errors. I'm not sure what the policy is since this can theoretically break code (should they be warnings instead? does it warrant a crater run?).
2020-09-08Update testsGuillaume Gomez-5/+6
2020-09-05Emit warnings on misplaced #[no_mangle]Caleb Zulawski-138/+202
2020-09-05Emit warnings for misplaced attributes used by some cratesCaleb Zulawski-433/+501
2020-09-05Check placement of more attributesCaleb Zulawski-305/+560
2020-04-11rustc: Add a warning count upon completionRoccoDev-0/+4
2020-02-09--bless --compare-mode=nllMatthias Prechtl-3/+3
2020-02-06Forbid using `0` as issue numberYuki Okushi-4/+12
2020-01-31Auto merge of #68080 - varkor:declared-here, r=petrochenkovbors-2/+2
Address inconsistency in using "is" with "declared here" "is" was generally used for NLL diagnostics, but not other diagnostics. Using "is" makes the diagnostics sound more natural and readable, so it seems sensible to commit to them throughout. r? @Centril
2020-01-30clarify "incorrect issue" errorAndy Russell-5/+7
2020-01-24Normalise notes with the/isvarkor-2/+2
2020-01-16Rollup merge of #68096 - varkor:diagnostic-cleanup, r=CentrilDylan DPC-14/+14
Clean up some diagnostics by making them more consistent In general: - Diagnostic should start with a lowercase letter. - Diagnostics should not end with a full stop. - Ellipses contain three dots. - Backticks should encode Rust code. I also reworded a couple of messages to make them read more clearly. It might be sensible to create a style guide for diagnostics, so these informal conventions are written down somewhere, after which we could audit the existing diagnostics. r? @Centril
2020-01-13Fix crate paths in commentsYuki Okushi-1/+1
2020-01-12Fix formatting ellipses at the end of some diagnosticsvarkor-2/+2
2020-01-12Add backticks in appropriate placesvarkor-12/+12
2020-01-09Update testsVadim Petrochenkov-12/+54
2019-12-21Require issue = "none" over issue = "0" in unstable attributesRoss MacArthur-5/+5
2019-12-13Require stable/unstable annotations for the constness of all stable ↵Oliver Scherer-17/+5
functions with a `const` modifier
2019-12-13Reuse the `staged_api` feature for `rustc_const_unstable`Oliver Scherer-4/+0
2019-11-11support issue = "none" in unstable attributesRoss MacArthur-0/+21
- Use `Option<NonZeroU32>` to represent issue numbers.
2019-11-08Rollup merge of #65785 - Centril:compat-to-error-2, r=oli-obkMazdak Farrokhzad-4/+4
Transition future compat lints to {ERROR, DENY} - Take 2 Follow up to https://github.com/rust-lang/rust/pull/63247 implementing https://github.com/rust-lang/rust/pull/63247#issuecomment-536295992. - `legacy_ctor_visibility` (ERROR) -- closes #39207 - `legacy_directory_ownership` (ERROR) -- closes #37872 - `safe_extern_static` (ERROR) -- closes #36247 - `parenthesized_params_in_types_and_modules` (ERROR) -- closes #42238 - `duplicate_macro_exports` (ERROR) - `nested_impl_trait` (ERROR) -- closes #59014 - `ill_formed_attribute_input` (DENY) -- transitions #57571 - `patterns_in_fns_without_body` (DENY) -- transitions #35203 r? @varkor cc @petrochenkov
2019-11-06ill_formed_attribute_input -> denyMazdak Farrokhzad-4/+4
2019-11-04Use check-pass in ui tests where appropriateTomasz Miąsko-1/+1
2019-11-02Update error annotations in tests that successfully compileTomasz Miąsko-202/+208
Those annotation are silently ignored rather than begin validated against compiler output. Update them before validation is enabled, to avoid test failures.
2019-10-29stabilize cfg(doctest)Guillaume Gomez-16/+0
2019-10-24Increase spacing for suggestions in diagnosticsEsteban Küber-0/+1
Make the spacing between the code snippet and verbose structured suggestions consistent with note and help messages.
2019-10-17Plugins deprecation: don’t suggest simply removing the attributeSimon Sapin-12/+12
Building Servo with a recent Nightly produces: ```rust warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597 --> components/script/lib.rs:14:1 | 14 | #![plugin(script_plugins)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute | = note: `#[warn(deprecated)]` on by default ``` First, linking to https://github.com/rust-lang/rust/issues/29597 is not ideal since there is pretty much no discussion there of the deprecation and what can be used instead. This PR changes the link to the deprecation PR which does have more discussion. Second, the “remove this attribute” suggestion is rather unhelpful. Just because a feature is deprecated doesn’t mean that simply removing its use without a replacement is acceptable. In the case of custom lint, there is no replacement available. Prefixing a message with “help:” when telling users that they’re screwed honestly feels disrespectful. This PR also changes the message to be more factual.
2019-10-03plugin_registrary: use normal deprecation instead of hard coded warning.Mazdak Farrokhzad-205/+244
2019-09-28Rollup merge of #64763 - GuillaumeGomez:long-err-explanation-E0734, r=estebankMazdak Farrokhzad-21/+24
Add E0734 and its long explanation Part of https://github.com/rust-lang/rust/issues/61137
2019-09-27Update ui testsGuillaume Gomez-21/+24
2019-09-14Warn on no_start, crate_id attribute useMark Rousskov-2/+16
These attributes are now deprecated; they don't have any use anymore.
2019-09-08Improve wording.Charles Lew-2/+2
2019-09-05Remove rustc_diagnostic_macros featureMark Rousskov-17/+7
2019-08-29Rollup merge of #63867 - petrochenkov:dhelpers, r=matthewjasperMazdak Farrokhzad-16/+7
resolve: Block expansion of a derive container until all its derives are resolved So, it turns out there's one more reason to block expansion of a `#[derive]` container until all the derives inside it are resolved, beside `Copy` (https://github.com/rust-lang/rust/pull/63248). The set of derive helper attributes registered by derives in the container also has to be known before the derives themselves are expanded, otherwise it may be too late (see https://github.com/rust-lang/rust/pull/63468#issuecomment-524550872 and the `#[stable_hasher]`-related test failures in https://github.com/rust-lang/rust/pull/63468). So, we stop our attempts to unblock the container earlier, as soon as the `Copy` status is known, and just block until all its derives are resolved. After all the derives are resolved we immediately go and process their helper attributes in the item, without delaying it until expansion of the individual derives. Unblocks https://github.com/rust-lang/rust/pull/63468 r? @matthewjasper (as a reviewer of https://github.com/rust-lang/rust/pull/63248) cc @c410-f3r
2019-08-27resolve: Block expansion of a derive container until all its derives are ↵Vadim Petrochenkov-16/+7
resolved Also mark derive helpers as known as a part of the derive container's expansion instead of expansion of the derives themselves which may happen too late.
2019-08-24move `feature-gate-or_patterns.*` -> `ui/or-patterns/`Mazdak Farrokhzad-21/+0
2019-08-17initial implementation of or-pattern parsingDan Robertson-0/+21
Initial implementation of parsing or-patterns e.g., `Some(Foo | Bar)`. This is a partial implementation of RFC 2535.
2019-07-31Remove derives `Encodable`/`Decodable` and unstabilize attribute `#[bench]`Vadim Petrochenkov-197/+198
2019-07-30Adjust tests. wrt. await_macro being removed.Mazdak Farrokhzad-24/+0
2019-07-26Introduce built-in macros through libcoreVadim Petrochenkov-41/+14
2019-07-25Rollup merge of #62735 - petrochenkov:galloc, r=alexcrichtonMazdak Farrokhzad-0/+20
Turn `#[global_allocator]` into a regular attribute macro It was a 99% macro with exception of some diagnostic details. As a result of the change, `#[global_allocator]` now works in nested modules and even in nameless blocks. Fixes https://github.com/rust-lang/rust/issues/44113 Fixes https://github.com/rust-lang/rust/issues/58072
2019-07-24Auto merge of #62908 - ↵bors-2/+2
fakenine:normalize_use_of_backticks_compiler_messages_p17, r=alexreg normalize use of backticks for compiler messages in remaining modules https://github.com/rust-lang/rust/issues/60532
2019-07-24Demote template check error to a lint for `#[test]` and `#[bench]`Vadim Petrochenkov-6/+14