rust/src
Yuki Okushi c85284ec58
Rollup merge of #67054 - RalfJung:set-discriminant-unreachable, r=oli-obk
codegen "unreachable" for invalid SetDiscriminant

Follow-up from https://github.com/rust-lang/rust/pull/66960. I also realized I don't understand our policy for using `abort` vs `unreachable`. AFAIK `abort` is safe to call and just aborts the process, while `unreachable` is UB. But sometimes we use both, like here

d825e35ee8/src/librustc_codegen_ssa/mir/block.rs (L827-L828)

and here

d825e35ee8/src/librustc_codegen_ssa/mir/block.rs (L264-L265)

The second case is even more confusing because that looks like an unreachable `return` to me, so why would we codegen a safe abort there?

r? @eddyb Cc @oli-obk
2019-12-07 00:10:05 +09:00
..
bootstrap SGX: Fix target linker used by bootstrap 2019-12-04 16:02:28 +01:00
build_helper
ci Rollup merge of #67066 - alexcrichton:update-wasi-libc, r=Mark-Simulacrum 2019-12-06 15:37:14 +09:00
doc
etc
liballoc Rollup merge of #66710 - vorner:weak-into-raw-null-docs, r=dtolnay 2019-12-05 19:03:08 +01:00
libarena
libcore Rollup merge of #67021 - elichai:2019-12-fmt, r=QuietMisdreavus 2019-12-06 15:37:10 +09:00
libfmt_macros
libgraphviz
libpanic_abort
libpanic_unwind
libproc_macro
libprofiler_builtins
librustc Rollup merge of #66846 - gizmondo:master, r=michaelwoerister 2019-12-07 00:09:52 +09:00
librustc_apfloat
librustc_asan
librustc_codegen_llvm Rollup merge of #67033 - cuviper:ValueName2, r=rkruppe 2019-12-07 00:10:02 +09:00
librustc_codegen_ssa use abort instead of unreachable 2019-12-06 00:10:01 +01:00
librustc_codegen_utils
librustc_data_structures Auto merge of #66408 - nnethercote:greedy-process_obligations, r=nmatsakis 2019-12-04 14:33:38 +00:00
librustc_driver Move early lint declarations to librustc_session 2019-12-03 12:19:14 -05:00
librustc_error_codes Rollup merge of #67017 - GuillaumeGomez:long-err-explanations-2, r=Dylan-DPC 2019-12-06 15:37:08 +09:00
librustc_errors
librustc_feature Check intrinsics for callability in const fns 2019-12-03 10:20:15 +01:00
librustc_fs_util
librustc_incremental Move cgu_reuse_tracker to librustc_session 2019-12-03 12:18:32 -05:00
librustc_index
librustc_interface Move early lint declarations to librustc_session 2019-12-03 12:19:14 -05:00
librustc_lexer
librustc_lint Move early lint declarations to librustc_session 2019-12-03 12:19:14 -05:00
librustc_llvm
librustc_lsan
librustc_macros
librustc_metadata Auto merge of #66275 - oli-obk:organize-intrinsics-promotion-checks, r=RalfJung 2019-12-04 11:22:26 +00:00
librustc_mir Rollup merge of #66988 - osa1:issue66985, r=matthewjasper 2019-12-07 00:09:55 +09:00
librustc_msan
librustc_parse Rollup merge of #67045 - Centril:parser-import-clean, r=Mark-Simulacrum 2019-12-05 19:03:20 +01:00
librustc_passes syntax: Remove redundant span from ast::Mac 2019-12-02 21:56:34 +03:00
librustc_plugin_impl
librustc_privacy
librustc_resolve
librustc_save_analysis syntax: Remove redundant span from ast::Mac 2019-12-02 21:56:34 +03:00
librustc_session Deduplicate CrateConfig 2019-12-03 12:19:17 -05:00
librustc_target Auto merge of #66520 - alexcrichton:disable-gdb-wasm, r=eddyb 2019-12-05 05:28:48 +00:00
librustc_traits
librustc_tsan
librustc_typeck Rollup merge of #67044 - Centril:67037, r=estebank 2019-12-05 19:03:18 +01:00
librustdoc Rollup merge of #66959 - GuillaumeGomez:cfg-duplicates, r=eddyb 2019-12-07 00:09:54 +09:00
libserialize
libstd Rollup merge of #67049 - tmiasko:io-slice-advance, r=rkruppe 2019-12-07 00:10:04 +09:00
libsyntax Deduplicate CrateConfig 2019-12-03 12:19:17 -05:00
libsyntax_expand Remove dead cfg method 2019-12-03 12:19:16 -05:00
libsyntax_ext Move early lint declarations to librustc_session 2019-12-03 12:19:14 -05:00
libsyntax_pos Rollup merge of #67010 - estebank:raw-idents, r=Centril 2019-12-05 19:03:15 +01:00
libterm
libtest
libunwind
llvm-project@de1a7dbf6c
rtstartup
rustc
rustllvm Rollup merge of #67033 - cuviper:ValueName2, r=rkruppe 2019-12-07 00:10:02 +09:00
stdarch@e0ab2c165a
test Rollup merge of #67054 - RalfJung:set-discriminant-unreachable, r=oli-obk 2019-12-07 00:10:05 +09:00
tools update miri 2019-12-05 00:00:44 +01:00
README.md
stage0.txt

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

  • rustc and its tests
  • libstd
  • Various submodules for tools, like rustdoc, rls, etc.

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