| Age | Commit message (Collapse) | Author | Lines |
|
When encountering an Item in a pat context, point at the item def
```
error[E0308]: mismatched types
--> $DIR/const-in-struct-pat.rs:8:17
|
LL | struct foo;
| ----------- `foo` defined here
...
LL | let Thing { foo } = t;
| ^^^ expected struct `std::string::String`, found struct `foo`
|
= note: `foo` is interpreted as a unit struct, not a new binding
help: you can bind the struct field to a different name
|
LL | let Thing { foo: other_foo } = t;
| ^^^^^^^^^^^^^^
```
```
error[E0308]: mismatched types
--> $DIR/const.rs:14:9
|
LL | const FOO: Foo = Foo{bar: 5};
| ----------------------------- constant defined here
...
LL | FOO => {},
| ^^^
| |
| expected `&Foo`, found struct `Foo`
| `FOO` is interpreted as a constant, not a new binding
| help: use different name to introduce a new binding: `other_foo`
```
Fix #55631, fix #48062, cc #42876.
|
|
|
|
Do not ICE when matching an uninhabited enum's field
Fix #69191
|
|
(And added Ralf's suggested test.)
Added my own three-variant multi-variant as well.
|
|
`delay_span_bug` when codegen cannot select obligation
Fix #69602, introduced in #60126 by letting the compiler continue past
type checking after encountering errors.
|
|
|
|
and renamed 'recursion_limit' in limits.rs to simple 'limit' because it does handle other limits too.
|
|
|
|
rename feature to const_eval_limit
|
|
defaults to 1_000_000
|
|
|
|
Rollup of 6 pull requests
Successful merges:
- #69565 (miri engine: turn some debug_assert into assert)
- #69621 (use question mark operator in a few places.)
- #69650 (cleanup more iterator usages (and other things))
- #69653 (use conditions directly)
- #69665 (Invoke OptimizerLastEPCallbacks in PreLinkThinLTO)
- #69670 (Add explanation for E0379)
Failed merges:
r? @ghost
|
|
Invoke OptimizerLastEPCallbacks in PreLinkThinLTO
The default ThinLTO pre-link pipeline does not include optimizer last
extension points. Thus, when using the new LLVM pass manager & ThinLTO
& sanitizers on any opt-level different from zero, the sanitizer
function passes would be omitted from the pipeline.
Add optimizer last extensions points manually to the pipeline, but guard
registration with stage check in the case this behaviour changes in the
future.
|
|
encode `;` stmt without expr as `StmtKind::Empty`
Instead of encoding `;` statements without a an expression as a tuple in AST, encode it as `ast::StmtKind::Empty`.
r? @petrochenkov
|
|
Improve linking of crates with circular dependencies
Previously, the code responsible for handling the cycles between crates
introduces through weak lang items, would keep a set of missing language
items:
* extending it with items missing from the current crate,
* removing items provided by the current crate,
* grouping the crates when the set changed from non-empty back to empty.
This could produce incorrect results, if a lang item was missing from a
crate that comes after the crate that provides it (in the loop iteration
order). In that case the grouping would not take place.
The changes here address this specific failure scenario by keeping track
of two separate sets of crates. Those that are required to link successfully,
and those that are available for linking.
Verified using test case from #69368.
|
|
|
|
r=davidtwco
doc(librustc_error_codes): add long error explanation for E0719
Reference issue #61137
- Updated error_codes.rs
- Added E0719.md in error_codes
- Updated necessary test .stderr files
|
|
Remove `usable_size` APIs
This removes the usable size APIs:
- remove `usable_size` (obv)
- change return type of allocating methods to include the allocated size
- remove `_excess` API
r? @Amanieu
closes rust-lang/wg-allocators#17
|
|
Match `@__msan_keep_going = weak_odr constant i32 1`.
|
|
Additionally verify that the current implementation of LLVM version
check (which uses lexicographic ordering) is good enough to exclude
versions before LLVM 9, where the new LLVM pass manager is unsupported.
|
|
|
|
|
|
Rollup of 6 pull requests
Successful merges:
- #68682 (Add documentation to compiler intrinsics)
- #69544 (Unrevert "Remove `checked_add` in `Layout::repeat`")
- #69617 (constify mem::forget)
- #69622 (Rename `syntax` in librustc_ast/README.md)
- #69623 (stash API: remove panic to fix ICE.)
- #69624 (Toolstate: Don't block beta week on already broken tools.)
Failed merges:
- #69626 (Toolstate: don't duplicate nightly tool list.)
r? @ghost
|
|
stash API: remove panic to fix ICE.
Implements the temporary solution suggested in https://github.com/rust-lang/rust/pull/69537#issuecomment-593143975.
Fixes https://github.com/rust-lang/rust/issues/69396.
r? @petrochenkov
|
|
Adjust Miri value visitor, and doc-comment layout components
I realized that I still didn't have quite the right intuition for how our `LayoutDetails` work, so I had to adjust the Miri value visitor to the things I understood better now. I also added some doc-comments to `LayoutDetails` as a hopefully canonical place to note such things.
The main visitor change is that we *first* look at all the fields (according to `FieldPlacement`), and *then* check the variants and handle `Multiple` appropriately. I did not quite realize how orthogonal "fields" and "variants" are.
I also moved the check for the scalar ABI to *after* checking all the fields; this leads to better (more type-driven) error messages.
And it looks like we can finally remove that magic hack for `ty::Generator`. :D
r? @oli-obk for the Miri/visitor changes and @eddyb for the layout docs
The Miri PR is at: https://github.com/rust-lang/miri/pull/1178
|
|
|
|
|
|
* Add a new method `has_infer_types_or_consts` that's used instead most
of the time, since there's generally no reason to only consider types.
* Remove use of `has_closure_types`, because closures are no longer
implicitly linked to the `InferCtxt`.
|
|
Progresses #61137
|
|
Fix #69602, introduced in #60126 by letting the compiler continue past
type checking after encountering errors.
|
|
rustdoc: HTML escape crate version
As `--crate-version` accepts arbitrary strings they need to be escaped.
r? @GuillaumeGomez
|
|
Use `opt_def_id()` over `def_id()`
Fixes #69588
|
|
Do not ICE on invalid type node after parse recovery
Closes #69378.
r? @estebank
|
|
|
|
As `--crate-version` accepts arbitrary strings they need to be escaped.
|
|
|
|
|
|
Create E0747 error code for unterminated raw strings
Reopening of #66035.
r? @estebank
|
|
|
|
Add more context to E0599 errors
Point at the intermediary unfulfilled trait bounds.
Fix #52523, fix #61661, cc #36513, fix #68131, fix #64417, fix #61768, cc #57457, cc #9082, fix #57994, cc #64934, cc #65149.
|
|
Get around #53081.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|