about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2022-11-19Auto merge of #103509 - compiler-errors:opaques-w-bound-vars-r-hard, r=oli-obkbors-0/+47
Revert "Normalize opaques with escaping bound vars" This caused a perf regression in #103423, cc `@skyzh` this should fix #103423. reverts #100980 r? `@oli-obk`
2022-11-19Rollup merge of #104580 - notriddle:notriddle/issue-102354-hide-sugg, ↵Dylan DPC-9/+4
r=compiler-errors diagnostics: only show one suggestion for method -> assoc fn Fixes #102354
2022-11-19Rollup merge of #104575 - lcnr:dedup-tests, r=jackh726Dylan DPC-39/+9
deduplicate tests originally added in #100514. Using revisions for this reduces the amount of tests in the repo
2022-11-19Rollup merge of #104554 - BoxyUwU:less_unchecked_pls, r=lcnrDylan DPC-2/+1
Use `ErrorGuaranteed::unchecked_claim_error_was_emitted` less there are only like 3 or 4 call sites left after this but it wasnt obvious to me how to remove them
2022-11-19Rollup merge of #104411 - lcnr:bivariance-nll, r=compiler-errorsDylan DPC-0/+26
nll: correctly deal with bivariance fixes #104409 when in a bivariant context, relating stuff should always trivially succeed. Also changes the mir validator to correctly deal with higher ranked regions. r? types cc ``@RalfJung``
2022-11-18Auto merge of #104591 - Manishearth:rollup-b3ser4e, r=Manishearthbors-5/+211
Rollup of 8 pull requests Successful merges: - #102977 (remove HRTB from `[T]::is_sorted_by{,_key}`) - #103378 (Fix mod_inv termination for the last iteration) - #103456 (`unchecked_{shl|shr}` should use `u32` as the RHS) - #103701 (Simplify some pointer method implementations) - #104047 (Diagnostics `icu4x` based list formatting.) - #104338 (Enforce that `dyn*` coercions are actually pointer-sized) - #104498 (Edit docs for `rustc_errors::Handler::stash_diagnostic`) - #104556 (rustdoc: use `code-header` class to format enum variants) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-11-18Rollup merge of #104556 - notriddle:notriddle/variant, r=GuillaumeGomezManish Goregaokar-5/+10
rustdoc: use `code-header` class to format enum variants The font size and weights should be exactly the same after this PR, but the spacing is changed to be the same as methods. Preview: http://notriddle.com/notriddle-rustdoc-demos/variant/test_dingus_enum/enum.TestEnum.html
2022-11-18Rollup merge of #104338 - compiler-errors:pointer-sized, r=eholkManish Goregaokar-0/+115
Enforce that `dyn*` coercions are actually pointer-sized Implement a perma-unstable, rudimentary `PointerSized` trait to enforce `dyn*` casts are `usize`-sized for now, at least to prevent ICEs and weird codegen issues from cropping up after monomorphization since currently we enforce *nothing*. This probably can/should be removed in favor of a more sophisticated trait for handling `dyn*` conversions when we decide on one, but I just want to get something up for discussion and experimentation for now. r? ```@eholk``` cc ```@tmandry``` (though feel free to claim/reassign) Fixes #102141 Fixes #102173
2022-11-18Rollup merge of #103456 - scottmcm:fix-unchecked-shifts, r=scottmcmManish Goregaokar-0/+66
`unchecked_{shl|shr}` should use `u32` as the RHS The other shift methods, such as https://doc.rust-lang.org/nightly/std/primitive.u64.html#method.checked_shr and https://doc.rust-lang.org/nightly/std/primitive.i16.html#method.wrapping_shl, use `u32` for the shift amount. That's consistent with other things, like `count_ones`, which also always use `u32` for a bit count, regardless of the size of the type. This PR changes `unchecked_shl` and `unchecked_shr` to also use `u32` for the shift amount (rather than Self). cc #85122, the `unchecked_math` tracking issue
2022-11-18Rollup merge of #102977 - lukas-code:is-sorted-hrtb, r=m-ou-seManish Goregaokar-0/+20
remove HRTB from `[T]::is_sorted_by{,_key}` Changes the signature of `[T]::is_sorted_by{,_key}` to match `[T]::binary_search_by{,_key}` and make code like https://github.com/rust-lang/rust/issues/53485#issuecomment-885393452 compile. Tracking issue: https://github.com/rust-lang/rust/issues/53485 ~~Do we need an ACP for something like this?~~ Edit: Filed ACP here: https://github.com/rust-lang/libs-team/issues/121
2022-11-18Auto merge of #104573 - matthiaskrgr:rollup-k36ybtp, r=matthiaskrgrbors-162/+299
Rollup of 8 pull requests Successful merges: - #101162 (Migrate rustc_resolve to use SessionDiagnostic, part # 1) - #103386 (Don't allow `CoerceUnsized` into `dyn*` (except for trait upcasting)) - #103405 (Detect incorrect chaining of if and if let conditions and recover) - #103594 (Fix non-associativity of `Instant` math on `aarch64-apple-darwin` targets) - #104006 (Add variant_name function to `LangItem`) - #104494 (Migrate GUI test to use functions) - #104516 (rustdoc: clean up sidebar width CSS) - #104550 (fix a typo) Failed merges: - #104554 (Use `ErrorGuaranteed::unchecked_claim_error_was_emitted` less) r? `@ghost` `@rustbot` modify labels: rollup
2022-11-18Check both align and size in PointerSizedMichael Goulet-0/+48
2022-11-18Enforce that dyn* casts are actually pointer-sizedMichael Goulet-0/+67
2022-11-18Add testMichael Goulet-0/+47
2022-11-18diagnostics: only show one suggestion for method -> assoc fnMichael Howell-9/+4
Fixes #102354
2022-11-18Auto merge of #101562 - nnethercote:shrink-ast-Expr-harder, r=petrochenkovbors-116/+122
Shrink `ast::Expr` harder r? `@ghost`
2022-11-18deduplicate testslcnr-39/+9
2022-11-18rename `is_tainted_by_errors` Boxy-2/+1
2022-11-18Rollup merge of #104494 - GuillaumeGomez:migrate-gui-test-to-func, r=notriddleMatthias Krüger-162/+87
Migrate GUI test to use functions r? `@notriddle`
2022-11-18Rollup merge of #103405 - chenyukang:yukang/fix-103381-and-if, r=compiler-errorsMatthias Krüger-0/+168
Detect incorrect chaining of if and if let conditions and recover Fixes #103381
2022-11-18Rollup merge of #103386 - compiler-errors:no-coerceunsized-to-dynstar, r=eholkMatthias Krüger-0/+44
Don't allow `CoerceUnsized` into `dyn*` (except for trait upcasting) This makes sure we don't accidentally allow coercions like `Box<T>` -> `Box<dyn* Trait>`, or in the case of this ICE, `&T` to `&dyn* Trait`. These coercions don't make sense, at least not via the `CoerceUnsized` trait. Fixes #102172 Fixes #102429
2022-11-18Auto merge of #104555 - matthiaskrgr:rollup-tncyca8, r=matthiaskrgrbors-65/+311
Rollup of 11 pull requests Successful merges: - #103852 (Don't remap early-bound regions for return-position `impl Trait` in trait originating from `impl`) - #104366 (Simplify settings theme choice) - #104433 (Fix `emit_unused_delims_expr` ICE) - #104444 (Fix ICE in in_operand for ty error) - #104483 (Convert predicates into Predicate in the Obligation constructor) - #104496 (Don't attempt to normalize compiler backtraces) - #104503 (rustdoc: remove redundant font-color CSS on `.where`) - #104508 (Check `dyn*` return type correctly) - #104515 (ICE fixing, remove is_tainted_by_errors since we have ty_error for delay bug) - #104532 (Migrate tooltip style to CSS variables) - #104545 (Readd the matches_macro diag item) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
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-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-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-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-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-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