rust/src
bors 5313e8728f Auto merge of #47408 - eddyb:deref-danger, r=nikomatsakis
Don't promote to 'static the result of dereferences.

This is a **breaking change**, removing copies out of dereferences from rvalue-to-`'static` promotion.

With miri we won't easily know whether the dereference itself would see the same value at runtime as miri (e.g. after mutating a `static`) or even if it can be interpreted (e.g. integer pointers).
One alternative to this ban is defining at least *some* of those situations as UB, i.e. you shouldn't have a reference in the first place, and you should work through raw pointers instead, to avoid promotion.

**EDIT**: The other *may seem* to be to add some analysis which whitelists references-to-constant-values and assume any values produced by arbitrary computation to not be safe to promote dereferences thereof - but that means producing a reference from an associated constant or `const fn` would necessarily obscure it, and in the former case, this could still impact code that runs on stable today. What we do today to track "references to statics" only works because we restrict taking a reference to a `static` at all to other `static`s (which, again, are currently limited in that they can't be read at compile-time) and to runtime-only `fn`s (*not* `const fn`s).

I'm primarily opening this PR with a conservative first approximation (e.g. `&(*r).a` is not allowed, only reborrows are, and in the old borrow only implicit ones from adjustments, at that) for cratering.

r? @nikomatsakis
2018-02-17 19:32:25 +00:00
..
binaryen@17841e155e Update binaryen to fix -Werror with GCC 8 2018-02-07 12:20:25 -08:00
bootstrap Fix panic when x.py is called without any arguments. 2018-02-16 14:31:25 +08:00
build_helper
ci Rollup merge of #48120 - matthiaskrgr:typos_src_1, r=alexcrichton 2018-02-11 00:53:05 +08:00
dlmalloc@9b2dcac06c Update the dlmalloc submodule 2018-02-10 07:01:27 -08:00
doc Auto merge of #47752 - mark-i-m:at-most-once-rep, r=nikomatsakis 2018-02-11 18:11:01 +00:00
etc fix typos in src/{bootstrap,ci,etc,lib{backtrace,core,fmt_macros}} 2018-02-10 12:22:57 +01:00
grammar
jemalloc@1f5a28755e
liballoc Clarify contiguity of Vec's elements. 2018-02-16 17:08:08 -08:00
liballoc_jemalloc Make liballoc_jemalloc work on CloudABI. 2018-01-18 21:11:24 +01:00
liballoc_system
libarena
libbacktrace fix typos in src/{bootstrap,ci,etc,lib{backtrace,core,fmt_macros}} 2018-02-10 12:22:57 +01:00
libcompiler_builtins@266ea0740a Update compiler-builtins to latest master. 2018-02-13 22:39:11 +01:00
libcore Rollup merge of #48260 - dns2utf8:add_link_to_yield, r=kennytm 2018-02-17 14:45:26 +01:00
libfmt_macros fix typos in src/{bootstrap,ci,etc,lib{backtrace,core,fmt_macros}} 2018-02-10 12:22:57 +01:00
libgetopts
libgraphviz
liblibc@56444a4545 Update libc 2018-01-24 08:37:33 -02:00
libpanic_abort rustc: Add an option to default hidden visibility 2018-01-30 13:41:20 -08:00
libpanic_unwind
libproc_macro proc_macro: don't panic parsing ..= (fix #47950) 2018-02-06 14:43:01 +00:00
libprofiler_builtins
librustc Auto merge of #47906 - Zoxc:nocycle, r=nikomatsakis 2018-02-17 02:58:21 +00:00
librustc_allocator
librustc_apfloat in which the unused-parens lint comes to cover function and method args 2018-01-18 08:33:58 -08:00
librustc_asan
librustc_back Rollup merge of #47890 - pftbest:no_trap, r=alexcrichton 2018-01-31 16:36:17 +08:00
librustc_binaryen Export wasm source map when debug information is enabled 2018-01-30 20:10:58 -06:00
librustc_borrowck Rollup merge of #47543 - topecongiro:issue-42344, r=nikomatsakis 2018-02-06 02:13:46 +08:00
librustc_const_eval Encode (in MIR) whether borrows are explicit in source or arise due to autoref. 2018-02-08 12:16:25 +01:00
librustc_const_math
librustc_cratesio_shim
librustc_data_structures Rollup merge of #47835 - Mark-Simulacrum:remove-data-structs, r=nikomatsakis 2018-02-10 14:23:54 +08:00
librustc_driver incr.comp.: Run cache directory garbage collection before loading dep-graph. 2018-02-13 13:37:32 +01:00
librustc_errors Remove dead code 2018-02-02 09:18:49 +05:30
librustc_incremental incr.comp.: Run cache directory garbage collection before loading dep-graph. 2018-02-13 13:37:32 +01:00
librustc_lint Rollup merge of #48033 - GuillaumeGomez:better-char-cast-message, r=estebank 2018-02-14 16:14:31 +08:00
librustc_llvm rustc: Persist LLVM's Linker in Fat LTO 2018-02-12 09:11:06 -08:00
librustc_lsan
librustc_metadata rustc: Load the rustc_trans crate at runtime 2018-01-27 19:16:21 -08:00
librustc_mir Auto merge of #47408 - eddyb:deref-danger, r=nikomatsakis 2018-02-17 19:32:25 +00:00
librustc_msan
librustc_passes Auto merge of #47408 - eddyb:deref-danger, r=nikomatsakis 2018-02-17 19:32:25 +00:00
librustc_platform_intrinsics
librustc_plugin Don't include DefIndex in plugin- and proc-macro registrar fn symbol. 2018-01-16 17:30:11 +01:00
librustc_privacy Reexport -> re-export in prose and documentation comments 2018-01-15 13:36:53 -05:00
librustc_resolve Improve debuggability of #48116. 2018-02-13 22:48:16 +08:00
librustc_save_analysis Emit data::Impl in save-analysis 2018-02-10 03:04:44 +01:00
librustc_trans Rollup merge of #48163 - alexcrichton:persistent-linker, r=rkruppe 2018-02-14 18:25:24 +08:00
librustc_trans_utils rustc: Load the rustc_trans crate at runtime 2018-01-27 19:16:21 -08:00
librustc_tsan
librustc_typeck Auto merge of #46714 - leodasvacas:refactor-structurally-resolve-type, r=nikomatsakis 2018-02-16 03:38:44 +00:00
librustdoc Rollup merge of #48095 - QuietMisdreavus:doctest-assembly, r=GuillaumeGomez 2018-02-17 14:45:20 +01:00
libserialize Auto merge of #46919 - michaelwoerister:new-leb128, r=sfackler 2018-01-20 02:00:13 +00:00
libstd Auto merge of #48294 - GuillaumeGomez:rollup, r=GuillaumeGomez 2018-02-17 14:31:32 +00:00
libstd_unicode Reexport -> re-export in prose and documentation comments 2018-01-15 13:36:53 -05:00
libsyntax Remove unneeded string allocations 2018-02-16 15:23:28 -08:00
libsyntax_ext Rollup merge of #46030 - Zoxc:asm-volatile, r=nikomatsakis 2018-02-06 02:13:44 +08:00
libsyntax_pos Rollup merge of #47942 - estebank:macro-spans, r=nikomatsakis Minimize weird spans involving macro context Sometimes the parser attempts to synthesize spans from within a macro context with the span for the captured argument, leading to non-sensical spans with very bad output. Given that an incorrect span is worse than a partially incomplete span, when detecting this situation return only one of the spans without merging them. Fix #32072, #47778. CC #23480. 2018-02-02 22:48:50 +08:00
libterm
libtest libtest: Replace panics with error messages 2018-02-04 06:10:54 +02:00
libunwind Auto merge of #47663 - malbarbo:mips-crt-static, r=alexcrichton 2018-01-28 23:30:15 +00:00
llvm@9f81beaf32 rustc: Upgrade to LLVM 6 2018-02-09 17:13:14 -08:00
llvm-emscripten@2717444753 rustc: Split Emscripten to a separate codegen backend 2018-01-28 18:32:45 -08:00
rt
rtstartup Remove impl Foo for .. in favor of auto trait Foo 2018-01-13 18:48:00 +03:00
rustc rustc: Load the rustc_trans crate at runtime 2018-01-27 19:16:21 -08:00
rustllvm rustc: Persist LLVM's Linker in Fat LTO 2018-02-12 09:11:06 -08:00
test Rollup merge of #48095 - QuietMisdreavus:doctest-assembly, r=GuillaumeGomez 2018-02-17 14:45:20 +01:00
tools Auto merge of #48203 - kennytm:rollup, r=kennytm 2018-02-15 13:35:20 +00:00
Cargo.lock Update RLS 2018-02-14 21:13:30 +13:00
Cargo.toml Convert python script to rust 2018-02-08 10:53:09 +01:00
stage0.txt