about summary refs log tree commit diff
path: root/src/test/ui/cfg
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-880/+0
2022-10-23Workaround unstable stmt_expr_attributes for method receiver expressions.Camille GILLOT-14/+17
2022-10-01bless ui testsMaybe Waffle-1/+1
2022-09-23Restore ignore tagFlorian Bartels-3/+0
This test case actually requires std::process.
2022-08-27Rollup merge of #99784 - est31:deny_cfg_attr_crate_type_name, r=Mark-SimulacrumYuki Okushi-11/+5
Make forward compatibility lint deprecated_cfg_attr_crate_type_name deny by default Turns the forward compatibility lint added by #83744 to deprecate `cfg_attr` usage with `#![crate_type]` and `#![crate_name]` attributes into deny by default. Copying the example from #83744: ```Rust #![crate_type = "lib"] // remains working #![cfg_attr(foo, crate_type = "bin")] // will stop working ``` Over 8 months have passed since #83744 was merged so I'd say this gives ample time for people to have been warned, so we can make the warning stronger. No usage was found via grep.app except for one, which was in an unmaintained code base that didn't seem to be used in the open source eco system. The crater run conducted in #83744 also didn't show up anything. cc #91632 - tracking issue for the lint
2022-08-10Do not consider method call receiver as an argument in AST.Camille GILLOT-0/+46
2022-07-27Make forward compatibility lint deprecated_cfg_attr_crate_type_name deny by ↵est31-11/+5
default
2022-05-24RFC3239: Add tests for compact `cfg(target(..))`Loïc BRANSTETT-0/+49
2022-03-18Rollup merge of #94295 - Urgau:cfg-always-eval-all-predicate, r=petrochenkovMatthias Krüger-0/+45
Always evaluate all cfg predicate in all() and any() This pull-request adjust the handling of the `all()` and `any()` to always evaluate every cfg predicate because not doing so result in accepting incorrect `cfg`: ```rust #[cfg(any(unix, foo::bar))] // Should error on foo::bar, but does not on unix platform (but does on non unix platform) fn foo1() {} #[cfg(all(foo, foo::bar))] // Should error on foo::bar, but does not fn foo2() {} #[cfg(all(foo::bar, foo))] // Correctly error on foo::bar fn foo3() {} #[cfg(any(foo::bar, foo))] // Correctly error on foo::bar fn foo4() {} ``` This pull-request take the side to directly turn it into a hard error instead of having a future incompatibility lint because the combination to get this incorrect behavior is unusual and highly probable that some code have this without noticing. A [search](https://cs.github.com/?scopeName=All+repos&scope=&q=lang%3Arust+%2Fany%5C%28%5Ba-zA-Z%5D%2C+%5Ba-zA-Z%5D%2B%3A%3A%5Ba-zA-Z%5D%2B%2F) on Github reveal no such instance nevertheless a Crater run should probably be done before merging this. This was discover in https://github.com/rust-lang/rust/pull/94175 when trying to lint on the second predicate. Also note that this seems to have being introduce with Rust 1.27.0: https://rust.godbolt.org/z/KnfqKv15f. r? `@petrochenkov`
2022-02-23Always evaluate all cfg predicate in all() and any()Loïc BRANSTETT-0/+45
2022-02-10replace feature expression (cfg_panic) in lib and remove expression from testsCharisee-2/+2
Rebase commit
2022-01-23Remove deduplication of early lintsAaron Hill-2/+24
We already have a general mechanism for deduplicating reported lints, so there's no need to have an additional one for early lints specifically. This allows us to remove some `PartialEq` impls.
2021-12-07Future compatibility warning on cfg_attr on crate_type and crate_namebjorn3-12/+38
2021-11-19Rollup merge of #90947 - c410-f3r:testsssssss, r=petrochenkovYuki Okushi-0/+6
Move some tests to more reasonable directories - 9.5 cc #73494 r? `@petrochenkov`
2021-11-18Auto merge of #90382 - alexcrichton:wasm64-libstd, r=joshtriplettbors-7/+4
std: Get the standard library compiling for wasm64 This commit goes through and updates various `#[cfg]` as appropriate to get the wasm64-unknown-unknown target behaving similarly to the wasm32-unknown-unknown target. Most of this is just updating various conditions for `target_arch = "wasm32"` to also account for `target_arch = "wasm64"` where appropriate. This commit also lists `wasm64` as an allow-listed architecture to not have the `restricted_std` feature enabled, enabling experimentation with `-Z build-std` externally. The main goal of this commit is to enable playing around with `wasm64-unknown-unknown` externally via `-Z build-std` in a way that's similar to the `wasm32-unknown-unknown` target. These targets are effectively the same and only differ in their pointer size, but wasm64 is much newer and has much less ecosystem/library support so it'll still take time to get wasm64 fully-fledged.
2021-11-18Move some tests to more reasonable directoriesCaio-0/+6
2021-11-17Fix emscripten testsAlex Crichton-7/+4
2021-11-14Move some tests to more reasonable directoriesCaio-0/+31
2021-07-07Implement cfg(target_abi) (RFC 2992)Josh Triplett-0/+10
Add an `abi` field to `TargetOptions`, defaulting to "". Support using `cfg(target_abi = "...")` for conditional compilation on that field. Gated by `feature(cfg_target_abi)`. Add a test for `target_abi`, and a test for the feature gate. Add `target_abi` to tidy as a platform-specific cfg. This does not add an abi to any existing target.
2021-05-07Rollup merge of #84734 - tmandry:compiletest-needs-unwind, r=Mark-SimulacrumDylan DPC-0/+1
Add `needs-unwind` and beginning of support for testing `panic=abort` std to compiletest For the Fuchsia platform we build libstd with `panic=abort` and would like a way to run tests with that enabled. This adds low-level support for this directly to compiletest. In the future I'd like to add high-level support in rustbuild, e.g. having target-specific flags that allow configuring a panic strategy. (Side note: It would be nice if we could also build multiple configurations for the same target, but I'm getting ahead of myself.) This plus #84500 have everything that's needed to get ui tests passing on fuchsia targets. Part of #84766. Note that this change only includes the header on tests which need an unwinder to _build_, not those which need it to _run_. r? ````@Mark-Simulacrum````
2021-05-06Add needs-unwind to testsTyler Mandry-0/+1
2021-05-03Set target_family="wasm" for wasm targetsSimonas Kazlauskas-4/+7
2021-01-29Add testsest31-0/+94
2021-01-13Update tests for extern block lintingMark Rousskov-26/+32
2020-11-22Drop support for cloudabi targetsLzu Tao-2/+0
2020-11-09Add `#[cfg(panic = "...")]`David Hewitt-0/+34
2020-06-04test: ui: skip tests which aren't appropriate for RISC-VTom Eccles-0/+3
2019-09-30syntax: Support modern attribute syntax in the `meta` matcherVadim Petrochenkov-2/+2
2019-07-27tests: Move run-pass tests without naming conflicts to uiVadim Petrochenkov-0/+515