rust/src
bors e5f35df2c6 Auto merge of #70825 - eddyb:enum-discr-correct-generics-parent, r=nikomatsakis
typeck: always expose explicit enum discriminant `AnonConst`s' parent in `generics_of`.

This is similar to #70452 but for explicit `enum` discriminant constant expressions.
However, unlike #70452, this PR should have no effect on stable code, as while it alleviates #43408 errors, there is no way to actually compile an `enum` with generic parameters *and* explicit discriminants, without `#![feature(arbitrary_enum_discriminant)]`, as explicit discriminant expression don't count as uses of parameters (if they did, they would count as invariant uses).

<hr/>

There's also 2 other commits here, both related to #70453:
* "ty: use `delay_span_bug` in `ty::AdtDef::eval_explicit_discr`." - hides the ICEs demonstrated on #70453, when there are other errors (which the next commit adds)
* "typeck/wfcheck: require that explicit enum discriminants const-evaluate succesfully." - closes #70453 by picking alternative "2", i.e. erroring when a discriminant doesn't fully const-evaluate from the perspective of the `enum` definition

In the future, it might be possible to allow `enum` discriminants to actually depend on parameters, but that will likely require #68436 + some way to restrict the values so no two variants can end up with overlapping discriminants.

As this PR would close #70453, it shouldn't be merged until a decision is reached there.

r? @nikomatsakis
2020-05-03 12:05:46 +00:00
..
bootstrap Auto merge of #71815 - Mark-Simulacrum:no-llvm-rebuild, r=jonas-schievink 2020-05-03 02:58:00 +00:00
build_helper
ci ci: use bash when executing the "bors build finished" jobs 2020-04-29 16:32:32 +02:00
doc Implement RFC 2523, #[cfg(version(..))] 2020-05-03 02:42:07 +02:00
etc Enforce Python 3 as much as possible 2020-04-10 09:09:58 -04:00
liballoc Rollup merge of #71148 - bluss:vec-drop-raw-slice, r=RalfJung 2020-04-30 15:23:08 -07:00
libarena
libcore slice::fill: take T by value. 2020-05-02 20:15:05 +02:00
libfmt_macros Dogfood more or_patterns in the compiler 2020-04-19 07:33:58 -07:00
libgraphviz
libpanic_abort Bump bootstrap compiler 2020-04-25 09:25:33 -04:00
libpanic_unwind Bump bootstrap compiler 2020-04-25 09:25:33 -04:00
libproc_macro Rollup merge of #68716 - petrochenkov:stabmixed, r=dtolnay 2020-04-27 03:26:05 +02:00
libprofiler_builtins Require compiler-rt root at ../src/llvm-project/compiler-rt 2020-04-11 17:49:16 -04:00
librustc_apfloat Dogfood more or_patterns in the compiler 2020-04-19 07:33:58 -07:00
librustc_ast Rollup merge of #71762 - tshepang:typo, r=jonas-schievink 2020-05-01 23:16:40 +02:00
librustc_ast_lowering Rollup merge of #71494 - flip1995:while_let_span, r=petrochenkov 2020-04-25 11:25:50 +02:00
librustc_ast_passes allow const generics in const fn 2020-04-13 22:37:20 +02:00
librustc_ast_pretty Remove unused dependencies 2020-04-20 17:59:27 +09:00
librustc_attr Add build script to rustc_attr because of cfg(version) 2020-05-03 02:42:12 +02:00
librustc_builtin_macros fix rustdoc warnings 2020-05-02 10:41:04 +02:00
librustc_codegen_llvm Rollup merge of #71787 - tshepang:rustdoc-warnings, r=varkor 2020-05-02 18:27:52 +02:00
librustc_codegen_ssa Rollup merge of #71787 - tshepang:rustdoc-warnings, r=varkor 2020-05-02 18:27:52 +02:00
librustc_data_structures fix rustdoc warnings 2020-05-02 10:41:04 +02:00
librustc_driver fix more clippy warnings 2020-04-26 02:24:01 +02:00
librustc_error_codes Rollup merge of #71426 - contrun:fix-e0751-explanation, r=estebank 2020-04-24 02:47:35 +02:00
librustc_errors Rollup merge of #71489 - spastorino:fix-treat-err-as-bug-handling, r=eddyb 2020-04-28 13:12:14 +02:00
librustc_expand Implement confusable_idents lint. 2020-05-03 02:30:50 +08:00
librustc_feature Implement RFC 2523, #[cfg(version(..))] 2020-05-03 02:42:07 +02:00
librustc_fs_util
librustc_hir fix rustdoc warnings 2020-05-02 10:41:04 +02:00
librustc_hir_pretty Remove unused dependencies 2020-04-20 17:59:27 +09:00
librustc_incremental Auto merge of #71528 - alexcrichton:no-more-bitcode, r=nnethercote 2020-04-29 23:47:27 +00:00
librustc_index Use assoc integer constants in librustc_* 2020-04-07 00:43:16 +02:00
librustc_infer Rollup merge of #71806 - lcnr:patch-3, r=jonas-schievink 2020-05-03 14:18:04 +05:30
librustc_interface cleanup: config::CrateType -> CrateType 2020-05-02 11:57:23 +03:00
librustc_lexer Revert "Rollup merge of #71372 - ayushmishra2005:shebang_stripping, r=estebank" 2020-04-28 13:02:58 +03:00
librustc_lint Rollup merge of #71542 - crlf0710:confusable_idents, r=petrochenkov 2020-05-03 14:18:02 +05:30
librustc_llvm Don't skip building LLVM if already built 2020-05-02 18:43:55 -04:00
librustc_macros Monomorphise load_from_disk_and_cache_in_memory. 2020-05-01 14:29:35 +02:00
librustc_metadata Rollup merge of #71813 - ecstatic-morse:issue-71734, r=tmandry 2020-05-03 14:18:08 +05:30
librustc_middle Auto merge of #70825 - eddyb:enum-discr-correct-generics-parent, r=nikomatsakis 2020-05-03 12:05:46 +00:00
librustc_mir Auto merge of #69274 - LeSeulArtichaut:target-feature-11, r=hanna-kruppe 2020-05-02 20:24:50 +00:00
librustc_mir_build fix rustdoc warnings 2020-05-02 10:41:04 +02:00
librustc_parse Implement confusable_idents lint. 2020-05-03 02:30:50 +08:00
librustc_passes Rollup merge of #71777 - petrochenkov:crtype, r=Mark-Simulacrum 2020-05-02 18:27:39 +02:00
librustc_plugin_impl Remove support for self-opening 2020-04-25 10:55:20 -04:00
librustc_privacy Accept LocalDefId as key for check_mod_privacy query 2020-04-27 23:55:41 +01:00
librustc_query_system Restrict access. 2020-05-01 15:10:45 +02:00
librustc_resolve fix rustdoc warnings 2020-05-02 10:41:04 +02:00
librustc_save_analysis Accept LocalDefId as keyt for names_imported_by_glob_use 2020-04-27 21:50:17 +01:00
librustc_session Rollup merge of #71542 - crlf0710:confusable_idents, r=petrochenkov 2020-05-03 14:18:02 +05:30
librustc_span Rollup merge of #71314 - mibac138:cfg-version, r=petrochenkov 2020-05-03 14:18:00 +05:30
librustc_symbol_mangling Modify as_local_hir_id to return a bare HirId 2020-04-23 23:14:07 +01:00
librustc_target Auto merge of #71623 - petrochenkov:localink, r=estebank 2020-05-01 04:43:28 +00:00
librustc_trait_selection Rollup merge of #71314 - mibac138:cfg-version, r=petrochenkov 2020-05-03 14:18:00 +05:30
librustc_traits Remove leftover chalk types 2020-05-01 14:39:05 -04:00
librustc_ty fix rustdoc warnings 2020-05-02 10:41:04 +02:00
librustc_typeck Auto merge of #70825 - eddyb:enum-discr-correct-generics-parent, r=nikomatsakis 2020-05-03 12:05:46 +00:00
librustdoc Rollup merge of #71787 - tshepang:rustdoc-warnings, r=varkor 2020-05-02 18:27:52 +02:00
libserialize Update src/libserialize/json.rs 2020-05-02 08:51:54 +02:00
libstd Rollup merge of #71785 - reitermarkus:cfg-attribute, r=Mark-Simulacrum 2020-05-02 18:27:48 +02:00
libterm Replace filter_map().next() calls with find_map() 2020-04-24 20:03:45 -07:00
libtest Add illumos triple 2020-04-14 20:36:07 +00:00
libunwind Add illumos triple 2020-04-14 20:36:07 +00:00
llvm-project@3ba91917e5 Store LLVM bitcode in object files, not compressed 2020-04-29 11:57:26 -07:00
rtstartup
rustc
rustllvm Auto merge of #71528 - alexcrichton:no-more-bitcode, r=nnethercote 2020-04-29 23:47:27 +00:00
stdarch@d10eefc622 Update stdarch submodule 2020-04-24 22:15:12 +01:00
test Auto merge of #70825 - eddyb:enum-discr-correct-generics-parent, r=nikomatsakis 2020-05-03 12:05:46 +00:00
tools Auto merge of #71794 - RalfJung:miri, r=RalfJung 2020-05-02 16:24:51 +00:00
README.md
stage0.txt Bump rustfmt to most recently shipped 2020-04-25 09:25:33 -04:00

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 dev guide.