This mitigates possible issues when signal stacks overflow, which could
manifest as segfaults or in unlucky circumstances possible clobbering of
other memory values as stack overflows tend to enable.
Changes:
````
Rustup to rust-lang/rust#69674
Use visit_place
Check for mutation
Only fires on temporaries
Extend `redundant_clone` to the case that cloned value is not consumed
add CR feedback
Improve documentation
Use `edition:2018` flag more widely
Update tests/ui/needless_doc_main.rs
Move links to the end of each chapter on adding_lints
Move links to the end of each chapter on CONTRIBUTING
Clean-up adding_lints.md
Clean-up CONTRIBUTING.md
needless_doc_main: only check rust code
Use `node_type_opt` over `node_type`
Fix doc
Fix ICE with trivial_bounds feature
clippy_lints: readme: don't mention crates.io since it is no longer used to publish clippy.
update rust-lang.github.io to rustc-dev-guide.rust-lang.org
Improve placeholder in map_unit_fn
Fix match single binding when in a let stmt
Improve error messages for {option,result}_map_unit_fn
Mention the setup instructions in CONTRIBUTING
redundant_pattern: take binding (ref, ref mut) into account in suggestion.
check_pat: delay creation of the "normal" vec until we reach the branch where is is actually needed
deps: bump itertools 0.8 -> 0.9
add lint on File::read_to_string and File::read_to_end
transition rustc-guide to rustc-dev-guide
Rename macro_use_import -> macro_use_imports
warn on macro_use attr
Fix deploy script for tag deploys
````
Fixes#69957
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.