rust/src
Dylan DPC b964451a72
Rollup merge of #71140 - oli-obk:static_cycle, r=RalfJung
[breaking change] Disallow statics initializing themselves

fixes #71078

Self-initialization is unsound because it breaks privacy assumptions that unsafe code can make. In

```rust
pub mod foo {
    #[derive(Debug, Copy, Clone)]
    pub struct Foo {
        x: (),
    }
}

pub static FOO: foo::Foo = FOO;
```

unsafe could could expect that ony functions inside the `foo` module were able to create a value of type `Foo`.
2020-04-26 01:00:15 +02:00
..
bootstrap Auto merge of #71439 - Mark-Simulacrum:stage0-next, r=jonas-schievink 2020-04-25 14:15:10 +00:00
build_helper
ci
doc Alphabetize the -C and -Z options. 2020-04-22 22:44:37 +10:00
etc
liballoc Auto merge of #71556 - Dylan-DPC:rollup-9ll4shr, r=Dylan-DPC 2020-04-25 17:49:00 +00:00
libarena
libcore Auto merge of #71556 - Dylan-DPC:rollup-9ll4shr, r=Dylan-DPC 2020-04-25 17:49:00 +00: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 Auto merge of #71556 - Dylan-DPC:rollup-9ll4shr, r=Dylan-DPC 2020-04-25 17:49:00 +00:00
libprofiler_builtins
librustc_apfloat Dogfood more or_patterns in the compiler 2020-04-19 07:33:58 -07:00
librustc_ast Rollup merge of #71284 - JOE1994:serialize_id, r=petrochenkov 2020-04-20 18:07:09 +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
librustc_ast_pretty Remove unused dependencies 2020-04-20 17:59:27 +09:00
librustc_attr Avoid unused Option::map results 2020-04-24 13:58:41 -07:00
librustc_builtin_macros Dogfood more or_patterns in the compiler 2020-04-19 07:33:58 -07:00
librustc_codegen_llvm Address comments from review 2020-04-23 23:14:07 +01:00
librustc_codegen_ssa Rollup merge of #71544 - cuviper:filter_map_next, r=Mark-Simulacrum 2020-04-25 18:30:30 +02:00
librustc_data_structures Rollup merge of #71369 - ctaggart:wasm32_profiling, r=ecstatic-morse 2020-04-22 23:19:22 +02:00
librustc_driver librustc_middle: return LocalDefId instead of DefId in local_def_id 2020-04-23 23:14:07 +01:00
librustc_error_codes Rollup merge of #71426 - contrun:fix-e0751-explanation, r=estebank 2020-04-24 02:47:35 +02:00
librustc_errors Replace filter_map().next() calls with find_map() 2020-04-24 20:03:45 -07:00
librustc_expand Avoid unused Option::map results 2020-04-24 13:58:41 -07:00
librustc_feature
librustc_fs_util
librustc_hir Rollup merge of #70043 - mark-i-m:def-kind-more, r=eddyb 2020-04-26 01:00:13 +02:00
librustc_hir_pretty Remove unused dependencies 2020-04-20 17:59:27 +09:00
librustc_incremental librustc_middle: return LocalDefId instead of DefId in local_def_id 2020-04-23 23:14:07 +01:00
librustc_index
librustc_infer Rollup merge of #70043 - mark-i-m:def-kind-more, r=eddyb 2020-04-26 01:00:13 +02:00
librustc_interface Replace filter_map().next() calls with find_map() 2020-04-24 20:03:45 -07:00
librustc_lexer Minor refactoring 2020-04-21 22:29:20 +05:30
librustc_lint Quick and dirty fix of the unused_braces lint 2020-04-24 19:15:06 +02:00
librustc_llvm
librustc_macros
librustc_metadata Rollup merge of #70043 - mark-i-m:def-kind-more, r=eddyb 2020-04-26 01:00:13 +02:00
librustc_middle Rollup merge of #70043 - mark-i-m:def-kind-more, r=eddyb 2020-04-26 01:00:13 +02:00
librustc_mir Rollup merge of #71140 - oli-obk:static_cycle, r=RalfJung 2020-04-26 01:00:15 +02:00
librustc_mir_build Avoid unused Option::map results 2020-04-24 13:58:41 -07:00
librustc_parse Avoid unused Option::map results 2020-04-24 13:58:41 -07:00
librustc_passes Rollup merge of #70043 - mark-i-m:def-kind-more, r=eddyb 2020-04-26 01:00:13 +02:00
librustc_plugin_impl librustc_middle: return LocalDefId instead of DefId in local_def_id 2020-04-23 23:14:07 +01:00
librustc_privacy Remove Option from the return type of def_kind. 2020-04-24 13:44:07 -05:00
librustc_query_system Avoid unused Option::map results 2020-04-24 13:58:41 -07:00
librustc_resolve Rollup merge of #70043 - mark-i-m:def-kind-more, r=eddyb 2020-04-26 01:00:13 +02:00
librustc_save_analysis Split out the Generator case from DefKind::Closure. 2020-04-24 13:31:37 -05:00
librustc_session Rollup merge of #71408 - GuillaumeGomez:check-code-blocks-tags, r=kinnison 2020-04-23 20:35:01 +02:00
librustc_span Auto merge of #71439 - Mark-Simulacrum:stage0-next, r=jonas-schievink 2020-04-25 14:15:10 +00:00
librustc_symbol_mangling Modify as_local_hir_id to return a bare HirId 2020-04-23 23:14:07 +01:00
librustc_target Avoid unused Option::map results 2020-04-24 13:58:41 -07:00
librustc_trait_selection Remove Option from the return type of def_kind. 2020-04-24 13:44:07 -05:00
librustc_traits Remove Option from the return type of def_kind. 2020-04-24 13:44:07 -05:00
librustc_ty Modify as_local_hir_id to return a bare HirId 2020-04-23 23:14:07 +01:00
librustc_typeck Rollup merge of #70043 - mark-i-m:def-kind-more, r=eddyb 2020-04-26 01:00:13 +02:00
librustdoc Rollup merge of #70043 - mark-i-m:def-kind-more, r=eddyb 2020-04-26 01:00:13 +02:00
libserialize Bump rustfmt to most recently shipped 2020-04-25 09:25:33 -04:00
libstd Auto merge of #71556 - Dylan-DPC:rollup-9ll4shr, r=Dylan-DPC 2020-04-25 17:49:00 +00:00
libterm Replace filter_map().next() calls with find_map() 2020-04-24 20:03:45 -07:00
libtest
libunwind
llvm-project@9f9da27fbd
rtstartup
rustc
rustllvm
stdarch@b00ecbeb26
test Rollup merge of #71140 - oli-obk:static_cycle, r=RalfJung 2020-04-26 01:00:15 +02:00
tools Auto merge of #71439 - Mark-Simulacrum:stage0-next, r=jonas-schievink 2020-04-25 14:15:10 +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.