Aman Arora
c923da0b49
pretty.rs: Update Closure and Generator print
...
Co-authored-by: Dhruv Jauhar <dhruvjhr@gmail.com>
Co-authored-by: Logan Mosier <logmosier@gmail.com>
2020-09-28 01:27:19 -04:00
bors
d902752866
Auto merge of #77118 - exrook:stability-generic-parameters-2, r=varkor
...
Stability annotations on generic parameters (take 2.5)
Rebase of #72314 + more tests
Implements rust-lang/wg-allocators#2 .
2020-09-27 12:51:21 +00:00
bors
62fe055aba
Auto merge of #76986 - jonas-schievink:ret-in-reg, r=nagisa
...
Return values up to 128 bits in registers
This fixes https://github.com/rust-lang/rust/issues/26494#issuecomment-619506345 by making Rust's default ABI pass return values up to 128 bits in size in registers, just like the System V ABI.
The result is that these methods from the comment linked above now generate the same code, making the Rust ABI as efficient as the `"C"` ABI:
```rust
pub struct Stats { x: u32, y: u32, z: u32, }
pub extern "C" fn sum_c(a: &Stats, b: &Stats) -> Stats {
return Stats {x: a.x + b.x, y: a.y + b.y, z: a.z + b.z };
}
pub fn sum_rust(a: &Stats, b: &Stats) -> Stats {
return Stats {x: a.x + b.x, y: a.y + b.y, z: a.z + b.z };
}
```
```asm
sum_rust:
movl (%rsi), %eax
addl (%rdi), %eax
movl 4(%rsi), %ecx
addl 4(%rdi), %ecx
movl 8(%rsi), %edx
addl 8(%rdi), %edx
shlq $32, %rcx
orq %rcx, %rax
retq
```
2020-09-27 02:35:11 +00:00
Jonas Schievink
593b38be6a
Rollup merge of #77209 - jyn514:fix-docs, r=petrochenkov
...
Fix documentation highlighting in ty::BorrowKind
Previously it looked a little odd: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/enum.BorrowKind.html#variant.UniqueImmBorrow
Noticed this while reviewing https://github.com/rust-lang/rustc-dev-guide/pull/894 .
2020-09-27 01:53:25 +02:00
Jonas Schievink
4c5acc4ed7
Return values up to 128 bits in registers
2020-09-26 15:34:26 +02:00
Ralf Jung
9e02642fb3
Rollup merge of #77211 - est31:remove_unused_allow, r=oli-obk
...
Remove unused #[allow(...)] statements from compiler/
2020-09-26 12:58:34 +02:00
Ralf Jung
67f8c5914f
Rollup merge of #77204 - LingMan:patch-3, r=jonas-schievink
...
Remove stray word from `ClosureKind::extends` docs
2020-09-26 12:58:30 +02:00
Ralf Jung
ac8169dc10
Rollup merge of #77093 - lcnr:const-generics-infer-warning, r=varkor
...
merge `need_type_info_err(_const)`
I hoped that this would automatically solve #76737 but it doesn't quite seem like it
fixes #77092
r? @varkor
2020-09-26 12:58:17 +02:00
bors
fd15e6180d
Auto merge of #70743 - oli-obk:eager_const_to_pat_conversion, r=eddyb
...
Fully destructure constants into patterns
r? `@varkor`
as discussed in https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/constants.20in.20patterns/near/192789924
we should probably crater it once reviewed
2020-09-26 06:44:28 +00:00
est31
12187b7f86
Remove unused #[allow(...)] statements from compiler/
2020-09-26 01:25:55 +02:00
Joshua Nelson
58d57f3f5e
Fix documentation highlighting in ty::BorrowKind
...
Previously it looked a little odd: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/enum.BorrowKind.html#variant.UniqueImmBorrow
2020-09-25 18:54:05 -04:00
marmeladema
5946c12476
Move is_raw_guess
check in ty::print::pretty
2020-09-25 22:48:44 +01:00
marmeladema
35bad3edbf
Address review comment
2020-09-25 22:48:44 +01:00
marmeladema
23085b6360
Fix profiling query key creation
2020-09-25 22:46:15 +01:00
marmeladema
657ecdb75e
Rename DefPathData::get_name()
to DefPathData::name()
2020-09-25 22:46:15 +01:00
marmeladema
2708ad8bb4
Fix pretty-printing of DisambiguatedDefPathData
2020-09-25 22:46:15 +01:00
marmeladema
9f50c49117
Implement Display
for DisambiguatedDefPathData
and DefPathData
2020-09-25 22:46:15 +01:00
marmeladema
f1878d19fa
Move from {{closure}}#0 syntax to {closure#0} for (def) path components
2020-09-25 22:46:14 +01:00
LingMan
900daba2cb
Remove stray word from ClosureKind::extends
docs
2020-09-25 23:35:07 +02:00
Jonas Schievink
e739468f97
Rollup merge of #77155 - lcnr:ImplSource, r=ecstatic-morse
...
remove enum name from ImplSource variants
This is quite a lot cleaner in my opinion.
2020-09-25 19:42:48 +02:00
bors
5b9e886403
Auto merge of #73453 - erikdesjardins:tuplayout, r=eddyb
...
Ignore ZST offsets when deciding whether to use Scalar/ScalarPair layout
This is important because Scalar/ScalarPair layout previously would not be used if any ZST had nonzero offset.
For example, before this change, only `((), u128)` would be laid out like `u128`, not `(u128, ())`.
Fixes #63244
2020-09-25 14:42:20 +00:00
bors
b984ef6797
Auto merge of #77152 - vandenheuvel:update_chalk_further, r=jackh726
...
Update chalk to 0.28.0
2020-09-25 12:22:05 +00:00
Jonas Schievink
8515efb193
Rollup merge of #77165 - simonvandel:do-not-fire-on-drop-and-replace, r=oli-obk
...
Followup to #76673
Resolves https://github.com/rust-lang/rust/pull/76673#discussion_r494426303
r? @tmiasko
2020-09-25 02:29:52 +02:00
Jonas Schievink
6f3da3d53f
Rollup merge of #77121 - duckymirror:html-root-url, r=jyn514
...
Updated html_root_url for compiler crates
Closes #77103
r? @jyn514
2020-09-25 02:29:45 +02:00
Simon Vandel Sillesen
7dec440340
Resolve https://github.com/rust-lang/rust/pull/76673#discussion_r494426303
2020-09-24 21:02:53 +02:00
Bram van den Heuvel
51c781f613
Upgrade chalk to 0.28.0
2020-09-24 20:54:33 +02:00
Bastian Kauschke
1857184cd1
remove enum name from ImplSource variants
2020-09-24 19:22:36 +02:00
Bram van den Heuvel
5f67571e34
Update chalk to 0.27.0
2020-09-24 19:10:01 +02:00
Bram van den Heuvel
61b2a6f5e5
Update chalk to 0.26.0
2020-09-24 19:10:01 +02:00
Bram van den Heuvel
ed784023e5
Update chalk to 0.25.0
2020-09-24 19:10:01 +02:00
Bram van den Heuvel
cb660c6ab5
Update chalk to 0.24.0
2020-09-24 19:10:01 +02:00
Bram van den Heuvel
52eeff6fbe
Update chalk to 0.23.0
2020-09-24 19:10:00 +02:00
Bram van den Heuvel
b832a97a51
Update chalk to 0.22.0
2020-09-24 19:10:00 +02:00
bors
87d262acb5
Auto merge of #77006 - oli-obk: 🐌 _const_queries, r=Mark-Simulacrum
...
Cache `eval_to_allocation_raw` on disk
https://github.com/rust-lang/rust/pull/74949#issuecomment-695833161 regressed the performance on these queries, this PR gets the perf back.
2020-09-24 15:12:17 +00:00
Oliver Scherer
40629ef827
Always cache const eval queries
2020-09-24 17:09:09 +02:00
bors
893fadd11a
Auto merge of #76820 - jyn514:query-comments, r=davidtwco
...
Preserve doc-comments when generating queries
Closes https://github.com/rust-lang/rust/issues/76812
2020-09-24 13:01:46 +00:00
bors
86b4172305
Auto merge of #77028 - andjo403:mini, r=matthewjasper
...
Move MiniSet to data_structures
remove the need for T to be copy from MiniSet as was done for MiniMap
MiniMap and MiniSet was added by https://github.com/rust-lang/rust/pull/72412
think that this can be used in https://github.com/rust-lang/rust/pull/68828
2020-09-24 08:14:30 +00:00
Erik Hofmayer
138a2e5eaa
/nightly/nightly-rustc
2020-09-23 21:51:56 +02:00
Erik Hofmayer
dd66ea2d3d
Updated html_root_url for compiler crates
2020-09-23 21:14:43 +02:00
Dylan DPC
bcdbe79f0c
Rollup merge of #76994 - yuk1ty:fix-small-typo, r=estebank
...
fix small typo in docs and comments
Fixed `the the` to `the`, as far as I found.
2020-09-23 14:54:07 +02:00
Dylan DPC
98e5ee7df0
Rollup merge of #76939 - lcnr:const-evaluatable-cont, r=oli-obk
...
emit errors during AbstractConst building
There changes are currently still untested, so I don't expect this to pass CI 😆
It seems to me like this is the direction we want to go in, though we didn't have too much of a discussion about this.
r? @oli-obk
2020-09-23 14:54:02 +02:00
Bastian Kauschke
0e84b61053
use relevant span when unifying ConstVarValue
s
2020-09-23 11:00:44 +02:00
Bastian Kauschke
45d92b43e3
merge need_type_info_err(_const)
2020-09-23 09:24:58 +02:00
Andreas Jonson
6586c37bec
Move MiniSet to data_structures
...
remove the need for T to be copy from MiniSet as was done for MiniMap
2020-09-23 08:09:16 +02:00
Avi Dessauer
25dba40cbe
Update src/librustc_middle/middle/stability.rs
...
Co-authored-by: varkor <github@varkor.com>
2020-09-22 21:55:35 -04:00
Avi Dessauer
19e90843a4
Add documentation
2020-09-22 21:55:23 -04:00
Avi Dessauer
3947591ee8
Remove now unneeded check_stability argument
2020-09-22 21:54:16 -04:00
Avi Dessauer
a7a2086053
Stability annotations on generic trait parameters
2020-09-22 21:53:48 -04:00
ecstatic-morse
50d4aebc7a
Rollup merge of #76914 - lcnr:path-no-more, r=ecstatic-morse
...
extend `Ty` and `TyCtxt` lints to self types
blocked on #76891
r? @ecstatic-morse cc @Aaron1011
2020-09-21 20:40:57 -07:00
ecstatic-morse
dcf4d1f2be
Rollup merge of #76888 - matthiaskrgr:clippy_single_match_2, r=Dylan-DPC
...
use if let instead of single match arm expressions
use if let instead of single match arm expressions to compact code and reduce nesting (clippy::single_match)
2020-09-21 20:40:55 -07:00