about summary refs log tree commit diff
path: root/tests/ui/resolve
AgeCommit message (Collapse)AuthorLines
2025-08-19Rollup merge of #144983 - Oneirical:uncountable-integer, r=jieyouxu许杰友 Jieyou Xu (Joe)-0/+33
Rehome 37 `tests/ui/issues/` tests to other subdirectories under `tests/ui/` Part of rust-lang/rust#133895 Methodology: 1. Refer to the previously written `tests/ui/SUMMARY.md` 2. Find an appropriate category for the test, using the original issue thread and the test contents. 3. Add the issue URL at the bottom (not at the top, as that would mess up stderr line numbers) 4. Rename the tests to make their purpose clearer Inspired by the methodology that ``@Kivooeo`` was using. r? ``@jieyouxu``
2025-08-17Rehome tests/ui/issues/ tests [5/?]Oneirical-0/+33
2025-08-16take attr style into account in attr diagnosticsJana Dönszelmann-1/+1
2025-08-15Rollup merge of #145322 - LorrensP-2158466:early-prelude-processing, ↵Stuart Cook-0/+11
r=petrochenkov Resolve the prelude import in `build_reduced_graph` This pr tries to resolve the prelude import at the `build_reduced_graph` stage. Part of batched import resolution in rust-lang/rust#145108 (cherry picked commit) and maybe needed for rust-lang/rust#139493. r? petrochenkov
2025-08-14resolve: Add one more test case for "binding is available in a different ↵Vadim Petrochenkov-2/+21
scope" help
2025-08-14resolve prelude import at `build_reduced_graph` phaseLorrensP-2158466-0/+11
2025-08-13resolve: Split extern prelude into two scopesVadim Petrochenkov-5/+15
One for `--extern` options and another for `extern crate` items.
2025-08-11Add more docs to templates for attrs with incorrect argumentsEsteban Küber-0/+2
2025-08-08Rollup merge of #144400 - Kivooeo:issue3, r=jieyouxuStuart Cook-0/+115
`tests/ui/issues/`: The Issues Strike Back [3/N] Some `tests/ui/issues/` housekeeping, to trim down number of tests directly under `tests/ui/issues/`. Part of https://github.com/rust-lang/rust/issues/133895. r? ```@jieyouxu```
2025-08-06Print thread ID in panic message if thread name is unknownTrevor Gross-2/+2
`panic!` does not print any identifying information for threads that are unnamed. However, in many cases, the thread ID can be determined. This changes the panic message from something like this: thread '<unnamed>' panicked at src/main.rs:3:5: explicit panic To something like this: thread '<unnamed>' (0xff9bf) panicked at src/main.rs:3:5: explicit panic Stack overflow messages are updated as well. This change applies to both named and unnamed threads. The ID printed is the OS integer thread ID rather than the Rust thread ID, which should also be what debuggers print.
2025-08-06Rollup merge of #144552 - Oneirical:uncountable-integer-3, r=jieyouxuJakub Beránek-0/+29
Rehome 33 `tests/ui/issues/` tests to other subdirectories under `tests/ui/` rust-lang/rust#143902 divided into smaller, easier to review chunks. Part of rust-lang/rust#133895 Methodology: 1. Refer to the previously written `tests/ui/SUMMARY.md` 2. Find an appropriate category for the test, using the original issue thread and the test contents. 3. Add the issue URL at the bottom (not at the top, as that would mess up stderr line numbers) 4. Rename the tests to make their purpose clearer Inspired by the methodology that ``@Kivooeo`` was using. r? ``@jieyouxu``
2025-08-05commentsKivooeo-0/+115
2025-08-04Rehome tests/ui/issues/ tests [3/?]Oneirical-0/+29
2025-07-31commentsKivooeo-0/+15
2025-07-19add non-regression test for issue 144168Rémy Rakic-0/+97
2025-07-08Rollup merge of #143177 - xizheyin:143134, r=lcnrTrevor Gross-0/+19
Remove false label when `self` resolve failure does not relate to macro Fixes rust-lang/rust#143134 In the first commit, I did some code-clean, moving `suggest*` to `suggestions/` dir. In the second, commit, I added ui test. In the third, I change the code, and present the test result. r? compiler
2025-07-06Port `#[path]` to the new attribute parsing infrastructureJonathan Brouwer-1/+12
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-07-04Rollup merge of #143202 - Kivooeo:tf18, r=tgross35Jubilee-0/+29
`tests/ui`: A New Order [18/N] > [!NOTE] > > Intermediate commits are intended to help review, but will be squashed prior to merge. Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895. r? `@tgross35`
2025-07-03Return early when `self` resolve failure because of `let self = ...`xizheyin-5/+2
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-07-03Add ui test resolve/false-self-in-macro-issue-143134.rsxizheyin-0/+22
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-07-03move `tests/ui/resolve/suggest*` to `tests/ui/resolve/suggestions/`xizheyin-0/+0
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-07-01cleaned up some testsKivooeo-18/+22
2025-07-01moved test filesKivooeo-0/+25
2025-06-30fix: Emit suggestion filename if primary diagnostic span is dummyScott Schafer-0/+1
2025-06-30cleaned up some testsKivooeo-3/+10
2025-06-28Move some UI tests to more apropriate directoriesTrevor Gross-0/+51
Prepare for rework done in the rest of [PR143118]. [PR143118]: https://www.github.com/rust-lang/rust/pull/143118 Co-authored-by: Kivooeo <Kivooeo123@gmail.com>
2025-06-12Rollup merge of #142219 - Kivooeo:tf11, r=wesleywiserMatthias Krüger-0/+21
`tests/ui`: A New Order [11/N] Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895. r? `@jieyouxu`
2025-06-12Rollup merge of #142217 - Kivooeo:tf10, r=jieyouxuMatthias Krüger-0/+14
`tests/ui`: A New Order [10/N] Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895. r? `@jieyouxu`
2025-06-11cleaned up some testsKivooeo-0/+21
2025-06-11cleaned up some testsKivooeo-0/+14
2025-06-05Add more missing 2015 edition directivesLukas Wirth-12/+14
2025-06-05Use non-2015 edition paths in tests that do not test for their resolutionLukas Wirth-47/+47
2025-06-02Fix false positive lint error from no_implicit_prelude attryukang-0/+11
2025-06-01Rollup merge of #140370 - WaffleLapkin:unqualified, r=jdonszelmannGuillaume Gomez-4/+11
Improve diagnostics for usage of qualified paths within tuple struct exprs/pats For patterns the old diagnostic was just incorrect, but I also added machine applicable suggestions. For context, this special cases errors for `<T as Trait>::Assoc(..)` patterns and expressions (latter is just a call). Tuple struct patterns and expressions both live in the value namespace, so they are not forwarded through associated *types*. r? ``@jdonszelmann`` cc ``@petrochenkov`` in https://github.com/rust-lang/rust/pull/80080#issuecomment-800630582 you were wondering why it doesn't work for types, that's why — tuple patterns are resolved in the value namespace.
2025-05-20Add println! test for sugg-field-in-format-string-issue-141136xizheyin-1/+10
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-05-18Suggest use `"{}", self.x` instead of `{self.x}` when resolve `x` as field ↵xizheyin-18/+4
of `self` Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-05-18Add test sugg-field-in-format-string-issue-141136xizheyin-0/+60
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-04-30compiletest: Make diagnostic kind mandatory on line annotationsVadim Petrochenkov-10/+14
2025-04-27bless testsWaffle Lapkin-4/+11
2025-04-25Cleaned up 5 tests in `tests/ui`reddevilmidzy-0/+15
2025-04-14Rollup merge of #139127 - compiler-errors:prim-ty-hack, r=oli-obkMatthias Krüger-0/+26
Fix up partial res of segment in primitive resolution hack There is a hack in the resolver: ``` // In `a(::assoc_item)*` `a` cannot be a module. If `a` does resolve to a module we // don't report an error right away, but try to fallback to a primitive type. ``` This fixes up the resolution for primitives which would otherwise resolve to a module, but we weren't also updating the res of the path segment, leading to weird diagnostics. We explicitly call `self.r.partial_res_map.insert` instead of `record_partial_res` b/c we have recorded a partial res already, and we specifically want to override it. cc https://github.com/rust-lang/rust/issues/139095#issuecomment-2764371934
2025-04-10Rollup merge of #139510 - nnethercote:name-to-ident, r=fee1-deadMatthias Krüger-1/+1
Rename some `name` variables as `ident`. It bugs me when variables of type `Ident` are called `name`. It leads to silly things like `name.name`. `Ident` variables should be called `ident`, and `name` should be used for variables of type `Symbol`. This commit improves things by by doing `s/name/ident/` on a bunch of `Ident` variables. Not all of them, but a decent chunk. r? `@fee1-dead`
2025-04-10Rename some `name` variables as `ident`.Nicholas Nethercote-1/+1
It bugs me when variables of type `Ident` are called `name`. It leads to silly things like `name.name`. `Ident` variables should be called `ident`, and `name` should be used for variables of type `Symbol`. This commit improves things by by doing `s/name/ident/` on a bunch of `Ident` variables. Not all of them, but a decent chunk.
2025-04-09Auto merge of #139555 - petrochenkov:errkind-ann, r=jieyouxubors-4/+4
UI tests: add missing diagnostic kinds where possible The subset of https://github.com/rust-lang/rust/pull/139427 that only adds diagnostic kinds to line annotations, without changing any other things in annotations or compiletest. After this only non-viral `NOTE`s and `HELP`s should be missing. r? `@jieyouxu`
2025-04-08UI tests: add missing diagnostic kinds where possibleVadim Petrochenkov-4/+4
2025-04-07compiletest: Stricter parsing for diagnostic kindsVadim Petrochenkov-3/+3
2025-04-03compiletest: Require `//~` annotations even if `error-pattern` is specifiedVadim Petrochenkov-12/+18
2025-04-01Rollup merge of #138790 - xizheyin:issue-138626, r=compiler-errorsMatthias Krüger-0/+11
Note potential but private items in show_candidates Closes #138626 . We should add potential private items to give ample hints. And for the other seemingly false positive ` pub use crate::one::Foo;` should be kept because we don't know if the user wants to import other module's items or not, and therefore should be given the full option to do so. r? compiler
2025-03-31Rollup merge of #138840 - jyn514:precedence-order, r=wesleywiserMatthias Krüger-0/+152
rustc_resolve: Test the order that preludes are resolved This test is exhaustive. See attached truth table: ![image](https://github.com/user-attachments/assets/11fe703c-e114-48df-84f8-426b63395784) Companion PR to https://github.com/rust-lang/reference/pull/1765.
2025-03-30Fix up partial res of segment in primitive resolution hackMichael Goulet-0/+26