We are heading towards deeper integration with the region inference
system in infcx; in particular, prior to the creation of the
`RegionInferenceContext`, it will be the "owner" of the set of region
variables.
examples in Cow::into_owned don't need to wrap result in Cows
This totally confused me until i triple-checked the actual return value and opened the examples in the playground myself.
r? @rust-lang/docs
Add context to E0084, E0517, E0518
A small diagnostic enhancement to get my feet wet. Please scrutinize!
This modifies errors E0084, E0517, and E0518 to include both the annotation and the annotated item. All of these errors already had labels; I moved the label to the other span, and rephrased it as necessary.
Fixes#45886
avoid the pprust infrastructure in macro expansion
This changes macro expansion to format the path of a macro directly
instead of usng the pprust infrastructure. The pprust infrastructure
tries to perform line-breaking in a slow fashion, which is undesired
when formatting the path of a macro.
This should to speed up expansion by a fair amount (I saw 20% on a
profiler on `rustc_mir`, and 50% of the time marked as "expansion" in
the profiler/time-passes is actually spent loading dependencies).
r? @jseyfried
check_unsafety: fix unused unsafe block duplication
The duplicate error message is later removed by error message
deduplication, but it still appears on beta and is still a bug.
r? @eddyb
Enable TrapUnreachable in LLVM.
This patch enables LLVM's TrapUnreachable flag, which tells it to translate `unreachable` instructions into hardware trap instructions, rather than allowing control flow to "fall through" into whatever code happens to follow it in memory.
This follows up on https://github.com/rust-lang/rust/issues/28728#issuecomment-332581533. For example, for @zackw's testcase [here](https://github.com/rust-lang/rust/issues/42009#issue-228745924), the output function contains a `ud2` instead of no code, so it won't "fall through" into whatever happens to be next in memory.
(I'm also working on the problem of LLVM optimizing away infinite loops, but the patch here is useful independently.)
I tested this patch on a few different codebases, and the code size increase ranged from 0.0% to 0.1%.
Fix a bug where the rustfmt tarball was not being produced
r? @alexcrichton
This makes rustfmt a dep of 'extended', which seems to be necessary for the rustfmt dist step to actually get run.