about summary refs log tree commit diff
path: root/tests/ui/privacy
AgeCommit message (Collapse)AuthorLines
2025-08-02Auto merge of #144479 - cjgillot:incr-privacy-mod, r=petrochenkovbors-49/+49
Perform check_private_in_public by module. Based on https://github.com/rust-lang/rust/pull/116316
2025-08-01Rollup merge of #144397 - Kivooeo:issue2, r=jieyouxuRalf Jung-0/+54
`tests/ui/issues/`: The Issues Strike Back [2/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-07-31commentsKivooeo-0/+45
2025-07-29add `nonpoison::mutex` implementationConnor Tsui-2/+2
Adds the equivalent `nonpoison` types to the `poison::mutex` module. These types and implementations are gated under the `nonpoison_mutex` feature gate. Also blesses the ui tests that now have a name conflicts (because these types no longer have unique names). The full path distinguishes the different types. Co-authored-by: Aandreba <aandreba@gmail.com> Co-authored-by: Trevor Gross <tmgross@umich.edu>
2025-07-28Rollup merge of #144151 - Kivooeo:issue1, r=jieyouxuMatthias Krüger-0/+26
`tests/ui/issues/`: The Issues Strike Back [1/N] I believe I’ve finally brought [my program](https://github.com/Kivooeo/test-manager) to life -- it now handles multiple test moves in one go: plain moves first, then a gentle touch on each file depends on given options. The process should be much smoother now. Of course, I won’t rush through everything in a few days -- that would be unkind to `@Oneirical.` I’ll pace myself. And also I can't have more than one such PR because `issues.txt` will conflict with previous parts after merging them which is not fun as well. This PR is just that: first commit - moves; second - regression comments and the occasional .stderr reblesses, also issue.txt and tidy changes. Nothing special, but progress nonetheless. This is for the purpose of preserving test file history during restructuring Part of https://github.com/rust-lang/rust/issues/133895. r? `@jieyouxu`
2025-07-26Perform check_private_in_public by module.Camille GILLOT-49/+49
2025-07-25commentsKivooeo-0/+17
2025-07-25move 28 testsKivooeo-0/+9
2025-07-24Rehome tests/ui/issues/ tests [1/?]Oneirical-0/+23
2025-07-24Rollup merge of #144276 - cjgillot:no-hir-privacy, r=petrochenkovLeón Orell Valerian Liehr-47/+47
Use less HIR in check_private_in_public. r? ````````@petrochenkov````````
2025-07-24Rollup merge of #144240 - ↵León Orell Valerian Liehr-5/+32
yuk1ty:false-sealed-traits-note-reported-in-another-issue, r=fee1-dead Add more test case to check if the false note related to sealed trait suppressed Closes rust-lang/rust#143121 I started to fix the issue but I found that this one has already been addressed in this PR (https://github.com/rust-lang/rust/pull/143431). I added an additional test to prove the reported thing has been resolved just in case. I think we can discard this pull request if there's no need to add such kind of tests👍🏻
2025-07-24moved 35 tests to organized locationsKivooeo-0/+9
2025-07-22Add a test case for ui test false-sealed-traits-note.rsyuk1ty-5/+32
2025-07-22Use less HIR in check_private_in_public.Camille GILLOT-47/+47
2025-07-20tests: cover more `exported_private_dependencies` casesDavid Mládek-20/+223
2025-07-19Rollup merge of #144098 - cjgillot:lint-rpitit, r=compiler-errorsMatthias Krüger-54/+69
Do not lint private-in-public for RPITIT Fixes the hard error introduced by https://github.com/rust-lang/rust/pull/143357 Instead of trying to accept this hard error directly, this PR copies tests from https://github.com/rust-lang/rust/pull/144020 and removes the error. If the behaviour is actually desirable, the second commit can be reverted with a proper crater run. cc https://github.com/rust-lang/rust/issues/143531 for bookkeeping r? `@compiler-errors`
2025-07-17Do not check privacy for RPITIT.Camille GILLOT-179/+48
2025-07-17Add test.Camille GILLOT-56/+202
2025-07-17Integrate stable feature checking into a query.Camille GILLOT-40/+16
2025-07-17Rollup merge of #143431 - xizheyin:143392, r=compiler-errorsMatthias Krüger-0/+33
Use relative visibility when noting sealed trait to reduce false positive Fixes rust-lang/rust#143392 I used relative visibility instead of just determining if it's public or not. r? compiler
2025-07-15Implement resolver warnings about reexporting private dependenciesDavid Mládek-12/+48
2025-07-10chore: Improve how the other suggestions message gets renderedScott Schafer-2/+2
2025-07-05Use relative visibility when noting sealed trait to reduce false positivexizheyin-3/+2
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-07-04Add test false-sealed-traits-note.rsxizheyin-0/+34
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-06-16tests: `{Meta,Pointee}Sized` in non-minicore testsDavid Wood-36/+44
As before, add `MetaSized` and `PointeeSized` traits to all of the non-minicore `no_core` tests so that they don't fail for lack of language items.
2025-06-05Rollup merge of #141974 - Kivooeo:tf4, r=jieyouxuMatthias Krüger-0/+35
`tests/ui`: A New Order [4/N] > [!NOTE] > > Intermediate commits are intended to help review, but will be squashed prior to merge. r? ``@jieyouxu`` added stderr tag for commit which means it included generated stderr
2025-06-04Rollup merge of #141968 - oli-obk:wfck-everything-at-once, r=wesleywiserMatthias Krüger-6/+6
Run wfcheck in one big loop instead of per module Maybe we can merge this big loop in the future with the `par_hir_body_owners` call below and run typeck only on items that didn't fail wfcheck. For now let's just see if perf likes it, as it by itself should be beneficial to parallel rustc
2025-06-04cleaned up some testsKivooeo-0/+35
2025-06-03Run wfcheck in one big loop instead of per moduleOli Scherer-6/+6
2025-06-03Use non-2015 edition paths in tests that do not test for their resolutionLukas Wirth-149/+149
This allows for testing these tests on editions other than 2015
2025-05-03Move some tests out of tests/uimejrs-10/+29
2025-04-30compiletest: Make diagnostic kind mandatory on line annotationsVadim Petrochenkov-9/+10
2025-04-08UI tests: add missing diagnostic kinds where possibleVadim Petrochenkov-1/+1
2025-04-03compiletest: Require `//~` annotations even if `error-pattern` is specifiedVadim Petrochenkov-15/+14
2025-04-01Rollup merge of #138790 - xizheyin:issue-138626, r=compiler-errorsMatthias Krüger-0/+48
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-25Rollup merge of #138317 - petrochenkov:libsearch3, r=compiler-errorsMatthias Krüger-5/+24
privacy: Visit types and traits in impls in type privacy lints With one exception to avoid false positives. Fixes the same issue as https://github.com/rust-lang/rust/pull/134176.
2025-03-25privacy: Visit types and traits in impls in type privacy lintsVadim Petrochenkov-5/+24
2025-03-24Don't mark privacy test as needing GCEMichael Goulet-11/+10
2025-03-22Note potential but private items in show_candidatesxizheyin-0/+48
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-03-11Implement `#[define_opaque]` attribute for functions.Oli Scherer-0/+1
2025-03-07tests: fix some typos in commenttcpdumppy-1/+1
Signed-off-by: tcpdumppy <847462026@qq.com>
2025-02-21If the parent dependency is private, treat dependents as privateTrevor Gross-4/+30
Currently, marking a dependency private does not automatically make all its child dependencies private. Resolve this by making its children private by default as well. This also resolves some FIXMEs for tests that are intended to fail but previously passed. [1]: https://github.com/rust-lang/rust/pull/135501#issuecomment-2620242419
2025-02-14Trim suggestion parts to the subset that is purely additiveMichael Goulet-2/+2
2025-02-14Consider add-prefix replacements tooMichael Goulet-6/+4
2025-02-14Use underline suggestions for purely 'additive' replacementsMichael Goulet-30/+20
2025-02-10Show diff suggestion format on verbose replacementEsteban Küber-88/+144
``` 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-02-03Check Sizedness of return type in WFMichael Goulet-5/+73
2025-01-28Fix tests/ui/privacy/sysroot-privateAlisa Sireneva-8/+9
2025-01-24Reword "crate not found" resolve messageEsteban Küber-4/+4
``` error[E0432]: unresolved import `some_novel_crate` --> file.rs:1:5 | 1 | use some_novel_crate::Type; | ^^^^^^^^^^^^^^^^ use of unresolved module or unlinked crate `some_novel_crate` ``` On resolve errors where there might be a missing crate, mention `cargo add foo`: ``` error[E0433]: failed to resolve: use of unresolved module or unlinked crate `nope` --> $DIR/conflicting-impl-with-err.rs:4:11 | LL | impl From<nope::Thing> for Error { | ^^^^ use of unresolved module or unlinked crate `nope` | = help: if you wanted to use a crate named `nope`, use `cargo add nope` to add it to your `Cargo.toml` ```
2025-01-21Auto merge of #134299 - RalfJung:remove-start, r=compiler-errorsbors-8/+8
remove support for the (unstable) #[start] attribute As explained by `@Noratrieb:` `#[start]` should be deleted. It's nothing but an accidentally leaked implementation detail that's a not very useful mix between "portable" entrypoint logic and bad abstraction. I think the way the stable user-facing entrypoint should work (and works today on stable) is pretty simple: - `std`-using cross-platform programs should use `fn main()`. the compiler, together with `std`, will then ensure that code ends up at `main` (by having a platform-specific entrypoint that gets directed through `lang_start` in `std` to `main` - but that's just an implementation detail) - `no_std` platform-specific programs should use `#![no_main]` and define their own platform-specific entrypoint symbol with `#[no_mangle]`, like `main`, `_start`, `WinMain` or `my_embedded_platform_wants_to_start_here`. most of them only support a single platform anyways, and need cfg for the different platform's ways of passing arguments or other things *anyways* `#[start]` is in a super weird position of being neither of those two. It tries to pretend that it's cross-platform, but its signature is a total lie. Those arguments are just stubbed out to zero on ~~Windows~~ wasm, for example. It also only handles the platform-specific entrypoints for a few platforms that are supported by `std`, like Windows or Unix-likes. `my_embedded_platform_wants_to_start_here` can't use it, and neither could a libc-less Linux program. So we have an attribute that only works in some cases anyways, that has a signature that's a total lie (and a signature that, as I might want to add, has changed recently, and that I definitely would not be comfortable giving *any* stability guarantees on), and where there's a pretty easy way to get things working without it in the first place. Note that this feature has **not** been RFCed in the first place. *This comment was posted [in May](https://github.com/rust-lang/rust/issues/29633#issuecomment-2088596042) and so far nobody spoke up in that issue with a usecase that would require keeping the attribute.* Closes https://github.com/rust-lang/rust/issues/29633 try-job: x86_64-gnu-nopt try-job: x86_64-msvc-1 try-job: x86_64-msvc-2 try-job: test-various