| 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
|
|
Keep codegen units unmerged when building compiler builtins
Make it possible to control how mono items are partitioned into code generation
units, when compiling the compiler builtins, by retaining the original partitioning.
Helps with #48625, #61063, #67960, #70489.
r? @alexcrichton
|
|
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
|
|
Do not lose or reorder user-provided linker arguments
Linker arguments are potentially order-dependent, so the order in which `-C link-arg` and `-C link-args` options are passed to `rustc` should be preserved when they are passed further to the linker.
Also, multiple `-C link-args` options are now appended to each other rather than overwrite each other.
In other words, `-C link-arg=a -C link-args="b c" -C link-args="d e" -C link-arg=f` is now passed as `"a" "b" "c" "d" "e" "f"` and not as `"d" "e" "a" "f"`.
Addresses https://github.com/rust-lang/rust/pull/70505#issuecomment-606780163.
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
Add hash of source files in debug info
LLVM supports placing the hash of source files inside the debug info.
This information can be used by a debugger to verify that the source code matches
the executable.
This change adds support for both hash algorithms supported by LLVM, MD5 and SHA1, controlled by a target option.
* DWARF only supports MD5
* LLVM IR supports MD5 and SHA1 (and SHA256 in LLVM 11).
* CodeView (.PDB) supports MD5, SHA1, and SHA256.
Fixes #68980.
Tracking issue: #70401
rustc dev guide PR with further details: https://github.com/rust-lang/rustc-dev-guide/pull/623
|
|
Make the rustc respect the `-C codegen-units` flag in incremental mode.
This PR implements (the as of yet unapproved) major change proposal at https://github.com/rust-lang/compiler-team/issues/245. See the description there for background and rationale.
The changes are pretty straightforward and should be easy to rebase if the proposal gets accepted at some point.
r? @nikomatsakis cc @pnkfelix
|
|
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
|
|
|