| Age | Commit message (Collapse) | Author | Lines |
|
Add long error code explanation message for E0627
Part of #61137.
r? @GuillaumeGomez
|
|
Add regression tests for fixed ICEs
Closes #61747 (fixed from 1.41.0-nightly (4007d4ef2 2019-12-01))
Closes #66205 (fixed from 1.41.0-nightly (4007d4ef2 2019-12-01))
Closes #66270 (fixed by #66246)
Closes #67424 (fixed by #67160)
Also picking a minor nit up from #67071 with 101dd7bad9432730fa2f625ae43afcc2929457d4
r? @Centril
|
|
Ensure that evaluating or validating a constant never reads from a static
r? @RalfJung
as per https://github.com/rust-lang/rust/pull/66302#issuecomment-554663387
This does not yet address the fact that evaluation of a constant can read from a static (under unleash-miri)
|
|
Initial implementation of `#![feature(bindings_after_at)]`
Following up on #16053, under the gate `#![feature(bindings_after_at)]`, `x @ Some(y)` is allowed subject to restrictions necessary for soundness.
The implementation and test suite should be fairly complete now.
One aspect that is not covered is the interaction with nested `#![feature(or_patterns)]`.
This is not possible to test at the moment in a good way because that feature has not progressed sufficiently and has fatal errors in MIR building. We should make sure to add such tests before we stabilize both features (but shipping one of them is fine).
r? @pnkfelix
cc @nikomatsakis @matthewjasper @pcwalton
cc https://github.com/rust-lang/rust/issues/65490
|
|
|
|
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
|
|
|
|
Fix ICE in mir interpretation
Indices from the end start at 1 so you can immediately subtract them from the length to get the index instead of having to do an additional `-1`. Kinda documented in https://doc.rust-lang.org/nightly/nightly-rustc/rustc/mir/enum.ProjectionElem.html#variant.ConstantIndex
|
|
Improve diagnostics for invalid assignment
- Improve wording and span information for invalid assignment diagnostics.
- Link to https://github.com/rust-lang/rfcs/issues/372 when it appears the user is trying a destructuring assignment.
- Make the equality constraint in `where` clauses error consistent with the invalid assignment error.
|
|
Remove mem::uninitalized from tests
This purges uses of uninitialized where possible from test cases. Some
are merely moved over to the equally bad pattern of
MaybeUninit::uninit().assume_init() but with an annotation that this is
"the best we can do".
Fixes #62397
|
|
Require const stability attributes on intrinsics to be able to use them in constant contexts
r? @Centril
finally fixes #61495
cc @RalfJung
|
|
|
|
and some uses of it will be illegal forever
(e.g. mutable or interior mutable statics)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Under the gate, `x @ Some(y)` is allowed.
This is subject to various restrictions for soundness.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This purges uses of uninitialized where possible from test cases. Some
are merely moved over to the equally bad pattern of
MaybeUninit::uninit().assume_init() but with an annotation that this is
"the best we can do".
|
|
It is unclear why this changed, but since it seems like a harmless
change, we're going to move forward with reformatting.
|
|
|
|
|
|
|
|
|
|
|
|
Rollup of 6 pull requests
Successful merges:
- #67148 ( Refactor type & bounds parsing thoroughly)
- #67410 (Reenable static linking of libstdc++ on windows-gnu)
- #67439 (Cleanup `lower_pattern_unadjusted` & Improve slice pat typeck)
- #67480 (Require issue = "none" over issue = "0" in unstable attributes)
- #67500 (Tweak non_shorthand_field_patterns' suggestion)
- #67504 (Warn against relying on ?Sized being last)
Failed merges:
r? @ghost
|
|
Tweak non_shorthand_field_patterns' suggestion
Fixes #66434
r? @estebank
|
|
Require issue = "none" over issue = "0" in unstable attributes
These changes make the use of `issue = "none"` required in unstable attributes throughout the compiler.
Notes:
- #66299 is now in beta so `issue = "none"` is accepted.
- The `tidy` tool now fails on `issue = "0"`.
- Tests that used `issue = "0"` were changed to use `issue = "none"`, except for _one_ that asserts `issue = "0"` can still be used.
- The compiler still allows `issue = "0"` because some submodules require it, this could be disallowed once these are updated.
Resolves #41260
r? @varkor
|
|
Refactor type & bounds parsing thoroughly
PR is based on https://github.com/rust-lang/rust/pull/67131 with first one from this PR being ` extract parse_ty_tuple_or_parens`.
Also fixes #67146.
r? @estebank
|
|
Revamp `// run-fail` wrt. `--pass` & support `// build-fail` & `// check-fail`
Revamp how `// run-fail` tests work internally by having a separate `FailMode` that does not interfere with `PassMode`. In particular, `--pass check` will now have no effect on `// *-fail` tests. Moreover, new test annotations `// check-fail` (the default) and `// build-fail` are added. The latter is useful to distinguish post-monomorphization failures from pre-monomorphization failures as seen throughout the PR. Finally, ensure that non-`Ui` tests do not listen to `--pass check` such that the flag can be used with e.g. `./x.py test --pass check` directly.
Fixes #66929.
Fixes #67128.
r? @petrochenkov
cc @RalfJung @ninjasource
|
|
|
|
|
|
|
|
|
|
|