about summary refs log tree commit diff
path: root/src/test/ui
AgeCommit message (Collapse)AuthorLines
2022-11-07Get spans for a couple more region types, add some optimizations, and extend ↵Jack Huey-3/+76
test
2022-11-07Add an optional Span to BrAnon and use it to print better error for HRTB ↵Jack Huey-0/+45
error from generator interior
2022-11-07Reworked const fn ref testsonestacked-14/+59
2022-11-07Fix `const_fn_trait_ref_impl`, add test for itonestacked-0/+35
2022-11-07Rollup merge of #104090 - wanghaha-dev:master, r=Dylan-DPCDylan DPC-1/+1
Modify comment syntax error Modify comment syntax error
2022-11-07Rollup merge of #104038 - compiler-errors:super-norm-closure-sig, r=lcnrDylan DPC-0/+17
Normalize types when deducing closure signature from supertraits Elaborated supertraits should be normalized, since there's no guarantee they don't contain projections :sweat_smile: Fixes #104025 r? types
2022-11-07Rollup merge of #104003 - c410-f3r:moar-errors, r=petrochenkovDylan DPC-0/+0
Move some tests to more reasonable directories r? `@petrochenkov`
2022-11-07Rollup merge of #103986 - ↵Dylan DPC-0/+219
compiler-errors:oh-no-bad-block-should-not-have-label, r=lcnr Don't silently eat label before block in block-like expr Fixes #103983 cc #92823 (where the regression was introduced)
2022-11-07Update issue-50814.rs test resultJannis Christopher Köhl-9/+23
2022-11-07Modify comment syntax errorwanghaha-dev-1/+1
2022-11-07Rollup merge of #103914 - nnethercote:close-42326, r=petrochenkovYuki Okushi-9/+21
Make underscore_literal_suffix a hard error. It's been a warning for 5.5 years. Time to make it a hard error. Closes #42326. r? ``@pnkfelix``
2022-11-07Make underscore_literal_suffix a hard error.Nicholas Nethercote-9/+21
It's been a warning for 5.5 years. Time to make it a hard error. Closes #42326.
2022-11-06Limit efiapi calling convention to supported archesNicholas Bishop-99/+127
Supported architectures in UEFI are described here: https://uefi.org/specs/UEFI/2.10/02_Overview.html#calling-conventions Changes to tests modeled on 8240e7aa101815e2009c7d03b33dd2566d843e73. https://github.com/rust-lang/rust/issues/65815
2022-11-06Auto merge of #99943 - compiler-errors:tuple-trait, r=jackh726bors-178/+309
Implement `std::marker::Tuple`, use it in `extern "rust-call"` and `Fn`-family traits Implements rust-lang/compiler-team#537 I made a few opinionated decisions in this implementation, specifically: 1. Enforcing `extern "rust-call"` on fn items during wfcheck, 2. Enforcing this for all functions (not just ones that have bodies), 3. Gating this `Tuple` marker trait behind its own feature, instead of grouping it into (e.g.) `unboxed_closures`. Still needing to be done: 1. Enforce that `extern "rust-call"` `fn`-ptrs are well-formed only if they have 1/2 args and the second one implements `Tuple`. (Doing this would fix ICE in #66696.) 2. Deny all explicit/user `impl`s of the `Tuple` trait, kinda like `Sized`. 3. Fixing `Tuple` trait built-in impl for chalk, so that chalkification tests are un-broken. Open questions: 1. Does this need t-lang or t-libs signoff? Fixes #99820
2022-11-06fixyfixfixBoxy-24/+54
2022-11-06Auto merge of #104043 - matthiaskrgr:rollup-sttf9e8, r=matthiaskrgrbors-0/+81
Rollup of 7 pull requests Successful merges: - #103012 (Suggest use .. to fill in the rest of the fields of Struct) - #103851 (Fix json flag in bootstrap doc) - #103990 (rustdoc: clean up `.logo-container` layout CSS) - #104002 (fix a comment in UnsafeCell::new) - #104014 (Migrate test-arrow to CSS variables) - #104016 (Add internal descriptions to a few queries) - #104035 (Add 'closure match' test to weird-exprs.rs.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-11-06Rollup merge of #104035 - m-ou-se:weird-expr-closure-match, r=compiler-errorsMatthias Krüger-0/+11
Add 'closure match' test to weird-exprs.rs. Having fun with patterns that look like closures.
2022-11-06Rollup merge of #103012 - chenyukang:fix-102806, r=davidtwco,compiler-errorsMatthias Krüger-0/+70
Suggest use .. to fill in the rest of the fields of Struct Fixes #102806
2022-11-06Auto merge of #102618 - aliemjay:simplify-closure-promote, r=compiler-errorsbors-91/+70
rework applying closure requirements in borrowck Previously the promoted closure constraints were registered under the category `ConstraintCategory::ClosureBounds` in `type_check::prove_closure_bounds()` and then mapped back their original category in `regions_infer::best_blame_constraint` using the complicated map `closure_bounds_mapping`. Now we're registering promoted constraints under their original category and span earlier in `type_check::prove_closure_bounds`. See commit messages. Fixes #99245
2022-11-06Normalize signature when deducing closure signature from supertraitsMichael Goulet-0/+17
2022-11-06Add more nonsense to weird-exprs.rs.Mara Bos-0/+11
2022-11-05Rebase and update testclubby789-1/+1
2022-11-05Update UI testclubby789-2/+2
2022-11-05Split non-fixable case to different testclubby789-11/+38
2022-11-05Attempt to fix arguments of associated functionsclubby789-56/+69
2022-11-05Use `FmtPrinter` instead of creating `Instance`clubby789-5/+115
2022-11-05Update UI testclubby789-1/+1
2022-11-05Fix unused_must_use warning for Box::from_rawAnett Seeker-1/+1
2022-11-05Auto merge of #102458 - JohnTitor:stabilize-instruction-set, r=oli-obkbors-45/+6
Stabilize the `instruction_set` feature Closes https://github.com/rust-lang/rust/issues/74727 FCP is complete on https://github.com/rust-lang/rust/issues/74727#issuecomment-1242773253 r? `@pnkfelix` and/or `@nikomatsakis` cc `@xd009642` Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-11-05Merge conflicts and rebase onto masterMichael Goulet-27/+26
2022-11-05Bless chalk testsMichael Goulet-12/+42
2022-11-05Adjust diagnostics, bless testsMichael Goulet-148/+250
2022-11-05Rollup merge of #103927 - ↵Matthias Krüger-0/+30
fee1-dead-contrib:E0425-no-typo-when-pattern-matching, r=cjgillot Do not make typo suggestions when suggesting pattern matching Fixes #103909.
2022-11-05Do not make typo suggestions when suggesting pattern matchingDeadbeef-0/+30
Fixes #103909.
2022-11-05Auto merge of #103831 - chenyukang:yukang/fix-103751-ice, r=nagisabors-0/+53
Fix capacity overflow issue during transmutability check Fixes #103751
2022-11-05Move some tests to more reasonable directoriesCaio-0/+0
2022-11-05privacy: Print effective visibilities of constructorsVadim Petrochenkov-16/+30
2022-11-05resolve: More detailed effective visibility tracking for importsVadim Petrochenkov-2/+49
Also drop `extern` blocks from the effective visibility table, they are nominally private and it doesn't make sense to keep them there.
2022-11-05Rollup merge of #103994 - clubby789:break-unlabeled, r=TaKO8KiDylan DPC-27/+27
Specify that `break` cannot be used outside of loop *or* labeled block Closes #103981 `@rustbot` label +A-diagnostics
2022-11-05Rollup merge of #103867 - compiler-errors:no-has-errors, r=cjgillotDylan DPC-5/+19
Remove `has_errors` from `FnCtxt` It doesn't seem like this `has_errors` flag actually suppresses any errors (at least in the UI test suite) --- except for one test (`E0767.rs`), and I think that error really should be considered legitimate, since it has nothing to do with the error code and continues to exist after you fix the first error... This flag was added by ```@eddyb``` in 6b3cc0b8c8094407a3b5ea75f946c682d6d0142a, and it's likely that it was made redundant due to subsequent restructuring of the compiler. It only affects block type-checking anyways, so its effect does seem limited these days anyway.
2022-11-05Rollup merge of #103621 - fee1-dead-contrib:iat-fix-use, r=cjgillotDylan DPC-52/+49
Correctly resolve Inherent Associated Types I don't know if this is the best way to do this, but at least it is one way.
2022-11-05use spans in TypeTest rather than mir::LocationAli MJ Al-Nasrawy-89/+65
Spans are independent of the body being borrow-checked, so they don't need remapping when promoting type-tests and they yield more specific error spans inside bodies of closures/inline consts.
2022-11-05simplify applying closure requirementsAli MJ Al-Nasrawy-2/+5
Don't use `ConstraintCategory::ClosureBounds`! Set the category and the span for the promoted constraints to that of the original constraint earlier than before. This eliminates the need for `closure_bounds_mapping`.
2022-11-05Specify that `break` cannot be used outside of loop *or* labeled blockclubby789-27/+27
2022-11-04Auto merge of #103298 - ferrocene:pa-compile-flags-last, r=jyn514bors-0/+9
Ensure that compile-flags arguments are the last in UI tests Before this PR, compiletest would add `-L path/to/aux` at the end of the rustc flags, even after the custom ones set with the compile-flags header comment. This made it impossible to check how rustc would behave when a flag requiring an argument was passed without the argument, because the argument would become `-L`. This PR fixes that by adding the `-L path/to/aux` before the arguments defined in compile-flags, at least for UI tests. Other test suites might either be fixed as well by this change, or still present the old behavior (`-L` is now always passed before, but other tests suites might add additional flags after the custom ones).
2022-11-04Don't silently eat label before block in block-like exprMichael Goulet-0/+219
2022-11-04Rollup merge of #103964 - clubby789:lint-enclosing-unsafe, r=compiler-errorsMatthias Krüger-0/+50
Give a specific lint for unsafety not being inherited In cases like ```rs static mut FOO: u64 = 0; fn main() { unsafe {static BAR: u64 = FOO;} } ``` and ```rs fn foo() { unsafe { fn bar() { unsafe_call(); } } } ``` Specifically inform the user that the unsafety is not inherited for the seperate enclosing items Fixes #94077 r? compiler-errors `@rustbot` label +A-diagnostics
2022-11-04Rollup merge of #103897 - Amanieu:llvm-58384, r=davidtwcoMatthias Krüger-0/+16
asm: Work around LLVM bug on AArch64 Upstream issue: https://github.com/llvm/llvm-project/issues/58384 LLVM gets confused if we assign a 32-bit value to a 64-bit register, so pass the 32-bit register name to LLVM in that case.
2022-11-04Rollup merge of #103681 - RalfJung:libtest-thread, r=thomccMatthias Krüger-2/+2
libtest: run all tests in their own thread, if supported by the host This reverts the threading changes of https://github.com/rust-lang/rust/pull/56243, which made it so that with `-j1`, the test harness does not spawn any threads. Those changes were done to enable Miri to run the test harness, but Miri supports threads nowadays, so this is no longer needed. Using a thread for each test is useful because the thread's name can be set to the test's name which makes panic messages consistent between `-j1` and `-j2` runs and also a bit more readable. I did not revert the HashMap changes of https://github.com/rust-lang/rust/pull/56243; using a deterministic map seems fine for the test harness and the more deterministic testing is the better. Fixes https://github.com/rust-lang/rust/issues/59122 Fixes https://github.com/rust-lang/rust/issues/70492
2022-11-04Rollup merge of #103397 - crlf0710:port_dead_code_lint, r=davidtwcoMatthias Krüger-6/+6
Port `dead_code` lints to be translatable. This adds an additional comma to lists with three or more items, to be consistent with list formatters like `icu4x`. r? `@davidtwco`