about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2022-11-18Auto merge of #103179 - ferrocene:pa-run-in-run-make, r=jyn514bors-8/+20
Fix `src/test/run-make/issue-36710` on cross-compiled targets This PR fixes the `src/test/run-make/issue-36710` test not working on cross-compiled targets by telling the make infra how to run tests remotely with `remote-test-server`. This PR includes a revert of #102723 (cc `@pcc),` which disabled that test on all cross-compiled targets.
2022-11-18rename to `string_deref_patterns`Deadbeef-5/+5
2022-11-18Adding more testsDeadbeef-112/+114
2022-11-17rustdoc: update tests for enum variant margin tweakMichael Howell-5/+10
2022-11-17Rollup merge of #104532 - GuillaumeGomez:migrate-tooltip-css, r=notriddleMatthias Krüger-4/+76
Migrate tooltip style to CSS variables
2022-11-17Rollup merge of #104515 - chenyukang:yukang/fix-104510-ice, r=compiler-errorsMatthias Krüger-0/+25
ICE fixing, remove is_tainted_by_errors since we have ty_error for delay bug Fixes #104510
2022-11-17Rollup merge of #104508 - compiler-errors:dyn-return, r=oli-obkMatthias Krüger-0/+21
Check `dyn*` return type correctly In `check_fn`, if the declared return type is `dyn Trait`, then we check the return type separately to produce better diagnostics, because this is never valid -- however, when `dyn*` was introduced, this check was never adjusted to only account for *unsized* `dyn Trait` and not *sized* `dyn* Trait`. Fixes #104501
2022-11-17Rollup merge of #104496 - djkoloski:dont_normalize_compiler_backtraces, ↵Matthias Krüger-16/+1
r=jackh726 Don't attempt to normalize compiler backtraces Backtraces can very significantly depending on environment and cause spurious test suite failures. Ensuring a proper failure-status should be sufficient to keep a crash properly documented. This caused a failure in Fuchsia's test suite CI due to an extra newline between "stack" and "error" appearing after normalization. cc ````@jackh726```` r? ````@tmandry````
2022-11-17Rollup merge of #104444 - chenyukang:yukang/fix-104390, r=compiler-errorsMatthias Krüger-0/+75
Fix ICE in in_operand for ty error Fixes #104390 By the way, moving some test cases to proper directory for tidy bless.
2022-11-17Rollup merge of #104433 - TaKO8Ki:fix-104392, r=estebankMatthias Krüger-0/+38
Fix `emit_unused_delims_expr` ICE Fixes #104392
2022-11-17Rollup merge of #104366 - GuillaumeGomez:simplify-settings-theme-choice, ↵Matthias Krüger-45/+43
r=notriddle Simplify settings theme choice I removed the storage changes from https://github.com/rust-lang/rust/pull/98765 and only kept the UI changes. You can test it [here](https://rustdoc.crud.net/imperio/simplify-settings-theme-choice/foo/index.html). Discussion about this still in progress [on zulip](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Last.20part.20of.20settings.20simplification). r? ````@notriddle````
2022-11-17Rollup merge of #103852 - compiler-errors:rpitit-early-from-impl, r=lcnrMatthias Krüger-0/+32
Don't remap early-bound regions for return-position `impl Trait` in trait originating from `impl` long title :sweat: We don't want to remap early-bound regions that originate from the `impl`s themselves, since they have no corresponding region in the trait. Not sure if there's a better condition than checking if the EBR's def-id's parent is the impl -- maybe we should be checking if the region comes from the method or RPITIT... :shrug: r? types Fixes #103850
2022-11-17Migrate GUI test to use functionsGuillaume Gomez-162/+87
2022-11-17detect () to avoid redundant <> suggestion for typeYiming Lei-1/+20
fix #104379
2022-11-17Extend codeblock GUI test to include tooltipsGuillaume Gomez-4/+76
2022-11-17Auto merge of #104219 - bryangarza:async-track-caller-dup, r=eholkbors-0/+76
Support `#[track_caller]` on async fns Adds `#[track_caller]` to the generator that is created when we desugar the async fn. Fixes #78840 Open questions: - What is the performance impact of adding `#[track_caller]` to every `GenFuture`'s `poll(...)` function, even if it's unused (i.e., the parent span does not set `#[track_caller]`)? We might need to set it only conditionally, if the indirection causes overhead we don't want.
2022-11-17Move a ui test to make space for new folderDeadbeef-0/+0
2022-11-17Add feature gateDeadbeef-44/+65
2022-11-17Minimal implementation of implicit deref patternsDeadbeef-0/+128
2022-11-17run tests on the remote device even when the default address is usedPietro Albini-3/+3
When running tests inside the Android emulator, bootstrap doesn't set the TEST_DEVICE_ADDR environment variable, as the default address (127.0.0.1:12345) is used. Instead, REMOTE_TEST_CLIENT is set all the times when remote testing is needed, and in no other cases. To ensure Android tests are executed in the emulator, change the check.
2022-11-17issue-36710 test can now run on cross-compiled targetsPietro Albini-3/+0
2022-11-17Revert "test: run-make: skip when cross-compiling"Pietro Albini-1/+5
This reverts commit 0567fec8e47f83ddda623f93deccddddd3f6744f.
2022-11-17add support for running binaries with remote-test-client on run-makePietro Albini-6/+17
2022-11-17Add powerpc64-ibm-aix as Tier-3 targetQiu Chaofan-1/+1
2022-11-17Auto merge of #104170 - cjgillot:hir-def-id, r=fee1-deadbors-135/+113
Record `LocalDefId` in HIR nodes instead of a side table This is part of an attempt to remove the `HirId -> LocalDefId` table from HIR. This attempt is a prerequisite to creation of `LocalDefId` after HIR lowering (https://github.com/rust-lang/rust/pull/96840), by controlling how `def_id` information is accessed. This first part adds the information to HIR nodes themselves instead of a table. The second part is https://github.com/rust-lang/rust/pull/103902 The third part will be to make `hir::Visitor::visit_fn` take a `LocalDefId` as last parameter. The fourth part will be to completely remove the side table.
2022-11-17Use `ThinVec` in `ast::Path`.Nicholas Nethercote-99/+101
2022-11-17Box `ExprKind::{Closure,MethodCall}`, and `QSelf` in expressions, types, and ↵Nicholas Nethercote-102/+106
patterns.
2022-11-17Auto merge of #103138 - nnethercote:merge-BBs, r=bjorn3bors-4/+4
Merge basic blocks where possible when generating LLVM IR. r? `@ghost`
2022-11-16Ignore the unchecked-shifts codegen test in debug-assertions buildsScott McMurray-0/+1
2022-11-16Auto merge of #102944 - nnethercote:ast-Lit-third-time-lucky, r=petrochenkovbors-23/+201
Use `token::Lit` in `ast::ExprKind::Lit`. Instead of `ast::Lit`. Literal lowering now happens at two different times. Expression literals are lowered when HIR is crated. Attribute literals are lowered during parsing. r? `@petrochenkov`
2022-11-16Check `dyn*` return type correctlyMichael Goulet-0/+21
2022-11-16rustdoc JSON: Use `Function` everywhere and remove `Method`Martin Nordholts-1/+1
2022-11-16Don't attempt to normalize compiler backtracesDavid Koloski-16/+1
Backtraces can very significantly depending on environment and cause test suite failures spuriously. Ensuring a proper failure-status should be sufficient to keep a crash properly documented.
2022-11-16Rollup merge of #104335 - Nilstrieb:macrowo, r=compiler-errorsMatthias Krüger-0/+31
Only do parser recovery on retried macro matching Eager parser recovery can break macros, so we don't do it at first. But when we already know that the macro failed, we can retry it with recovery enabled to still emit useful diagnostics. Helps with #103534
2022-11-16Rollup merge of #104317 - RalfJung:ctfe-error-reporting, r=oli-obkMatthias Krüger-342/+500
cleanup and dedupe CTFE and Miri error reporting It looks like most of the time, this error raised from const_prop_lint is just redundant -- it duplicates the error reported when evaluating the const-eval query. This lets us make `ConstEvalErr` private to the const_eval module which I think is a good step. The Miri change mostly replaces a `match` by `if let`, and dedupes the "this error is impossible in Miri" checks. r? ``@oli-obk`` Fixes https://github.com/rust-lang/rust/issues/75461
2022-11-16fix #104510, Remove is_tainted_by_errors since we have ty_error for delay bugyukang-0/+25
2022-11-16fix #104390, fix ICE in in_operand for ty erroryukang-0/+75
2022-11-16cleanup and dedupe CTFE and Miri error reportingRalf Jung-342/+500
2022-11-16Rollup merge of #104425 - notriddle:notriddle/main-heading-justify-content, ↵Matthias Krüger-0/+17
r=GuillaumeGomez rustdoc: remove no-op CSS `.main-header { justify-content }` This rule was added in 152e8889052adaaa6c12652486292be34059713c to push the out-of-band content to the right while allowing it to line wrap when it got too big. The idea was that the justification rule would fill the space between the `<h1>` element and the `<div class="out-of-band">` element. A later commit, 3cb03cb34247383ffb67a017ae70134741e8c4da, flattened the in-band element into the `<h1>`, copying the `flex-grow` rule. This means the `<h1>` element now grows to fill the space, so there's no need to justify-content any more. This commit also adds a test case for this.
2022-11-16Rollup merge of #104424 - notriddle:notriddle/popover-font-size, ↵Matthias Krüger-0/+2
r=GuillaumeGomez rustdoc: remove no-op CSS `.popover { font-size: 1rem }` This rule was added in cc4f804829ae because the help popover inherited the font-size from the help button "?" icon. It doesn't inherit this any more, because it was moved from being nested inside the link to sharing a wrapper DIV with it.
2022-11-16Rollup merge of #104419 - Ayush1325:test-issue-30490, r=lcnrMatthias Krüger-1/+1
Fix test/ui/issues/issue-30490.rs Since the empty main is used for `not(unix)`, all the targets that will use this empty main will also need `allow(unused_imports)`. Originally part of https://github.com/rust-lang/rust/pull/100316 Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2022-11-16Rollup merge of #104348 - fmease:iat-vis-stab, r=cjgillotMatthias Krüger-1/+76
Respect visibility & stability of inherent associated types As discussed in #103621, this probably won't be the final location of the code that resolves inherent associated types. Still, I think it's valuable to push correctness fixes for this feature (in regards to visibility and stability). Let me know if I should write a translatable diagnostic instead and if I should move the tests to `privacy/` and `stability-attribute/` respectively. Fixes #104243. ````@rustbot```` label A-visibility F-inherent_associated_types r? ````@cjgillot```` (since you reviewed #103621, feel free to reroll though)
2022-11-16Rollup merge of #104193 - TaKO8Ki:fix-104142, r=cjgillotMatthias Krüger-0/+29
Shift no characters when using raw string literals Fixes #104142 Given the following code: ```rust fn main() { println!(r#"\'\'\'\'\'\'\'\'\'\'\'\'\'\'}"#); } ``` The current output is: ``` error: invalid format string: unmatched `}` found --> src/main.rs:2:59 | 2 | println!(r#"\'\'\'\'\'\'\'\'\'\'\'\'\'\'}"#); //~ ERROR invalid format string: unmatched `}` found | ^ unmatched `}` in format string | = note: if you intended to print `}`, you can escape it using `}}` error: could not compile `debug_playground` due to previous error ``` The output should look like: ``` error: invalid format string: unmatched `}` found --> src/main.rs:2:45 | 2 | println!(r#"\'\'\'\'\'\'\'\'\'\'\'\'\'\'}"#); //~ ERROR invalid format string: unmatched `}` found | ^ unmatched `}` in format string | = note: if you intended to print `}`, you can escape it using `}}` error: could not compile `debug_playground` due to previous error ``` This pull request fixes the wrong span for `invalid format string` error and also solves the ICE.
2022-11-16Merge basic blocks where possible when generating LLVM IR.Nicholas Nethercote-4/+4
In `codegen_assert_terminator` we decide if a BB's successor is a candidate for merging, which requires that it be the only successor, and that it only have one predecessor. That result then gets passed down, and if it reaches `funclet_br` with the appropriate BB characteristics, then no `br` instruction is issued, a `MergingSucc::True` result is passed back, and the merging proceeds in `codegen_block`. The commit also adds `CachedLlbb`, a new type to help keep track of each BB that has been merged into its predecessor.
2022-11-15Don't duplicate last cdb debuginfo test commandEric Huss-1/+1
2022-11-15Auto merge of #102570 - cjgillot:deagg-debuginfo, r=oli-obkbors-41/+679
Perform simple scalar replacement of aggregates (SROA) MIR opt This is a re-open of https://github.com/rust-lang/rust/pull/85796 I copied the debuginfo implementation (first commit) from `@eddyb's` own SROA PR. This pass replaces plain field accesses by simple locals when possible. To be eligible, the replaced locals: - must not be enums or unions; - must not be used whole; - must not have their address taken. The storage and deinit statements are duplicated on each created local. cc `@tmiasko` who reviewed the former version of this PR.
2022-11-16Use `token::Lit` in `ast::ExprKind::Lit`.Nicholas Nethercote-89/+108
Instead of `ast::Lit`. Literal lowering now happens at two different times. Expression literals are lowered when HIR is crated. Attribute literals are lowered during parsing. This commit changes the language very slightly. Some programs that used to not compile now will compile. This is because some invalid literals that are removed by `cfg` or attribute macros will no longer trigger errors. See this comment for more details: https://github.com/rust-lang/rust/pull/102944#issuecomment-1277476773
2022-11-16Add some more bad suffix cases in a test.Nicholas Nethercote-17/+75
2022-11-16Add a test for different stages of lexer error reporting.Nicholas Nethercote-0/+101
2022-11-15Only do parser recovery on retried macro matchingNilstrieb-0/+31
This prevents issues with eager parser recovery during macro matching.