miri engine: fix treatment of abort intrinsic
I screwed up in https://github.com/rust-lang/rust/pull/69830 and added `abort` to the wrong block of intrinsics, namely the one that actually has a return place. So that branch was never actually reached.
r? @oli-obk
Add support for LLVM globals corresponding to miri allocations should be named alloc123
Adds support for this request from @eddyb in #69134:
> That is, if -Zfewer-names is false (usually only because of --emit=llvm-ir), we should use the same name for LLVM globals we generate out of miri allocs as #67133 does in MIR output (allocN).
>
>This way, we can easily see the mapping between MIR and LLVM IR (and it shouldn't be any costlier for regular compilation, which would continue to use unnamed globals).
r? @eddyb
cc @oli-obk
miri: ICE on invalid terminators
We've run a lot of MIR in Miri (including some generators) and never seen these.
@tmandry is it correct that `Yield` and `GeneratorDrop` get lowered away?
@eddyb @oli-obk what's with this `Abort` that does not seem to ever actually exist? Codegen *does* seem to handle it, so I wonder why Miri can get away without that. In fact, codegen handles it twice:
1d5241c962/src/librustc_codegen_ssa/mir/block.rs (L796)1d5241c962/src/librustc_codegen_ssa/mir/mod.rs (L296)
Implement Error for TryReserveError
I noticed that the Error trait wasn't implemented for TryReserveError. (#48043)
Not sure if the error messages and code style are 100% correct, it's my first time contributing to the Rust std.
Rename rustc guide
This is in preparation for https://github.com/rust-lang/rustc-guide/issues/470
Needs to be merged after we actually rename the guide.
Have used this to rename:
`git grep -l 'rustc_guide' | xargs sed -i 's/rustc_guide/rustc_dev_guide/g'`
`git grep -l 'rustc-guide' | xargs sed -i 's/rustc-guide/rustc-dev-guide/g'`
`git grep -l 'rustc guide' | xargs sed -i 's/rustc guide/rustc dev guide/g'`
Toolstate: remove redundant beta-week check.
I made a bit of a mistake in #69624. The "beta regression" doesn't need to be checked twice.
I also rolled up #69693 to avoid merge conflicts.
Document unsafe blocks in core::fmt
r? @RalfJung
CC: @rust-lang/wg-unsafe-code-guidelines
#66219
Sorry for the hiatus, but here's a few more files with the unsafe blocks documented! I think working on it smaller chunks like this will be easier for everyone.
Add Display and Error impls for proc_macro::LexError
This should allow LexError to play much nicer with the `?` operator.
Fixes#68896.
(I'm not sure if I did the stability attributes right, so if I need to change them, please let me know!)
Added tvOS as targets
This is a first attempt of adding support tvOS as described in #48862. It's got a lot of overlap with [src/librustc_target/spec/apple_ios_base.rs](31dd4f4acb/src/librustc_target/spec/apple_ios_base.rs).
I thought about refactoring `apple_ios_base.rs` to include this as well but that would require each of the ios and tvos targets to be of the something like the form `let base = opts(AppleOS::TV, Arch::Arm64)?;` I also did the same thing for watchOS because from what I can tell, all three targets (iOS, tvOS, and watchOS) have the same logic but have different parameters being sent to `xcrun`. Thoughts?
As far as the `data_layout` and other parameters to `Target`, I did as much research as I could but it really seems that processor in the [iPhone 11 is the same as the apple TV](https://en.wikipedia.org/wiki/Apple-designed_processors) so I didn't change any of those parameters.
I did get this to build and tested that it's actually running the the below logic (because the parameter to `xcrun` is `appletvos` not `tvos`).
I didn't manage to get it to actually compile a file with `fn main(){}` because I don't have the stdlib for `aarch64-apple-tvos` compiled it seems. Is there documentation for this?
Similar to the ending of https://github.com/rust-lang/rust/pull/63467, I'm not sure what to do next.