rust/src
bors 4d0dd02ee0 Auto merge of #80579 - RalfJung:no-fallible-promotion, r=oli-obk
avoid promoting division, modulo and indexing operations that could fail

For division, `x / y` will still be promoted if `y` is a non-zero integer literal; however, `1/(1+1)` will not be promoted any more.

While at it, also see if we can reject promoting floating-point arithmetic (which are [complicated](https://github.com/rust-lang/unsafe-code-guidelines/issues/237) so maybe we should not promote them).

This will need a crater run to see if there's code out there that relies on these things being promoted.

If we can land this, promoteds in `fn`/`const fn` cannot fail to evaluate any more, which should let us do some simplifications in codegen/Miri!

Cc https://github.com/rust-lang/rfcs/pull/3027
Fixes https://github.com/rust-lang/rust/issues/61821
r? `@oli-obk`
2021-01-23 13:19:04 +00:00
..
bootstrap Deny internal lints for rustdoc 2021-01-21 23:05:52 -05:00
build_helper Fix even more URLs 2020-11-05 20:11:29 +01:00
ci Work around missing -dev packages in solaris docker image. 2021-01-20 23:29:55 +01:00
doc Feature-gate pointer and reference in intra-doc links 2021-01-17 15:27:35 -05:00
etc Add jsondocck tool, and use it for rustdoc JSON 2021-01-19 14:24:25 -05:00
librustdoc Rollup merge of #81227 - CraftSpider:struct-type-clean, r=jyn514 2021-01-22 14:30:16 +00:00
llvm-project@f9a8d70b6e Update to LLVM 11.0.1 2021-01-07 11:32:10 -08:00
test Auto merge of #80579 - RalfJung:no-fallible-promotion, r=oli-obk 2021-01-23 13:19:04 +00:00
tools Rollup merge of #81236 - estebank:everybody-loop-now, r=oli-obk 2021-01-22 14:30:19 +00:00
README.md
stage0.txt Bump bootstrap compiler to 1.50 beta 2020-12-30 09:27:19 -05:00
version Bump version to 1.51 2020-12-25 10:42:53 -05:00

This directory contains the source code of the rust project, including:

  • The test suite
  • The bootstrapping build system
  • Various submodules for tools, like rustdoc, rls, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.