about summary refs log tree commit diff
path: root/tests
AgeCommit message (Collapse)AuthorLines
2023-08-07fix testsdarklyspaced-25/+2
2023-08-07test infra addeddarklyspaced-0/+38
2023-08-07Rollup merge of #114382 - scottmcm:compare-bytes-intrinsic, r=cjgillotMatthias Krüger-2/+158
Add a new `compare_bytes` intrinsic instead of calling `memcmp` directly As discussed in #113435, this lets the backends be the place that can have the "don't call the function if n == 0" logic, if it's needed for the target. (I didn't actually *add* those checks, though, since as I understood it we didn't actually need them on known targets?) Doing this also let me make it `const` (unstable), which I don't think `extern "C" fn memcmp` can be. cc `@RalfJung` `@Amanieu`
2023-08-07Rollup merge of #114230 - workingjubilee:codegen-tests-that-nest, ↵Matthias Krüger-178/+0
r=Mark-Simulacrum Nest other codegen test topics This PR is like rust-lang/rust#114229 in that it mostly pushes codegen tests around, shoving them into their own directories, but because all of the changes are very simple cleanups I pulled them into a separate PR. The other PR might involve actually evaluating the correctness of the test after changes, but here it is mostly a matter of taste. The only "functional" change is deleting a few tests that... hinge on a version of LLVM that we don't support (as of rust-lang/rust#114148 anyways). I considered a few different ways to group other topics but I feel the question of whether `tests/codegen/{vec,array,slice}` should exist is more subtle than these choices, as it might be better to group such related tests by other topics like bounds check elision, thus I avoided making it.
2023-08-07Rollup merge of #114229 - workingjubilee:nest-sanitizer-dir, r=Mark-SimulacrumMatthias Krüger-54/+54
Nest tests/codegen/sanitizer*.rs tests in sanitizer dir The sanitizer tests are the largest and most meticulously tested set of tests in tests/codegen. That's good! They all clearly belong to a subject and thus could go in a directory, but are not, instead being placed simply in tests/codegen. That's bad! Fix this by placing them in their own directory and renaming them to be less repetitive after that move. A few tests are brittle, and embed their filename in the test's checks. This is acceptable for the ones where it is used only two times, but one test embeds the test's mangled filename in the test *over 50 times*! This may have been one of the things discouraging anyone from moving it, and thus from moving the set. Fortunately, I have some knowledge of Itanium mangling (involuntarily), regex, and the FileCheck syntax. With a capturing variable, FileCheck allows us to now move this test around again without diffing it on ~50 lines, while still guaranteeing that the mangled substring is the same each time. This also clarifies why the substring is repeated a zillion times, instead of being cryptic. They don't call it mangling because the result is pretty and easy to understand, but now it is slightly easier! Yay descriptive variables!
2023-08-07Rollup merge of #114093 - Enselic:stdin-unknown-mod, r=Mark-SimulacrumMatthias Krüger-0/+26
Add regression test for `echo 'mod unknown;' | rustc -` Closes #65601 The bug is fixed since long ago, probably by #69838 (see https://github.com/rust-lang/rust/issues/65601#issuecomment-1650508071 for more details). Add a regression test so we can close the issue.
2023-08-06Add a new `compare_bytes` intrinsic instead of calling `memcmp` directlyScott McMurray-2/+158
2023-08-07Rollup merge of #114558 - Enselic:lifetime-diagnostic-fixed, r=cjgillotMatthias Krüger-3/+1
Remove FIXME about NLL diagnostic that is already improved The FIXME was added in #46984 when the diagnostic message looked like this: // FIXME(#46983): error message should be better &s.0 //~ ERROR free region `` does not outlive free region `'static` The message was improved in #90667 and now looks like this: &s.0 //~ ERROR lifetime may not live long enough but the FIXME was not removed. The issue #46983 about that diagnostics should be improved has been closed. We can remove the FIXME now. (This PR was made for #44366.)
2023-08-07Rollup merge of #114543 - RalfJung:test-96944, r=compiler-errorsMatthias Krüger-0/+33
add tests for some fixed ConstProp ICEs Fixes https://github.com/rust-lang/rust/issues/96944 Fixes https://github.com/rust-lang/rust/issues/111353
2023-08-06Auto merge of #114553 - matthiaskrgr:rollup-5yddunv, r=matthiaskrgrbors-3/+3
Rollup of 5 pull requests Successful merges: - #114466 (Add Allocation to SMIR) - #114505 (Add documentation to has_deref) - #114519 (use offset_of! to calculate dirent64 field offsets) - #114537 (Migrate GUI colors test to original CSS color format) - #114539 (linkchecker: Remove unneeded FIXME about intra-doc links) Failed merges: - #114485 (Add trait decls to SMIR) r? `@ghost` `@rustbot` modify labels: rollup
2023-08-06Remove FIXME about NLL diagnostic that is already improvedMartin Nordholts-3/+1
The FIXME was added in 46984 when the diagnostic message looked like this: // FIXME(#46983): error message should be better &s.0 //~ ERROR free region `` does not outlive free region `'static` The message was improved in 90667 and now looks like this: &s.0 //~ ERROR lifetime may not live long enough but the FIXME was not removed. The issue 46983 about that diagnostics should be improved has been closed. We can remove the FIXME now.
2023-08-06Rollup merge of #114537 - GuillaumeGomez:migrate-gui-test-color-29, r=notriddleMatthias Krüger-3/+3
Migrate GUI colors test to original CSS color format Follow-up of https://github.com/rust-lang/rust/pull/111459. r? ``@notriddle``
2023-08-06add test for issue #111353Ralf Jung-0/+7
2023-08-06add test for issue #96944Ralf Jung-0/+26
2023-08-06don't replace opaque types under binders with infer varsAli MJ Al-Nasrawy-30/+26
2023-08-06Migrate GUI colors test to original CSS color formatGuillaume Gomez-3/+3
2023-08-06Rollup merge of #114509 - GuillaumeGomez:migrate-gui-test-color-28, r=notriddleMatthias Krüger-6/+6
Migrate GUI colors test to original CSS color format Follow-up of https://github.com/rust-lang/rust/pull/111459. r? `@notriddle`
2023-08-06Rollup merge of #114503 - ↵Matthias Krüger-0/+10
chenyukang:yukang-fix-114433-unused-qualifications, r=compiler-errors Remove invalid lint when there is a generic argument in prefix path Fixes #114433
2023-08-06Rollup merge of #114486 - Urgau:const-context-nan-suggestion-114471, ↵Matthias Krüger-5/+0
r=compiler-errors Avoid invalid NaN lint machine-applicable suggestion in const context This PR removes the machine-applicable suggestion in const context for the `invalid_nan_comparision` lint ~~and replace it with a simple help~~. Fixes https://github.com/rust-lang/rust/issues/114471
2023-08-06Auto merge of #114476 - Urgau:missing-dep-file-112898, r=oli-obkbors-0/+10
Fix missing dependency file with `-Zunpretty` This PR force the `output_filenames` to be run ~~in every early exits like~~ when using `-Zunpretty`, so to respect the `dep-info` flag. Fixes https://github.com/rust-lang/rust/issues/112898 r? `@oli-obk`
2023-08-05Avoid invalid NaN lint machine-applicable suggestion in const contextUrgau-5/+0
2023-08-05Auto merge of #114143 - Enselic:rename-issue-100605, r=eholkbors-13/+15
Rename tests/ui/issues/issue-100605.rs to ../type/option-ref-advice.rs The test is a regression test for a [bug ](https://github.com/rust-lang/rust/issues/100605) where the compiler gave bad advice for an `Option<&String>`. Rename the file appropriately. Part of #73494
2023-08-05Rename tests/ui/issues/issue-100605.rs to ../type/option-ref-advice.rsMartin Nordholts-13/+15
The test is a regression test for a bug where the compiler gave bad advice for an `Option<&String>`. Rename the file appropriately.
2023-08-05Auto merge of #114514 - matthiaskrgr:rollup-1rv4f3h, r=matthiaskrgrbors-0/+15
Rollup of 3 pull requests Successful merges: - #114029 (Explain more clearly why `fn() -> T` can't be `#[derive(Clone)]`) - #114248 (Make lint missing-copy-implementations honor negative `Copy` impls) - #114498 (Print tidy command with bless tidy check failure) r? `@ghost` `@rustbot` modify labels: rollup
2023-08-05Rollup merge of #114248 - fmease:neg-copy-rules-out-missing-copy-impl, r=b-naberMatthias Krüger-0/+15
Make lint missing-copy-implementations honor negative `Copy` impls Fixes #101980. ``@rustbot`` label A-lint F-negative_impls
2023-08-05Auto merge of #109348 - cjgillot:issue-109146, r=petrochenkovbors-6/+26
Resolve visibility paths as modules not as types. Asking for a resolution with `opt_ns = Some(TypeNS)` allows path resolution to look for type-relative paths, leaving unresolved segments behind. However, for visibility paths we really need to look for a module, so we need to pass `opt_ns = None`. Fixes https://github.com/rust-lang/rust/issues/109146 r? `@petrochenkov`
2023-08-05Migrate GUI colors test to original CSS color formatGuillaume Gomez-6/+6
2023-08-05Remove invalid lint when there is a generic argument in prefix pathyukang-0/+10
2023-08-05Auto merge of #113734 - cjgillot:no-crate-lint, r=petrochenkovbors-152/+146
Convert builtin "global" late lints to run per module The compiler currently has 4 non-incremental lints: 1. `clashing_extern_declarations`; 2. `missing_debug_implementations`; 3. ~`unnameable_test_items`;~ changed by https://github.com/rust-lang/rust/pull/114414 4. `missing_docs`. Non-incremental lints get reexecuted for each compilation, which is slow. Moreover, those lints are allow-by-default, so run for nothing most of the time. This PR attempts to make them more incremental-friendly. `clashing_extern_declarations` is moved to a standalone query. `missing_debug_implementation` can use `non_blanket_impls_for_ty` instead of recomputing it. `missing_docs` is harder as it needs to track if there is a `doc(hidden)` module surrounding. I hack around this using the lint level engine. That's easy to implement and allows to re-enable the lint for a re-exported module, while a more proper solution would reuse the same device as `unnameable_test_items`.
2023-08-04Rollup merge of #114491 - ↵Michael Goulet-6/+6
sebastiantoh:add-context-to-issue-114423-test-names, r=compiler-errors Rename issue #114423 test files to include context Addresses feedback given in https://github.com/rust-lang/rust/pull/114461#discussion_r1284528863 r? `@estebank`
2023-08-04Rollup merge of #114490 - kernelmethod:error-reporting-typos, r=compiler-errorsMichael Goulet-1/+1
Fix a typo in the error reporting for sealed traits. Fixes a typo in error reporting: "implelement" -> "implement"
2023-08-04Rollup merge of #114475 - GuillaumeGomez:migrate-gui-test-color-27, r=notriddleMichael Goulet-6/+6
Migrate GUI colors test to original CSS color format Follow-up of https://github.com/rust-lang/rust/pull/111459. r? `@notriddle`
2023-08-04Rollup merge of #114287 - lcnr:overflow, r=compiler-errorsMichael Goulet-35/+185
update overflow handling in the new trait solver implements https://hackmd.io/QY0dfEOgSNWwU4oiGnVRLw?view. I want to clean up this doc and add it to the rustc-dev-guide, but I think this PR is ready for merge as is, even without the dev-guide entry. r? `@compiler-errors`
2023-08-05Rename issue #114423 test files to include contextSebastian Toh-6/+6
2023-08-05Fix a typo in the error reporting for sealed traits.kernelmethod-1/+1
2023-08-04Auto merge of #112117 - bryangarza:track-caller-feature-gate, r=compiler-errorsbors-51/+301
Add separate feature gate for async fn track caller This patch adds a feature gate `async_fn_track_caller` that is separate from `closure_track_caller`. This is to allow enabling `async_fn_track_caller` separately. Fixes #110009
2023-08-04Rollup merge of #114477 - estebank:arc-clone, r=compiler-errorsMatthias Krüger-1/+1
Account for `Rc` and `Arc` when suggesting to clone When suggesting to clone a reference-counted value, be less uncertain.
2023-08-04Rollup merge of #114472 - estebank:issue-76140, r=compiler-errorsMatthias Krüger-8/+8
Reword `confusable_idents` lint Fix #76140.
2023-08-04Rollup merge of #114461 - sebastiantoh:issue-114423, r=estebankMatthias Krüger-0/+67
Fix unwrap on None Fixes #114423 r? `@estebank`
2023-08-04Rollup merge of #114450 - chenyukang:yukang-fix-114435, r=compiler-errorsMatthias Krüger-0/+52
Fix ICE failed to get layout for ReferencesError Fixes #114435 r? `@compiler-errors`
2023-08-04Rollup merge of #114434 - Nilstrieb:indexing-spans, r=est31Matthias Krüger-54/+81
Improve spans for indexing expressions fixes #114388 Indexing is similar to method calls in having an arbitrary left-hand-side and then something on the right, which is the main part of the expression. Method calls already have a span for that right part, but indexing does not. This means that long method chains that use indexing have really bad spans, especially when the indexing panics and that span in coverted into a panic location. This does the same thing as method calls for the AST and HIR, storing an extra span which is then put into the `fn_span` field in THIR. r? compiler-errors
2023-08-04Rollup merge of #113945 - chenyukang:yukang-fix-113447-slice-2, r=cjgillotMatthias Krüger-0/+75
Fix wrong span for trait selection failure error reporting Fixes #113447
2023-08-04Fix missing dependency file with -ZunprettyUrgau-0/+10
2023-08-04Account for `Rc` and `Arc` when suggesting to cloneEsteban Küber-1/+1
When suggesting to clone a reference-counted value, be less uncertain.
2023-08-04Migrate GUI colors test to original CSS color formatGuillaume Gomez-6/+6
2023-08-05Fix ICE failed to get layout for ReferencesErroryukang-0/+52
2023-08-04Reword confusable idents lintEsteban Küber-8/+8
Fix #76140.
2023-08-04Make MissingDoc a module lint.Camille GILLOT-42/+42
2023-08-04Make MissingDebugImplementation a module lint.Camille GILLOT-9/+9
2023-08-04Bless ui tests.Camille GILLOT-101/+95