| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Don't import integer and float modules, use assoc consts 2
Follow up to #70777. I missed quite a lot of places. Partially because I wanted to keep the size of the last PR down, and partially because my regexes were not good enough :)
r? @dtolnay
|
|
ty/walk: iterate `GenericArg`s instead of `Ty`s.
Before this PR, `Ty::walk` only iterated over `Ty`s, but that's becoming an increasing problem with `const` generics, as `ty::Const`s in `Substs` are missed by it.
By working with `GenericArg` instead, we can handle both `Ty`s and `ty::Const`s, but also `ty::Region`s, which used to require ad-hoc mechanisms such as `push_regions`.
I've also removed `TraitRef::input_types`, as it's both long obsolete, and easy to misuse.
|
|
|
|
|
|
Miri terminator handling: only do progress sanity check for 'Call' terminator
This will still catch mistakes in bad intrinsic/foreign-item shims, which is the main source of errors here.
Fixes https://github.com/rust-lang/rust/issues/70723
r? @oli-obk
|
|
|
|
Use smaller span for suggestion restricting lifetime
|
|
def_collector, visit_fn: account for no body
Fixes #70736
r? @petrochenkov
|
|
Tweak output of type params and constraints in the wrong order
r? @Centril @varkor
|
|
Using a single label for constraints and generic arguments.
|
|
|
|
|
|
"cannot resolve" → "cannot satisfy"
CC #66523
r? @Centril
|
|
|
|
|
|
Enable layout debugging for `impl Trait` type aliases
I also made it print the actual type name that the alias picks under the hood.
|
|
|
|
|
|
fix Miri assignment sanity check
Thanks @eddyb for pointing me to the right APIs!
r? @eddyb
Fixes https://github.com/rust-lang/rust/issues/70804
|
|
|
|
macro_rules: `NtLifetime` cannot start with an identifier
Fixes https://github.com/rust-lang/rust/issues/70446
|
|
Do not disable field reordering on enums with big discriminant
The field are always re-ordered to minimize padding, regardless of the
alignment of the discriminant
(spinoff from #70477)
|
|
|
|
typeck/type_of: let wfcheck handle generics in opaque types' substs.
I was working on #70164, and `type_of`'s handling of opaque types seemed to be, by far, the trickiest use of `Ty::walk`, but I believe it wasn't doing anything (see https://github.com/rust-lang/rust/pull/57896#discussion_r396064431 - I suspect, based on glancing at the PR discussion, that an early attempt was kept in, despite becoming just an overcomplicated way to do exactly the same as the previous simple type equality check).
I would've loved to remove `ResolvedOpaqueTy` (keep the `Ty` and lose the `Substs`), but it looks like the MIR borrowck part of the process needs that now, so it would've been added anyway since #57896, even if that PR hadn't happened.
<hr/>
In the process, I've moved the remaining substitution validation to `wfcheck`, which was already handling lifetimes, and kept only `delay_span_bug`s in `type_of`, as an insurance policy.
I've added tests for lifetime and const cases, they seem to be checked correctly now.
(and more uniform than they were in https://github.com/rust-lang/rust/issues/63063#issuecomment-602162804)
However, the quality of the errors is maybe a bit worse, and they don't trigger when there are other errors (not sure if this is due to compilation stop points or something more specific to one opaque type).
r? @nikomatsakis cc @matthewjasper @oli-obk @Aaron1011
|
|
|
|
|
|
|
|
|
|
|
|
The field are always re-ordered to minimize padding, regardless of the
alignment of the discriminant
|
|
Add test for #59023
Adds a test for https://github.com/rust-lang/rust/issues/59023
Closes https://github.com/rust-lang/rust/issues/59023
|
|
Place TLS initializers with relocations in .tdata
Should fix #70673, although I'm not sure how to test this. Perhaps @joshlf could find a MCVE?
Also adds more context to the FIXME.
r? @oli-obk
|
|
Hide `task_context` when lowering body
Fixes https://github.com/rust-lang/rust/issues/70594
|
|
Update the description of the ticket to point at RFC 1721
Fixes #70538.
My first PR to rust. So please let me know if I'm doing something wrong.
|
|
|
|
Fmt code
Update tests
Modify msg
Signed-off-by: Rustin-Liu <rustin.liu@gmail.com>
|
|
|
|
|
|
Avoid `.unwrap()`s on `.span_to_snippet(...)`s
First commit fixes https://github.com/rust-lang/rust/issues/70724 and the others fix similar issues found by grepping.
r? @estebank
|
|
Extend #69020 test to include reversed operand order.
Make sure we still emit if a lint if the generic argument comes first. See https://github.com/rust-lang/rust/pull/70566#issuecomment-607671340.
r? @RalfJung
|
|
Fix #69841 by updating LLVM submodule.
Fix #69841 by updating LLVM submodule.
Includes regression test for issue 69841.
|
|
Translate the virtual `/rustc/$hash` prefix back to a real directory.
Closes #53486 and fixes #53081, by undoing the remapping to `/rustc/$hash` on the fly, when appropriate (e.g. our testsuites, or user crates that depend on `libstd`), but not during the Rust build itself (as that could leak the absolute build directory into the artifacts, breaking deterministic builds).
Tested locally by setting `remap-debuginfo = true` in `config.toml`, which without these changes, was causing 56 tests to fail (see https://github.com/rust-lang/rust/issues/53081#issuecomment-606703215 for more details).
cc @Mark-Simulacrum @alexcrichton @ehuss
|
|
|
|
Also, fix the goofy reversed names with something clearer.
|
|
Unerase regions in infer_placeholder_type
closes #70608
|
|
|
|
|
|
Make sure we check the case where the generic operand comes first, in
case any future changes make this ordering matter.
|
|
Handle unterminated raw strings with no #s properly
The modified code to handle parsing raw strings didn't properly account for the case where there was no "#" on either end and erroneously reported this strings as complete. This lead to a panic trying to read off the end of the file.
Fixes #70677
r? @petrochenkov
cc @Centril
|