Commit Graph

97464 Commits

Author SHA1 Message Date
Mark Rousskov
c805a38dff Rollup merge of #63441 - bjorn3:patch-1, r=Mark-Simulacrum
Derive Debug for CrateInfo
2019-08-11 15:18:44 -04:00
Mark Rousskov
8122a01b27 Rollup merge of #63440 - RalfJung:ctfe-backtrace, r=oli-obk
rename RUST_CTFE_BACKTRACE to RUSTC_CTFE_BACKTRACE

This matches `RUSTC_LOG`. Both affect only rustc, not any Rust program.
2019-08-11 15:18:43 -04:00
Mark Rousskov
24a83374b6 Rollup merge of #63433 - RalfJung:miri-call, r=oli-obk
Miri shouldn't look at types

r? @oli-obk

Fixes https://github.com/rust-lang/rust/issues/62137
2019-08-11 15:18:41 -04:00
Mark Rousskov
061245e2b1 Rollup merge of #63346 - RalfJung:zeroed-lint, r=eddyb
Lint on some incorrect uses of mem::zeroed / mem::uninitialized

Cc https://github.com/rust-lang/rust/issues/62825 and https://internals.rust-lang.org/t/make-mem-uninitialized-and-mem-zeroed-panic-for-some-types-where-0-is-a-niche/10605

This does not yet handle `NonNull`/`NonZero*`, but it is a start.

I also improved some doc issues I hit on the way, and added a useful helper to `TyS`.

EDIT: I added the relnotes label mostly as a proposal -- I think this is worth mentioning, but leave the decision up to the release team.
2019-08-11 15:18:40 -04:00
Mark Rousskov
88629778e6 Rollup merge of #61969 - MikailBag:master, r=Centril
Add #[repr(transparent)] for several types

In some functions, types mentioned in this PR are transmuted into their inner value.
Example for `PathBuf`: https://github.com/rust-lang/rust/blob/master/src/libstd/path.rs#L1132.
This PR adds `#[repr(transparent)]` to those types, so their correct behavior doesn't depend on compiler details. (As far as I understand, currently that line, converting `PathBuf` to `Vec<u8>`, is UB).
2019-08-11 15:18:38 -04:00
bjorn3
b204232fd3 Derive Debug for NativeLibrary and NativeLibraryKind 2019-08-11 16:51:36 +02:00
bors
8a068699a2 Auto merge of #63446 - Centril:refactor-lowering, r=oli-obk
Refactor and categorize lowering wrt. items / exprs

Split lowering into more files along the lines of "expression related" and "item related".
Also refactor huge methods into smaller ones.

A next step might be to introduce "type related" and merge patterns and statements combined with expressions into "value related". There's still more work to do but the PR was getting too big :)

r? @oli-obk
2019-08-11 13:37:37 +00:00
Ralf Jung
09307474c2 update clippy 2019-08-11 12:06:12 +02:00
Ralf Jung
5c77a17d18 note down some more future plans 2019-08-11 12:04:49 +02:00
Ralf Jung
c5a63566d6 allow the lint if a few UB-demonstrating doc tests 2019-08-11 12:04:49 +02:00
Ralf Jung
3972d05fec proper doc comment for 'recovered' field of variant
Curtesy of petrochenkov
2019-08-11 12:04:49 +02:00
Ralf Jung
4b062a175f note a FIXME 2019-08-11 12:04:49 +02:00
Ralf Jung
8e6fbbec83 add tuple_fields convenience method and use it in a few places 2019-08-11 12:04:49 +02:00
Ralf Jung
fbd56131a9 fix a comment 2019-08-11 12:04:49 +02:00
Ralf Jung
ca1e94b131 warn for more cases 2019-08-11 12:04:49 +02:00
Ralf Jung
da6fbb1895 add basic lint testing for misuse of mem::zeroed and mem::uninitialized 2019-08-11 12:04:49 +02:00
bors
2b78e10ac1 Auto merge of #63343 - ishitatsuyuki:revert-62150, r=RalfJung
Back out #62150

Ref: #62825

cc @RalfJung
2019-08-11 09:58:01 +00:00
bors
ee36cfaff9 Auto merge of #63413 - RalfJung:miri, r=oli-obk
update Miri

With https://github.com/rust-lang/rust/pull/63404 landed, we need https://github.com/rust-lang/miri/pull/898 to avoid failures in https://github.com/RalfJung/miri-test-libstd.

r? @oli-obk
2019-08-11 02:05:40 +00:00
bors
8fd7df664d Auto merge of #63250 - petrochenkov:descrate, r=davidtwco
diagnostics: Describe crate root modules in `DefKind::Mod` as "crate"

Or we can use "extern crate" like resolve previously did sometimes, not sure.

r? @davidtwco
2019-08-10 22:29:20 +00:00
Vadim Petrochenkov
26d26eb6a1 Update cargo 2019-08-10 23:19:09 +03:00
Vadim Petrochenkov
e18ad70d2b diagnostics: Describe crate root modules in DefKind::Mod as "crate" 2019-08-10 23:17:20 +03:00
Mazdak Farrokhzad
eb229bca0d lowering: move lower_arg -> item.rs 2019-08-10 20:24:43 +02:00
Mazdak Farrokhzad
28af53367a lowering: move scope & capture_clause stuff -> expr.rs 2019-08-10 20:24:43 +02:00
Mazdak Farrokhzad
5ab73450f8 lowering: refactor into item.rs 2019-08-10 20:24:43 +02:00
Mazdak Farrokhzad
7f522155dd lowering: move {lower_arm,arm} -> expr.rs 2019-08-10 20:24:43 +02:00
Mazdak Farrokhzad
93570b02bd lowering: move field -> expr.rs 2019-08-10 20:24:43 +02:00
Mazdak Farrokhzad
29e9b5ddd4 lowering: refactor label/dest -> expr.rs 2019-08-10 20:24:43 +02:00
Mazdak Farrokhzad
961ace3fc2 lowering: move lower_{unop,binop} -> expr.rs 2019-08-10 20:24:43 +02:00
Mazdak Farrokhzad
e71f6e1fbc lowering: move lower_field -> expr.rs 2019-08-10 20:24:43 +02:00
Mazdak Farrokhzad
94876c22db lowering: move expr builder methods -> expr.rs 2019-08-10 20:24:43 +02:00
Mazdak Farrokhzad
5cba0ac0bf lowering: move make_async_expr -> expr.rs 2019-08-10 20:24:43 +02:00
Mazdak Farrokhzad
199d585981 lowering: extract lower_expr_let 2019-08-10 20:24:43 +02:00
Mazdak Farrokhzad
ed1e943bc5 lowering: extract lower_expr_if 2019-08-10 20:24:42 +02:00
Mazdak Farrokhzad
11251b9dab lowering: extract lower_expr_while_in_loop_scope 2019-08-10 20:24:42 +02:00
Mazdak Farrokhzad
c8b3b2e052 lowering: move wrap_in_try_constructor -> expr.rs 2019-08-10 20:24:42 +02:00
Mazdak Farrokhzad
8ddd173811 lowering: extract lower_expr_try_block 2019-08-10 20:24:42 +02:00
Mazdak Farrokhzad
e450dcaf8e lowering: move lower_await -> expr.rs 2019-08-10 20:24:42 +02:00
Mazdak Farrokhzad
548e3090c2 lowering: extract lower_expr_closure 2019-08-10 20:24:42 +02:00
Mazdak Farrokhzad
ca19e326a6 lowering: extract lower_expr_async_closure 2019-08-10 20:24:42 +02:00
Mazdak Farrokhzad
309bf2fcad lowering: extract lower_expr_range_closed 2019-08-10 20:24:42 +02:00
Mazdak Farrokhzad
c789e7a5cc lowering: extract lower_expr_range 2019-08-10 20:24:42 +02:00
Mazdak Farrokhzad
119499230c lowering: extract lower_expr_asm 2019-08-10 20:24:42 +02:00
Mazdak Farrokhzad
45d507d39e lowering: extract lower_expr_yield 2019-08-10 20:24:42 +02:00
Mazdak Farrokhzad
9d739ca12d lowering: extract lower_expr_for 2019-08-10 20:24:42 +02:00
Mazdak Farrokhzad
c817596c69 lowering: extract lower_expr_try 2019-08-10 20:24:42 +02:00
Mazdak Farrokhzad
cf20d8c388 lowering: move lower_expr -> expr.rs 2019-08-10 20:24:42 +02:00
bors
9703ef6661 Auto merge of #62955 - Mark-Simulacrum:rustdoc-clean-1, r=eddyb
rustdoc: general cleanups

This is purely a refactoring, mostly just simplifying some of the code. Commits are best reviewed individually.
2019-08-10 17:19:55 +00:00
bjorn3
d809d6ee89 Derive Debug for CrateInfo 2019-08-10 16:47:27 +02:00
Ralf Jung
440a5c8100 rename RUST_CTFE_BACKTRACE to RUSTC_CTFE_BACKTRACE 2019-08-10 16:37:40 +02:00
bors
be3fb0cd2c Auto merge of #63437 - Centril:rollup-ryx881p, r=Centril
Rollup of 4 pull requests

Successful merges:

 - #63400 (Try to break resolve into more isolated parts)
 - #63425 (Cleanup historical stability comments)
 - #63429 (.gitignore: Readd `/tmp/`)
 - #63432 (Cleanup & Simplify stuff in lowering)

Failed merges:

r? @ghost
2019-08-10 13:44:09 +00:00