| Age | Commit message (Collapse) | Author | Lines |
|
|
|
globals
|
|
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
|
|
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
|
|
Clean up E0502 explanation
r? @Dylan-DPC
|
|
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
|
|
r=nikomatsakis
Remove unused graphviz emitter
This was only used by the old dataflow framework that was removed in #69644.
|
|
Remove duplicated code in trait selection
|
|
Hide `task_context` when lowering body
Fixes https://github.com/rust-lang/rust/issues/70594
|
|
Fix double-free and undefined behaviour in libstd::syn::unix::Thread::new
While working on concurrency support for Miri, I found that the `libstd::syn::unix::Thread::new` method has two potential problems: double-free and undefined behaviour.
**Double-free** could occur if the following events happened (credit for pointing this out goes to @RalfJung):
1. The call to `pthread_create` successfully launched a new thread that executed to completion and deallocated `p`.
2. The call to `pthread_attr_destroy` returned a non-zero value causing the `assert_eq!` to panic.
3. Since `mem::forget(p)` was not yet executed, the destructor of `p` would be executed and cause a double-free.
As far as I understand, this code also violates the stacked-borrows aliasing rules and thus would result in **undefined behaviour** if these rules were adopted. The problem is that the ownership of `p` is passed to the newly created thread before the call to `mem::forget`. Since the call to `mem::forget` is still a call, it counts as a use of `p` and triggers UB.
This pull request changes the code to use `mem::ManuallyDrop` instead of `mem::forget`. As a consequence, in case of a panic, `p` would be potentially leaked, which while undesirable is probably better than double-free or undefined behaviour.
|
|
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.
|
|
Use associated numeric consts in documentation
Now when the associated constants on int/float types are stabilized and the recommended way of accessing said constants (#68952). We can start using it in this repository, and recommend it via documentation example code.
This PR is the reincarnation of #67913 minus the actual adding + stabilization of said constants. (EDIT: Now it's only changing the documentation. So users will see the new consts, but we don't yet update the internal code)
Because of how fast bit rot happens to PRs that touch this many files, it does not try to replace 100% of the old usage of the constants in the entire repo, but a good chunk of them.
|
|
|
|
Fmt code
Update tests
Modify msg
Signed-off-by: Rustin-Liu <rustin.liu@gmail.com>
|
|
|
|
|
|
|
|
Rollup of 6 pull requests
Successful merges:
- #70696 (Extend #69020 test to include reversed operand order.)
- #70706 (Minor cleanup in rustdoc --check-theme)
- #70725 (Avoid `.unwrap()`s on `.span_to_snippet(...)`s)
- #70728 (Minor doc improvements on `AllocRef`)
- #70730 (Fix link in task::Wake docs)
- #70731 (Minor follow-up after renaming librustc(_middle))
Failed merges:
r? @ghost
|
|
|
|
Minor follow-up after renaming librustc(_middle)
Fixes #70537
r? @Centril @eddyb
|
|
Fix link in task::Wake docs
`task::Wake` was introduced in https://github.com/rust-lang/rust/pull/68700. While I was browsing the docs I noticed a link to `sync::Arc` wasn't resolving correctly. This patch fixes that. Thanks!
## Before

## Proposed

|
|
Minor doc improvements on `AllocRef`
r? @Amanieu
|
|
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
|
|
Minor cleanup in rustdoc --check-theme
Expand and remove try_something macro. Since https://github.com/rust-lang/rust/commit/2f6226518bd5085896a0f27cfd3ea396367ecd50 there has been only one invocation.
r? @GuillaumeGomez
|
|
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
|
|
update miri
Fixes https://github.com/rust-lang/rust/issues/70664
r? @ghost Cc @oli-obk
|
|
|
|
|
|
|
|
|
|
|
|
Fix #69841 by updating LLVM submodule.
Fix #69841 by updating LLVM submodule.
Includes regression test for issue 69841.
|
|
|
|
|
|
|
|
Rollup of 5 pull requests
Successful merges:
- #68334 (AArch64 bare-metal targets: Build rust-std)
- #70224 (Clean up rustdoc js testers)
- #70532 (Miri engine: stronger type-based sanity check for assignments)
- #70698 (bootstrap: add `--json-output` for rust-analyzer)
- #70715 (Fix typo in operands section)
Failed merges:
r? @ghost
|
|
Fix typo in operands section
|
|
bootstrap: add `--json-output` for rust-analyzer
Motivation is that this allows us to customize rust-analyzer's "cargo watch" integration to run x.py. You simply have to set the command to run to be `x.py --json-output`
r? @Mark-Simulacrum -- feel free to make changes, this is quick and dirty for sure
|
|
Miri engine: stronger type-based sanity check for assignments
r? @oli-obk @eddyb
Fixes https://github.com/rust-lang/rust/issues/70405
That issue says
> be sure to also add appropriate mutability checks to the patterns (mutable for the source, immutable for the dest)
I decided not to do that because I see no good reason to do it. The engine does not care either way, the assignment will happen correctly.
|
|
Clean up rustdoc js testers
I realized after the improvement made by @ollie27 on the rustdoc-js-tester that a lot of code was actually duplicated. This PR intends to remove this duplication, making it simpler to update in case of future main.js updates.
r? @ollie27
cc @kinnison
|
|
AArch64 bare-metal targets: Build rust-std
This PR complements https://github.com/rust-lang/rust/pull/68253
|
|
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
|
|
Fix typo in u8::to_ascii_uppercase and u8::to_ascii_lowercase
Corrects misspelling of fifth.
|