about summary refs log tree commit diff
path: root/tests/ui/deprecation
AgeCommit message (Collapse)AuthorLines
2025-08-22Updated uitests for new parserJonathan Brouwer-12/+4
2025-08-21split up context.rsJana Dönszelmann-1/+1
2025-08-21refactor target checking, move out of context.rs and rename MaybeWarn to PolicyJana Dönszelmann-1/+1
2025-08-16Fix deprecation attribute on foreign statics & typesJonathan Brouwer-1/+6
2025-08-14Update uitestsJonathan Brouwer-14/+19
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-08-11Allow attr entries to declare list of alternatives for `List` and ↵Esteban Küber-12/+36
`NamedValueStr` Modify `AttributeTemplate` to support list of alternatives for list and name value attribute styles. Suggestions now provide more correct suggested code: ``` error[E0805]: malformed `used` attribute input --> $DIR/used_with_multi_args.rs:3:1 | LL | #[used(compiler, linker)] | ^^^^^^------------------^ | | | expected a single argument here | help: try changing it to one of the following valid forms of the attribute | LL - #[used(compiler, linker)] LL + #[used(compiler)] | LL - #[used(compiler, linker)] LL + #[used(linker)] | LL - #[used(compiler, linker)] LL + #[used] | ``` instead of the prior "masking" of the lack of this feature by suggesting pipe-separated lists: ``` error[E0805]: malformed `used` attribute input --> $DIR/used_with_multi_args.rs:3:1 | LL | #[used(compiler, linker)] | ^^^^^^------------------^ | | | expected a single argument here | help: try changing it to one of the following valid forms of the attribute | LL - #[used(compiler, linker)] LL + #[used(compiler|linker)] | LL - #[used(compiler, linker)] LL + #[used] | ```
2025-06-25Rollup merge of #142200 - Kivooeo:tf8, r=jieyouxuJana Dönszelmann-0/+5
`tests/ui`: A New Order [8/N] Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895.
2025-06-24Don't include current rustc version string in feature removed helpJieyou Xu-4/+2
The version string is difficult to properly normalize out, and removing it isn't a huge deal (the user can query version info easily through `rustc --version` or `cargo --version`). The normalization options were all non-ideal: - Per-test version string normalization is nasty to maintain, and we need to maintain `n` copies of it. - Centralized compiletest normalization (with a directive opt-out) is also not ideal, because `cfg(version(..))` tests can't have those accidentally normalized out (and you'd have to remember to opt-out).
2025-06-23Account for beta revisions when normalizing versionsJosh Stone-1/+1
Several UI tests have a `normalize-stderr` for "you are using x.y.z" rustc versions, and that regex is flexible enough for suffixes like "-nightly" and "-dev", but not for "-beta.N". We can just add '.' to that trailing pattern to include this.
2025-06-23cleaned up some testsKivooeo-0/+5
2025-06-21All HIR attributes are outerDavid Tolnay-0/+11
2025-06-21Add regression test for issue 142649David Tolnay-0/+8
2025-06-17make error codes reflect reality betterJana Dönszelmann-51/+45
2025-06-17use consistent attr errors in all attribute parsersJana Dönszelmann-11/+96
2025-06-09Make `since` of removed features the version removed and fill `pull`xizheyin-1/+1
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-06-09Note the version and PR of removed features when using itxizheyin-1/+5
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-06-02Add missing `dyn` keywords to tests that do not test for themLukas Wirth-2/+2
This ensures that these tests can be run on editions other than 2015
2025-04-10replace `//@ compile-flags: --edition` with `//@ edition`Pietro Albini-1/+1
2025-04-03compiletest: Require `//~` annotations even if `error-pattern` is specifiedVadim Petrochenkov-7/+6
2025-03-25compiletest: Support matching on diagnostics without a spanVadim Petrochenkov-0/+10
2025-02-24Fix test output expectationsJana Dönszelmann-22/+30
2025-02-10Show diff suggestion format on verbose replacementEsteban Küber-18/+27
``` error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/attempted-access-non-fatal.rs:7:15 | LL | let _ = 2.l; | ^ | help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix | LL - let _ = 2.l; LL + let _ = 2.0f64; | ```
2025-01-18Emit a single privacy error for multiple fields on the same struct expressionEsteban Küber-1/+1
Collect all unreachable fields in a single struct literal struct and emit a single error, instead of one error per private field. ``` error[E0451]: fields `beta` and `gamma` of struct `Alpha` are private --> $DIR/visibility.rs:18:13 | LL | let _x = Alpha { | ----- in this type LL | beta: 0, | ^^^^^^^ private field LL | .. | ^^ field `gamma` is private ```
2025-01-18Add context on private fields that are not on the same line as the struct nameEsteban Küber-0/+3
``` error[E0451]: field `x` of struct `S` is private --> $DIR/visibility.rs:24:9 | LL | let a = baz::S { | ------ in this type LL | .. | ^^ field `x` is private ```
2025-01-06add deprecated and do nothing flag to options tableklensy-4/+28
inline_threshold mark deprecated no-stack-check print deprecation message for -Car too inline_threshold deprecated and do nothing: make in untracked make OptionDesc struct from tuple
2024-06-14Deprecate no-op codegen option `-Cinline-threshold=...`Martin Nordholts-0/+6
This deprecates `-Cinline-threshold` since using it has no effect. This has been the case since the new LLVM pass manager started being used, more than 2 years ago.
2024-05-10Fix parse error message for meta itemsLeón Orell Valerian Liehr-1/+1
2024-02-16[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives许杰友 Jieyou Xu (Joe)-20/+20
2024-01-12Suggest quoting unquoted idents in attrssjwang05-2/+7
2023-11-24Show number in error message even for one errorNilstrieb-6/+6
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-10-23Fix stable feature names in testsDavid Tolnay-3/+3
2023-10-04Remove E0551.Nicholas Nethercote-5/+5
Because it's the same as E0539. Fixes #51489.
2023-08-21Add `suggestion` for some `#[deprecated]` itemsDmitry Murzin-1/+16
2023-02-22diagnostics: update test cases to refer to assoc fn with `self` as methodMichael Howell-128/+128
2023-01-11Move /src/test to /testsAlbert Larsan-0/+2013