bors
6ae0643d1a
Auto merge of #5529 - alex-700:improve-option-and-then-some-lint, r=phansch
...
Improve `option_and_then_some` lint
fixed #5492
changelog: Improve and generalize `option_and_then_some` and rename it to `bind_instead_of_map`.
2020-05-17 10:58:56 +00:00
Bastian Kauschke
9da8a5ba68
update tests
2020-05-17 11:42:41 +02:00
Ralf Jung
4caddaeeea
bootstrap: fix typo
2020-05-17 11:41:20 +02:00
Ralf Jung
5980d972d1
make abort intrinsic safe, and correct its documentation
2020-05-17 11:23:42 +02:00
bors
7faeae0d38
Auto merge of #72135 - oli-obk:const_prop_deaggregates, r=wesleywiser
...
Propagate locals, even if they have unpropagatable assignments somewhere
Second try for https://github.com/rust-lang/rust/pull/71946#discussion_r422967292
r? @wesleywiser
cc @rust-lang/wg-mir-opt @RalfJung
2020-05-17 09:18:12 +00:00
Aleksei Latyshev
07f1edf2d4
improve and generalize option_and_then_some lint
...
- rename it to bind_instead_of_map
2020-05-17 12:17:03 +03:00
Elichai Turkel
15911963ec
Update linker-plugin-lto.md to contain up to rust 1.43
2020-05-17 12:16:43 +03:00
Bastian Kauschke
6a72ba4c33
Logically seperate lazy norm from const_generics
2020-05-17 11:06:35 +02:00
Bastian Kauschke
752d8a24d8
the best way to fix bugs is by ignoring them
2020-05-17 11:06:35 +02:00
Bastian Kauschke
c71439791c
chalk
2020-05-17 11:06:35 +02:00
Bastian Kauschke
3d7637e66d
correctly handle escaping bound variables
2020-05-17 11:06:35 +02:00
Bastian Kauschke
0f7bf5d9e1
add docs
2020-05-17 11:06:35 +02:00
Bastian Kauschke
443ae83874
merge lazy_normalization_consts into const_generics
2020-05-17 11:06:35 +02:00
Bastian Kauschke
479968b812
explicitly handle errors in select
2020-05-17 11:05:05 +02:00
Bastian Kauschke
e873eef1e3
explicitly handle errors in fulfill
2020-05-17 11:05:05 +02:00
Bastian Kauschke
afd7ea88fb
update tests and add relevant feature gate test
2020-05-17 11:05:05 +02:00
Bastian Kauschke
e1a8d322d0
keep the good old lazy_normalization hack alive
2020-05-17 11:05:04 +02:00
Bastian Kauschke
c3a0cba1c1
initial cleanup
2020-05-17 11:05:04 +02:00
Ben Lewis
93d15b9480
Put lazy normalization behind a feature gate
2020-05-17 11:05:04 +02:00
Ben Lewis
3ef831069a
Add lazy normalization tests
2020-05-17 11:01:23 +02:00
Ben Lewis
4cfdd2178e
Emit ConstEquate obligation after checking/unifying for inference variables. This means
...
a inference variable can be unified with an unevaluated const.
2020-05-17 11:01:02 +02:00
Ben Lewis
8b14b84933
Assume unevaluated consts are equal to the other consts and add ConstEquate obligation. This delays
...
the need to evaluate consts eagerly and therefore gets around const eval query cycles.
2020-05-17 11:01:02 +02:00
Michal 'vorner' Vaner
ba0d0c27df
Stabilization of weak-into-raw
...
Stabilizes #60728 .
2020-05-17 08:21:24 +02:00
bors
e7f230dfd2
Auto merge of #72208 - tmandry:fix-fuchsia-solink, r=Mark-Simulacrum
...
Don't pass --dynamic-linker for Fuchsia dylibs
This was causing a PT_INTERP header in Fuchsia dylibs (implying that
they're executable when they're not).
r? @Mark-Simulacrum
cc @frobtech @petrhosek
2020-05-17 05:58:54 +00:00
bors
440a46dd20
Auto merge of #5608 - flip1995:rustup, r=phansch
...
Rustup with git subtree
The commits from the last rustup #5587 , are again included in this rustup, since I rebased the rustup. Lesson learned: never rebase, only merge when working with git subtree.
changelog: none
2020-05-17 05:41:39 +00:00
Wesley Wiser
27c818bc56
Bless mir-opt tests to account for #72220
2020-05-16 22:13:50 -04:00
bors
09739c22db
Auto merge of #72286 - Dylan-DPC:rollup-n3rk6df, r=Dylan-DPC
...
Rollup of 4 pull requests
Successful merges:
- #72233 (Fix {:#?} representation of proc_macro::Literal)
- #72277 (emphasize that ManuallyDrop is safe-to-access and unsafe-to-drop)
- #72281 (Fix whitespace in `?Sized` structured suggestion)
- #72282 (Fix issue number typo in note)
Failed merges:
r? @ghost
2020-05-17 01:31:15 +00:00
Dylan MacKenzie
2fe1170613
ret has been optimized away in debuginfo test
2020-05-16 17:15:24 -07:00
Dylan MacKenzie
8c710118f6
Disable MIR optimization for alignment codegen tests
...
NRVO optimizes away the locals whose alignment is tested. I don't think
this affects the purpose of the test.
2020-05-16 17:15:24 -07:00
Dylan MacKenzie
b19d5c0592
Name return place in debuginfo if it is a user variable
2020-05-16 17:15:24 -07:00
Dylan MacKenzie
c38283d7a7
Test that Miri can handle MIR with NRVO applied
2020-05-16 17:15:24 -07:00
Dylan MacKenzie
e369d7f4e7
Expand comment with possible improvements
2020-05-16 17:15:24 -07:00
Dylan MacKenzie
2cba138f4a
Add simple NRVO test
2020-05-16 17:15:24 -07:00
Dylan MacKenzie
966df3e926
Bless MIR tests that inline functions qualifying for NRVO
2020-05-16 17:15:24 -07:00
Dylan MacKenzie
6b96d17a5a
Dumb NRVO
2020-05-16 17:15:23 -07:00
Dylan DPC
1d09a7b693
Rollup merge of #72282 - jonas-schievink:issue-typo, r=Dylan-DPC
...
Fix issue number typo in note
2020-05-17 01:51:35 +02:00
Dylan DPC
770b1f35de
Rollup merge of #72281 - estebank:fix-ws-sugg, r=Dylan-DPC
...
Fix whitespace in `?Sized` structured suggestion
2020-05-17 01:51:33 +02:00
Dylan DPC
444f449d10
Rollup merge of #72277 - RalfJung:manually-drop-docs, r=Mark-Simulacrum
...
emphasize that ManuallyDrop is safe-to-access and unsafe-to-drop
This seems to sometimes confused people, and generally seems reasonable to state in the top-level summary of the type.
2020-05-17 01:51:31 +02:00
Dylan DPC
fc91043d24
Rollup merge of #72233 - dtolnay:literal, r=petrochenkov
...
Fix {:#?} representation of proc_macro::Literal
Before:
```rust
TokenStream [
Ident {
ident: "name",
span: #0 bytes(37..41),
},
Punct {
ch: '=',
spacing: Alone,
span: #0 bytes(42..43),
},
Literal { lit: Lit { kind: Str, symbol: "SNPP", suffix: None }, span: Span { lo: BytePos(44), hi: BytePos(50), ctxt: #0 } },
Punct {
ch: ',',
spacing: Alone,
span: #0 bytes(50..51),
},
Ident {
ident: "owner",
span: #0 bytes(56..61),
},
Punct {
ch: '=',
spacing: Alone,
span: #0 bytes(62..63),
},
Literal { lit: Lit { kind: Str, symbol: "Canary M Burns", suffix: None }, span: Span { lo: BytePos(64), hi: BytePos(80), ctxt: #0 } },
]
```
After:
```rust
TokenStream [
Ident {
ident: "name",
span: #0 bytes(37..41),
},
Punct {
ch: '=',
spacing: Alone,
span: #0 bytes(42..43),
},
Literal {
kind: Str,
symbol: "SNPP",
suffix: None,
span: #0 bytes(44..50),
},
Punct {
ch: ',',
spacing: Alone,
span: #0 bytes(50..51),
},
Ident {
ident: "owner",
span: #0 bytes(56..61),
},
Punct {
ch: '=',
spacing: Alone,
span: #0 bytes(62..63),
},
Literal {
kind: Str,
symbol: "Canary M Burns",
suffix: None,
span: #0 bytes(64..80),
},
]
```
2020-05-17 01:51:30 +02:00
Philipp Krones
e5b5f6f8a9
Better explain remotes in the sync process.
2020-05-17 01:38:01 +02:00
flip1995
7f317b708f
Run fmt
2020-05-17 01:18:43 +02:00
flip1995
404ae5b211
Re-remove util/dev
...
Maybe someday, git subtree will do it right
2020-05-17 01:14:28 +02:00
flip1995
cb0d40a7ec
Merge remote-tracking branch 'upstream/master' into rustup
2020-05-17 01:13:02 +02:00
bors
0ec4b06524
Auto merge of #72178 - tmiasko:inliner-lifetimes, r=nikic
...
Consistently use LLVM lifetime markers during codegen
Ensure that inliner inserts lifetime markers if they have been emitted during
codegen. Otherwise if allocas from inlined functions are merged together,
lifetime markers from one function might invalidate load & stores performed
by the other one.
Fixes #72154 .
2020-05-16 22:16:48 +00:00
Aleksei Latyshev
cb7f9679a6
simplify multispan_sugg interface
...
- add `multispan_sugg_with_applicability`
- not it gets `&str` instead of `String`, like in `diag.multispan_suggestion`
2020-05-17 00:09:37 +03:00
Jonas Schievink
1e4b663005
Improve documentation for drop elaboration
2020-05-16 23:00:56 +02:00
ThibsG
e55b920970
Rename lint identity_conversion to useless_conversion
2020-05-16 22:50:20 +02:00
bors
cfd720d506
Auto merge of #5563 - ThibsG:MergeLints, r=flip1995
...
Merge some lints together
This PR merges following lints:
- `block_in_if_condition_expr` and `block_in_if_condition_stmt` → `blocks_in_if_conditions`
- `option_map_unwrap_or`, `option_map_unwrap_or_else` and `result_map_unwrap_or_else` → `map_unwrap`
- `option_unwrap_used` and `result_unwrap_used` → `unwrap_used`
- `option_expect_used` and `result_expect_used` → `expect_used`
- `wrong_pub_self_convention` into `wrong_self_convention`
- `for_loop_over_option` and `for_loop_over_result` → `for_loops_over_fallibles`
Lints that have already been merged since the issue was created:
- [x] `new_without_default` and `new_without_default_derive` → `new_without_default`
Need more discussion:
- `string_add` and `string_add_assign`: do we agree to merge them or not? Is there something more to do? → **not merge finally**
- `identity_op` and `modulo_one` → `useless_arithmetic`: seems outdated, since `modulo_arithmetic` has been created.
fixes #1078
changelog: Merging some lints together:
- `block_in_if_condition_expr` and `block_in_if_condition_stmt` → `blocks_in_if_conditions`
- `option_map_unwrap_or`, `option_map_unwrap_or_else` and `result_map_unwrap_or_else` → `map_unwrap_or`
- `option_unwrap_used` and `result_unwrap_used` → `unwrap_used`
- `option_expect_used` and `result_expect_used` → `expect_used`
- `for_loop_over_option` and `for_loop_over_result` → `for_loops_over_fallibles`
2020-05-16 20:17:11 +00:00
Jonas Schievink
9271f998d1
Fix issue number typo in note
2020-05-16 22:15:37 +02:00
Esteban Küber
47034db851
Fix whitespace in ?Sized structured suggestion
2020-05-16 12:56:21 -07:00