| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
Closes rust-lang/rfcs#1428
|
|
rustc_codegen_ssa: fix range check in codegen_get_discr.
Fixes #61696, see https://github.com/rust-lang/rust/issues/61696#issuecomment-505473018 for more details.
In short, I had wanted to use `x - a <= b - a` to check whether `x` is in `a..=b` (as it's 1 comparison instead of 2 *and* `b - a` is guaranteed to fit in the same data type, while `b` itself might not), but I ended up with `x - a + c <= b - a + c` instead, because `x - a + c` was the final value needed.
That latter comparison is equivalent to checking that `x` is in `(a - c)..=b`, i.e. it also includes `(a - c)..a`, not just `a..=b`, so if `c` is not `0`, it will cause false positives.
This presented itself as the non-niche ("dataful") variant sometimes being treated like a niche variant, in the presence of uninhabited variants (which made `c`, aka the index of the first niche variant, arbitrarily large).
r? @nagisa, @rkruppe or @oli-obk
|
|
|
|
Therefore we also remove `#[unsafe_destructor_blind_to_params]`
attribute completly.
|
|
|
|
|
|
|
|
|
|
rustc_typeck: correctly compute `Substs` for `Res::SelfCtor`.
Fixes #61882.
r? @petrochenkov cc @varkor
|
|
|
|
|
|
Once::new() has been a stable const fn for a while now.
Closes #61746
|
|
|
|
Rollup of 11 pull requests
Successful merges:
- #60897 (error: remove StringError from Debug output)
- #61304 (Speed up Azure CI installing Windows dependencies)
- #61319 (Swap order of `unsafe async fn` to `async unsafe fn`)
- #61342 (Set ellipsis_inclusive_range_patterns lint to warn)
- #61344 (Add regression test for const generics ICE)
- #61359 (Fix links in Deref documentation)
- #61363 (Stabilize iter_nth_back feature)
- #61369 (Fixed lifetime misspelling)
- #61372 (Migrate some books to mdbook version 0.2)
- #61374 (Explicitly suggest 'type_ascription' feature)
- #61382 (Fixed a typo in core::convert::AsMut)
Failed merges:
r? @ghost
|
|
|
|
|
|
|
|
Remove the unstable and deprecated mpsc_select
This removes macro `select!` and `std::sync::mpsc::{Handle, Select}`,
which were all unstable and have been deprecated since 1.32.
Closes #27800
r? @SimonSapin
|
|
Added ignore-sgx for appropriate tests in src/test
These are all the tests that make sense to ignore when targeting fortanix-unknonw-sgx, at least in test/runpass. Other suites not yet covered.
|
|
This removes macro `select!` and `std::sync::mpsc::{Handle, Select}`,
which were all unstable and have been deprecated since 1.32.
|
|
|
|
|
|
Remove -Z borrowck=compare flag
This is the start of the work that needs to be done on #59193. It just removes the flag and updates
the tests.
r? @matthewjasper
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
By using 'impl trait', it's possible to create a self-referential
type as follows:
fn foo() -> impl Copy { foo }
This is a function which returns itself.
Normally, the signature of this function would be impossible
to write - it would look like 'fn foo() -> fn() -> fn() ...'
e.g. a function which returns a function, which returns a function...
Using 'impl trait' allows us to avoid writing this infinitely long
type. While it's useless for practical purposes, it does compile and run
However, issues arise when we try to generate llvm debuginfo for such a
type. All 'impl trait' types (e.g. ty::Opaque) are resolved when we
generate debuginfo, which can lead to us recursing back to the original
'fn' type when we try to process its return type.
To resolve this, I've modified debuginfo generation to account for these
kinds of weird types. Unfortunately, there's no 'correct' debuginfo that
we can generate - 'impl trait' does not exist in debuginfo, and this
kind of recursive type is impossible to directly represent.
To ensure that we emit *something*, this commit emits dummy
debuginfo/type names whenever it encounters a self-reference. In
practice, this should never happen - it's just to ensure that we can
emit some kind of debuginfo, even if it's not particularly meaningful
Fixes #58463
|
|
|
|
Fix generic argument lookup for Self
Rewrite the SelfCtor early and use the replacement Def when
calculating the path_segs.
Note that this also changes which def is seen by the code that
computes user_self_ty and is_alias_variant_ctor; I don't see a
immediate issue with that, but I'm not 100% clear on the
implications.
Fixes #57924
r? @eddyb
|
|
|
|
Rewrite the SelfCtor early and use the replacement Def when
calculating the path_segs.
Note that this also changes which def is seen by the code that
computes user_self_ty and is_alias_variant_ctor; I don't see a
immediate issue with that, but I'm not 100% clear on the
implications.
Fixes #57924
|
|
|
|
This is required at the very least in order to evaluate associated
constants for arrays (see #58212).
|
|
|
|
|
|
|
|
|
|
|
|
address some FIXME whose associated issues were marked as closed
part of #44366
|
|
|
|
r=nikomatsakis
Less conservative uninhabitedness check
Extends the uninhabitedness check to structs, non-empty enums, tuples and arrays.
Pulled out of #47291 and #50262.
Fixes https://github.com/rust-lang/rust/issues/54586.
r? @nikomatsakis
|
|
pnkfelix:issue-54153-linkage-sometimes-requires-optimizations, r=nikic
fix issue 54153 by not testing issue-18804 on Windows nor OS X.
Fix #54153
|
|
hr_lifetime_in_assoc_type warning
|