| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Add `ConstKind::Error` and convert `ErrorHandled::Reported` to it.
By replicating the `ty::Error` approach to encoding "an error has occurred", all of the mechanisms that skip redundant/downstream errors are engaged and help out (see the reduction in test output).
This PR also adds `ErrorHandled::Linted` for the lint case because using `ErrorHandled::Reported` *without* having emitted an error that is *guaranteed* to stop compilation, is incorrect now.
r? @oli-obk cc @rust-lang/wg-const-eval @varkor @yodaldevoid
|
|
rustc_target::abi: add Primitive variant to FieldsShape.
Originally suggested by @eddyb.
|
|
Rollup of 7 pull requests
Successful merges:
- #70578 (Add long error explanation for E0657)
- #70910 (Hides default fns inside Fuse impl to avoid exposing it to any crate)
- #71164 (reword Miri validity errors: undefined -> uninitialized)
- #71182 (Add some regression tests)
- #71206 (Miri error messages: avoid try terminology)
- #71220 (Dogfood or_patterns in the standard library)
- #71225 (Fix typo in Default trait docs: Provides -> Provide)
Failed merges:
r? @ghost
|
|
Miri error messages: avoid try terminology
r? @oli-obk
|
|
Add some regression tests
Closes #24843
Closes #28575
Closes #54067
Closes #66868
Closes #67893
Closes #68813
|
|
reword Miri validity errors: undefined -> uninitialized
I don't think we say "undefined value" or anything like that anywhere in the docs or so, but we do use the term "uninitialized memory", so I think we should do the same here.
Longer-term, I think we should also internally rename "undef" to "uninit".
r? @oli-obk
|
|
Add long error explanation for E0657
Added proper error explanation for issue E0657 in the Rust compiler.
Part of #61137
r? @GuillaumeGomez
|
|
pnkfelix:issue-69798-dont-reuse-post-lto-products-when-exports-change, r=nagisa
Do not reuse post LTO products when exports change
Do not reuse post lto products when exports change
Generalizes code from PR #67020, which handled case when imports change.
Fix #69798
|
|
r=GuillaumeGomez
Add long error explanation for E0708 #61137
Add long explanation for the E0708 error code
Part of #61137
r? @GuillaumeGomez
|
|
|
|
|
|
|
|
|
|
|
|
Rollup of 5 pull requests
Successful merges:
- #70566 (Don't bail out before linting in generic contexts.)
- #71141 (Provide better compiler output when using `?` on `Option` in fn returning `Result` and vice-versa)
- #71149 (remove an impossible branch from check_consts)
- #71179 (fix more clippy warnings)
- #71191 (Clean up E0520 explanation)
Failed merges:
r? @ghost
|
|
|
|
|
|
|
|
|
|
Provide better compiler output when using `?` on `Option` in fn returning `Result` and vice-versa
Fixes #71089
|
|
Don't bail out before linting in generic contexts.
Fixes #69021.
cc #70017
r? @RalfJung
|
|
r=oli-obk
[mir-opt] Run SimplifyLocals to a fixedpoint and handle most rvalues
Follow up to review feedback left on #70595.
|
|
|
|
|
|
Remove a stack frame from .await calls
The stack frames when `.await`ing one async fn from another currently look like this:
```
12: foo::b::{{closure}}
at src/main.rs:2
13: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
at /home/sfackler/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/future/mod.rs:66
14: core::future::poll_with_context
at /home/sfackler/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/future/mod.rs:84
15: foo::a::{{closure}}
at src/main.rs:6
```
Since the move away from using TLS to pass the Context around, it's now easy to remove frame 14 by removing poll_with_context in favor of calling Future::poll directly. This still leaves the `GenFuture` frame, but that seems significantly harder to deal with.
It also improves diagnostics a bit since they no longer talk about the private poll_with_context function.
|
|
|
|
|
|
|
|
|
|
`Result` and vice-versa
|
|
unit rvalue, use constant `()` instead of tuple
fixes #70886
r? @eddyb
|
|
Rollup of 8 pull requests
Successful merges:
- #70657 (Allow `try`-blocks in places where an open delim is expected)
- #70947 (tighten CTFE safety net for accesses to globals)
- #70949 (simplify `vec!` macro)
- #71002 (fix target & runtool args order)
- #71082 (ptr: introduce len() method on raw slices)
- #71128 (Remove unused single_step flag)
- #71133 (Tighten time complexity on the doc of sort_by_key)
- #71135 (Update books)
Failed merges:
r? @ghost
|
|
|
|
- Change to warnings so that all lints are emitted
- Expect build-pass
- Change placeholder FIXME to WARN.
|
|
`Result` and vice-versa
|
|
|
|
|
|
|
|
|
|
appropriately.
|
|
Namely, a regression test for issue #69798 (export added), and the inverse of
that test (export removd).
|
|
|
|
Improve async-await/generator obligation errors in some cases
Fixes #68112.
This change is best read one commit at a time (I add a test at the beginning and update it in each change after).
The `test2` function is a case I found while writing the test that we don't handle with this code yet. I don't attempt to fix it in this PR, but it's a good candidate for future work.
r? @davidtwco, @nikomatsakis
|
|
Rename AssocKind::Method to AssocKind::Fn
Part of https://github.com/rust-lang/rust/issues/60163.
https://github.com/rust-lang/rust/issues/60163#issuecomment-607284413
|
|
|
|
|
|
|
|
|
|
|