about summary refs log tree commit diff
path: root/tests
AgeCommit message (Collapse)AuthorLines
2023-04-11Rollup merge of #110000 - reez12g:issue-109878, r=jackh726Michael Goulet-0/+0
Rename tests/ui/unique to tests/ui/box/unit fixes https://github.com/rust-lang/rust/issues/109878 Since tests/ui/box already exists, I have temporarily named it boxed-box, but if another name sounds better, please let me know.
2023-04-11Rollup merge of #96971 - zhaixiaojuan:master, r=wesleywiserMichael Goulet-1/+1
Initial support for loongarch64-unknown-linux-gnu Hi, We hope to add a new port in rust for LoongArch. LoongArch intro LoongArch is a RISC style ISA which is independently designed by Loongson Technology in China. It is divided into two versions, the 32-bit version (LA32) and the 64-bit version (LA64). LA64 applications have application-level backward binary compatibility with LA32 applications. LoongArch is composed of a basic part (Loongson Base) and an expanded part. The expansion part includes Loongson Binary Translation (LBT), Loongson VirtualiZation (LVZ), Loongson SIMD EXtension (LSX) and Loongson Advanced SIMD EXtension(LASX). Currently the LA464 processor core supports LoongArch ISA and the Loongson 3A5000 processor integrates 4 64-bit LA464 cores. LA464 is a four-issue 64-bit high-performance processor core. It can be used as a single core for high-end embedded and desktop applications, or as a basic processor core to form an on-chip multi-core system for server and high-performance machine applications. Documentations: ISA: https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html ABI: https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html More docs can be found at: https://loongson.github.io/LoongArch-Documentation/README-EN.html Since last year, we have locally adapted two versions of rust, rust1.41 and rust1.57, and completed the test locally. I'm not sure if I'm submitting all the patches at once, so I split up the patches and here's one of the commits
2023-04-11Auto merge of #110194 - GuillaumeGomez:update-browser-ui-test, r=notriddlebors-308/+308
Update browser-ui-test version This update add the support for expressions, so we can now do this: ``` assert: 1 > 2 && ["a"] != ["b", "c"] ``` It also improved commands naming and updated puppeteer version. r? `@notriddle`
2023-04-11Update rustdoc GUI tests to new browser-ui-test versionGuillaume Gomez-308/+308
2023-04-11Auto merge of #110092 - clubby789:builtin-macros-translatable, r=compiler-errorsbors-16/+28
Migrate most of `rustc_builtin_macros` to diagnostic impls cc #100717 This is a couple of days work, but I decided to stop for now before the PR becomes too big. There's around 50 unresolved failures when `rustc::untranslatable_diagnostic` is denied, which I'll finish addressing once this PR goes thtough A couple of outputs have changed, but in all instances I think the changes are an improvement/are more consistent with other diagnostics (although I'm happy to revert any which seem worse)
2023-04-11Auto merge of #109765 - petrochenkov:encodeless, r=cjgillotbors-7/+16
rustc_metadata: Filter encoded data more aggressively using `DefKind` I focused on data that contains spans, because spans are expensive to encode/decode/hash, but also touched `should_encode_visibility` too. One incorrect use of impl visibility in diagnostics is also replaced with trait visibility.
2023-04-11rename tests/ui/unique to tests/ui/box/unitreez12g-0/+0
2023-04-11Auto merge of #110170 - JohnTitor:rollup-hdramer, r=JohnTitorbors-106/+245
Rollup of 8 pull requests Successful merges: - #109527 (Set up standard library path substitution in rust-gdb and gdbgui) - #109752 (Stall auto trait assembly in new solver for int/float vars) - #109860 (Add support for RISC-V relax target feature) - #109923 (Update `error [E0449]: unnecessary visibility qualifier` to be more clear) - #110070 (The `wrapping_neg` example for unsigned types shouldn't use `i8`) - #110146 (fix(doc): do not parse inline when output is json for external crate) - #110147 (Add regression test for #104916) - #110149 (Update books) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-04-11Rollup merge of #110147 - JohnTitor:issue-104916, r=compiler-errorsYuki Okushi-0/+22
Add regression test for #104916 Closes #104916 I haven't tested if it still passes with debug assertions enabled so it'd be better to wait for CI to be green. r? compiler-errors
2023-04-11Rollup merge of #110146 - bvanjoi:relative-110138, r=notriddleYuki Okushi-0/+11
fix(doc): do not parse inline when output is json for external crate relative #110138
2023-04-11Rollup merge of #109923 - ElectrifyPro:visibility, r=wesleywiserYuki Okushi-106/+162
Update `error [E0449]: unnecessary visibility qualifier` to be more clear This updates the error message `error[E0449]: unnecessary visibility qualifier` by clearly indicating that visibility qualifiers already inherit their visibility from a parent item. The error message previously implied that the qualifiers were permitted, which is not the case anymore. Resolves #109822.
2023-04-11Rollup merge of #109752 - ↵Yuki Okushi-0/+50
compiler-errors:new-solver-stall-auto-trait-for-num-var, r=lcnr Stall auto trait assembly in new solver for int/float vars Make sure that we don't match int/float vars against *all* manual auto trait impls due to this check: https://github.com/rust-lang/rust/blob/2fb0e8d162a021f8a795fb603f5d8c0017855160/compiler/rustc_trait_selection/src/solve/trait_goals.rs#L151-L169 Since `find_map_relevant_impl` treats all impls as candidates for int/float vars, due to the way that `fast_reject::simplify_type` works. This fixes compiler-errors/next-solver-hir-issues#11. r? ``@lcnr``
2023-04-11Auto merge of #109850 - MU001999:master, r=estebankbors-0/+60
Emits non-overlapping suggestions for arguments with wrong types Fixes #109831
2023-04-10Auto merge of #109638 - NotStirred:suggest/non-derive, r=davidtwcobors-0/+72
Add suggestion to remove `derive()` if invoked macro is non-derive Adds to the existing `expected derive macro, found {}` error message: ``` help: remove the surrounding "derive()": --> $DIR/macro-path-prelude-fail-4.rs:1:3 | LL | #[derive(inline)] | ^^^^^^^ ^ ``` This suggestion will either fix the issue, in the case that the macro was valid, or provide a better error message if not Not ready for merge yet, as the highlighted span is only valid for trivial formatting. Is there a nice way to get the parent span of the macro path within `smart_resolve_macro_path`? Closes #109589
2023-04-10Migrate most of `rustc_builtin_macros` to diagnostic implsclubby789-16/+28
Co-authored-by: Joe ST <joe@fbstj.net> Co-authored-by: Michael Goulet <michael@errs.io>
2023-04-10Stall auto-trait assembly for int/float vars in new solverMichael Goulet-0/+50
2023-04-10fix(doc): do not parse inline when output is json for external cratebohan-0/+11
2023-04-11Add regression test for #104916Yuki Okushi-0/+22
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2023-04-10rustc_metadata: Filter encoded data more aggressively using `DefKind`Vadim Petrochenkov-7/+16
2023-04-10Rollup merge of #110021 - scottmcm:fix-110005, r=compiler-errorsDylan DPC-2/+165
Fix a couple ICEs in the new `CastKind::Transmute` code Check the sizes of the immediates, rather than the overall types, when deciding whether we can convert types without going through memory. Fixes #110005 Fixes #109992 Fixes #110032 cc `@matthiaskrgr`
2023-04-10review + some small stufflcnr-1/+23
2023-04-10prioritize param-env candidateslcnr-7/+53
2023-04-10Auto merge of #110127 - matthiaskrgr:rollup-6ui12x5, r=matthiaskrgrbors-0/+45
Rollup of 6 pull requests Successful merges: - #108843 (Instantiate instead of erasing binder when probing param methods) - #109985 (Add little `is_test_crate` function) - #110028 (Migrate `rustc_hir_analysis` to session diagnostic [Part 3]) - #110095 (Migrate remainder of rustc_ty_utils to `SessionDiagnostic`) - #110108 (Add renaming of ignore-git to changelog) - #110114 (compiletest: Give a better error message if `node` isn't installed) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-04-09Rollup merge of #110095 - matthewjasper:ty-utils-diagnostics, r=compiler-errorsMatthias Krüger-0/+18
Migrate remainder of rustc_ty_utils to `SessionDiagnostic` This moves the remaining errors in `rust_ty_utils` to `SessionsDiagnostic`. r? ``@davidtwco``
2023-04-09Rollup merge of #108843 - compiler-errors:non_lifetime_binders-method-probe, ↵Matthias Krüger-0/+27
r=jackh726 Instantiate instead of erasing binder when probing param methods Fixes #108836 There is a really old comment saying that a `WhereClauseCandidate` probe candidate "should not contain any inference variables", but I'm not really confident that that comment applies anymore. In contrast, other candidates that we assemble during method probe contain inference variables in their substitutions (e.g. `InherentImplCandidate`)... Since this change is made only to support a nightly feature, I'm happy to gate the new behavior behind this feature flag or discuss it further. r? types
2023-04-09Auto merge of #109760 - MaciejWas:struct-tuple-field-names-suggestion, ↵bors-2/+21
r=jackh726 Better diagnostic when pattern matching tuple structs Fixes #108284 When trying to pattern match a tuple struct we might get a flawed error message if there are missing fields. E.g. ``` let x = Foo(100, 200); if let Foo { 0: bar } = x { ... } ``` Produces this error: ``` error[E0769]: tuple variant `Foo` written as struct variant --> hello.rs:5:12 | 5 | if let Foo { 0: foo } = x { | ^^^^^^^^^^^^^^ | help: use the tuple variant pattern syntax instead | 5 | if let Foo(_, _) = x { | ~~~~~~ ``` Which doesn't highlight that we can still use the struct syntax but we need to fill missing fields. This pr changes this error to: ``` error[E0027]: pattern does not mention field `1` --> hello.rs:5:12 | 5 | if let Foo { 0: foo } = x { | ^^^^^^^^^^^^^^ missing field `1` | help: include the missing field in the pattern | 5 | if let Foo { 0: foo, 1: _ } = x { | ~~~~~~~~ help: if you don't care about this missing field, you can explicitly ignore it | 5 | if let Foo { 0: foo, .. } = x { | ~~~~~~ ```
2023-04-09Handle not all immediates having `abi::Scalar`sScott McMurray-1/+92
2023-04-09Auto merge of #109684 - fee1-dead-contrib:rv_const_range, r=Mark-Simulacrumbors-6/+49
Revert #104100, Allow using `Range` as an `Iterator` in const contexts. This fixes #109632.
2023-04-09Auto merge of #110041 - fmease:diag-sugg-adding-const-param, r=compiler-errorsbors-0/+88
Suggest defining const parameter when appropriate Helps a bit with #91119. Following #105523's lead, I use placeholder `/* Type */` instead of `_` in the suggestion. It should be easier for newcomers to parse. `@rustbot` label A-diagnostics r? diagnostics
2023-04-09Auto merge of #110101 - JohnTitor:rollup-ol20aw7, r=JohnTitorbors-4/+19
Rollup of 6 pull requests Successful merges: - #110058 (Remove `box_syntax` usage) - #110059 (ignore_git → omit_git_hash) - #110060 (Document that `&T` and `&mut T` are `Sync` if `T` is) - #110074 (Make the "codegen" profile of `config.toml` download and build llvm from source.) - #110086 (Add `max_line_length` to `.editorconfig`, matching rustfmt) - #110096 (Tweak tuple indexing suggestion) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-04-09Rollup merge of #110096 - compiler-errors:tweak-tuple-idx-msg, r=NilstriebYuki Okushi-4/+19
Tweak tuple indexing suggestion Fixes #110091
2023-04-09Auto merge of #109413 - compiler-errors:pointer-like-abi, r=cjgillotbors-14/+22
Enforce that `PointerLike` requires a pointer-like ABI At least temporarily, let's ban coercing things that are pointer-sized and pointer-aligned but *not* `Abi::Scalar(..)` into `dyn*`. See: https://github.com/rust-lang/rust/pull/104694#discussion_r1142522073 This can be lifted in the future if we decie that we *want* to be able to coerce something `repr(C)` into a `dyn*`, but we'll have to figure out what to do with Miri and codegen... r? compiler
2023-04-08Tweak tuple indexing suggestionMichael Goulet-4/+19
2023-04-08Add test for new delayed bug code pathMatthew Jasper-0/+18
2023-04-08Enforce that PointerLike requires a pointer-like ABIMichael Goulet-14/+22
2023-04-08Auto merge of #106281 - JulianKnodt:transmute_const_generics, r=b-naberbors-0/+345
Add ability to transmute (somewhat) with generic consts in arrays Previously if the expression contained generic consts and did not have a directly equivalent type, transmuting the type in this way was forbidden, despite the two sizes being identical. Instead, we should be able to lazily tell if the two consts are identical, and if so allow them to be transmuted. This is done by normalizing the forms of expressions into sorted order of multiplied terms, which is not generic over all expressions, but should handle most cases. This allows for some _basic_ transmutations between types that are equivalent in size without requiring additional stack space at runtime. I only see one other location at which `SizeSkeleton` is being used, and it checks for equality so this shouldn't affect anywhere else that I can tell. See [this Stackoverflow post](https://stackoverflow.com/questions/73085012/transmute-nested-const-generic-array-rust) for what was previously necessary to convert between types. This PR makes converting nested `T -> [T; 1]` transmutes possible, and `[uB*2; N] -> [uB; N * 2]` possible as well. I'm not sure whether this is something that would be wanted, and if it is it definitely should not be insta-stable, so I'd add a feature gate.
2023-04-08bless ui testsDeadbeef-5/+34
2023-04-08Rollup merge of #110037 - notriddle:notriddle/theme-default, r=GuillaumeGomezNilstrieb-0/+24
rustdoc: add test and bug fix for theme defaults Part of https://github.com/rust-lang/rust/issues/66181
2023-04-08Revert "Mark DoubleEndedIterator as #[const_trait] using ↵Deadbeef-1/+15
rustc_do_not_const_check, implement const Iterator and DoubleEndedIterator for Range." This reverts commit 8a9d6bf4fd540b2a2882193cbd6232b86e5dcd7e.
2023-04-08Auto merge of #110043 - ickk:fix_infer_message, r=eholkbors-3/+3
Fix help message for `infer_source_kind_subdiag_let` I discovered there's a double "the" in the help message for E0282.
2023-04-07Auto merge of #109788 - compiler-errors:trait-item-from-non-trait, ↵bors-118/+175
r=petrochenkov More descriptive error when qself path doesnt have a trait on the RHS of `as` `<Ty as Enum>::Assoc` should report that `Enum` is a trait. Main question is whether to eagerly report the error, or raise it with `return Err(..)` -- i'll note that in an inline comment though. cc `@GuillaumeGomez` who said this came up at a Paris Rust meetup. r? `@petrochenkov`
2023-04-07Add feature gatekadmin-10/+187
2023-04-07Auto merge of #109983 - tmiasko:inline-try, r=bjorn3bors-182/+296
Inline try_from and try_into To avoid link time dependency between core and compiler-builtins, when using opt-level that implicitly enables -Zshare-generics. While compiler-builtins should be compiled with -Zshare-generics disabled, the -Zbuild-std does not ensure this at the moment. r? `@bjorn3`
2023-04-07Auto merge of #110036 - jackh726:placeholder_boundvar, r=nnethercotebors-16/+16
Remove u32 on BrAnon and BoundTyKind::Anon in favor of BoundVar on Placeholder types r? `@nnethercote` Better alternative to #110025
2023-04-07Auto merge of #102906 - nbdd0121:mir, r=wesleywiser,tmiaskobors-371/+455
Refactor unwind in MIR This makes unwinding from current `Option<BasicBlock>` into ```rust enum UnwindAction { Continue, Cleanup(BasicBlock), Unreachable, Terminate, } ``` cc `@JakobDegen` `@RalfJung` `@Amanieu`
2023-04-07Fix coverage testGary Guo-1/+1
2023-04-07update tests/uiickk-3/+3
2023-04-07Rewrite added diagnostics as translatableTom Martin-8/+8
Start messages with lowercase
2023-04-07suggest adding const paramLeón Orell Valerian Liehr-0/+88
2023-04-07Use smart-resolve when checking for trait in RHS of UFCSMichael Goulet-118/+175