| Age | Commit message (Collapse) | Author | Lines |
|
test
|
|
error from generator interior
|
|
|
|
|
|
Modify comment syntax error
Modify comment syntax error
|
|
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
|
|
Move some tests to more reasonable directories
r? `@petrochenkov`
|
|
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)
|
|
|
|
|
|
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``
|
|
It's been a warning for 5.5 years. Time to make it a hard error.
Closes #42326.
|
|
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
|
|
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
|
|
|
|
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
|
|
Add 'closure match' test to weird-exprs.rs.
Having fun with patterns that look like closures.
|
|
Suggest use .. to fill in the rest of the fields of Struct
Fixes #102806
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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>
|
|
|
|
|
|
|
|
fee1-dead-contrib:E0425-no-typo-when-pattern-matching, r=cjgillot
Do not make typo suggestions when suggesting pattern matching
Fixes #103909.
|
|
Fixes #103909.
|
|
Fix capacity overflow issue during transmutability check
Fixes #103751
|
|
|
|
|
|
Also drop `extern` blocks from the effective visibility table, they are nominally private and it doesn't make sense to keep them there.
|
|
Specify that `break` cannot be used outside of loop *or* labeled block
Closes #103981
`@rustbot` label +A-diagnostics
|
|
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.
|
|
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.
|
|
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.
|
|
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`.
|
|
|
|
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).
|
|
|
|
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
|
|
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.
|
|
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
|
|
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`
|