Commit Graph

109492 Commits

Author SHA1 Message Date
Dylan DPC
1bf4873aac
Rollup merge of #70540 - jonas-schievink:link-attr-template, r=varkor
#[link]: mention wasm_import_module instead of cfg

`#[link(cfg)]` is perma-unstable and is not documented anywhere else. It makes more sense to mention `wasm_import_module` here since it's stable.

This makes it harder to hit https://github.com/rust-lang/rust/issues/70538 (if it weren't for this text, I wouldn't even know this feature existed).
2020-03-29 21:23:53 +02:00
Dylan DPC
5a7b377b6f
Rollup merge of #70539 - DutchGhost:test-62220, r=Dylan-DPC
add test for 62220

Closes #62220

Adds a test for https://github.com/rust-lang/rust/issues/62220.

Im not sure whether `check-pass` is sufficient here. I didn't put `run-pass` in, as I'm afraid that'll fail due to the `unimplemented!()` return in the code.
2020-03-29 21:23:52 +02:00
Dylan DPC
d009ce441f
Rollup merge of #69702 - anyska:tylayout-rename, r=oli-obk
Rename TyLayout to TyAndLayout.
2020-03-29 21:23:50 +02:00
Dylan MacKenzie
b641e9e358 Make Visitor::visit_body take a simple Body 2020-03-29 11:56:36 -07:00
Bastian Kauschke
8b762c5537
prohibit_generics: update has_err for consts 2020-03-29 18:34:42 +02:00
Dodo
61d419314f add a build-pass test for issue 62220 2020-03-29 18:27:54 +02:00
Russell Cohen
bceab25d6c Cleanup match expression 2020-03-29 12:02:28 -04:00
Jonas Schievink
042f4941e7 #[link]: mention wasm_import_module instead of cfg 2020-03-29 17:40:04 +02:00
Russell Cohen
82b2989ae0 More raw string tests 2020-03-29 11:34:15 -04:00
Russell Cohen
c15f86b4b3 Cleanup error messages, improve docstrings 2020-03-29 11:12:48 -04:00
bors
285519d412 Auto merge of #70534 - Centril:rollup-t59tcx2, r=Centril
Rollup of 3 pull requests

Successful merges:

 - #70140 (Add Result<Result<T, E>, E>::flatten -> Result<T, E>)
 - #70526 (reduce `rustc_attr` usage in places)
 - #70527 (Update LLVM submodule)

Failed merges:

r? @ghost
2020-03-29 14:48:58 +00:00
Mazdak Farrokhzad
b851591731
Rollup merge of #70527 - Amanieu:fix_fastisel, r=Mark-Simulacrum
Update LLVM submodule

Fixes #70148
2020-03-29 16:48:24 +02:00
Mazdak Farrokhzad
b4491e50d5
Rollup merge of #70526 - Centril:less-attr, r=eddyb
reduce `rustc_attr` usage in places

This cleans up some unused `rustc_attr` dependencies.
2020-03-29 16:48:23 +02:00
Mazdak Farrokhzad
8212a1c7dc
Rollup merge of #70140 - Nemo157:result-flatten, r=Amanieu
Add Result<Result<T, E>, E>::flatten -> Result<T, E>

This PR makes this possible (modulo type inference):

```rust
assert_eq!(Ok(6), Ok(Ok(6)).flatten());
```

Tracking issue: #70142

<sub>largely cribbed directly from <https://github.com/rust-lang/rust/pull/60256></sub>
2020-03-29 16:48:21 +02:00
Stein Somers
0405db3a34 BTreeMap/BTreeSet: implement and test drain_filter 2020-03-29 16:05:53 +02:00
Stein Somers
a6cae3d5cf Add benchmarks of drain_filter-like behaviour 2020-03-29 16:05:53 +02:00
Amanieu d'Antras
4a4314e3e7 Update LLVM submodule 2020-03-29 11:12:55 +01:00
Mazdak Farrokhzad
59a69708e1 reduce rustc_attr usage in places 2020-03-29 12:01:11 +02:00
Tim Diekmann
c49f28005d Fix links for AllocInit methods 2020-03-29 12:00:51 +02:00
Tim Diekmann
fcd7092ae1 Revert "Fix links for AllocInit methods"
This reverts commit d241db2d4e.
2020-03-29 11:57:25 +02:00
bors
8ab82b87af Auto merge of #70525 - Centril:rollup-vj3esv3, r=Centril
Rollup of 3 pull requests

Successful merges:

 - #68692 (impl From<[T; N]> for Vec<T>)
 - #70101 (Add copy bound to atomic & numeric intrinsics)
 - #70506 (BTreeMap testing: introduce symbolic constants and use height consistently)

Failed merges:

r? @ghost
2020-03-29 09:50:52 +00:00
Mazdak Farrokhzad
f31e56309a
Rollup merge of #70506 - ssomers:btreemap_testing_consts, r=RalfJung
BTreeMap testing: introduce symbolic constants and use height consistently

Doesn't change what or how much is tested, except for some exact integer types, just for convenience and because `node::CAPACITY` is a usize.

r? @RalfJung
2020-03-29 11:50:13 +02:00
Mazdak Farrokhzad
873bf46dc1
Rollup merge of #70101 - tmiasko:intrinsics-copy, r=eddyb
Add copy bound to atomic & numeric intrinsics
2020-03-29 11:50:12 +02:00
Mazdak Farrokhzad
c51fcb5f38
Rollup merge of #68692 - jyn514:vec-from-array, r=LukasKalbertodt
impl From<[T; N]> for Vec<T>

Closes https://github.com/rust-lang/rust/issues/67963
2020-03-29 11:50:10 +02:00
bors
8045865873 Auto merge of #70370 - petrochenkov:nosmatch, r=Centril
Remove attribute `#[structural_match]` and any references to it

A small remaining part of https://github.com/rust-lang/rust/issues/63438.
2020-03-29 06:33:42 +00:00
Russell Cohen
629e97a5a0 Improve error messages for raw strings (#60762)
This diff improves error messages around raw strings in a few ways:
- Catch extra trailing `#` in the parser. This can't be handled in the lexer because we could be in a macro that actually expects another # (see test)
- Refactor & unify error handling in the lexer between ByteStrings and RawByteStrings
- Detect potentially intended terminators (longest sequence of "#*" is suggested)
2020-03-29 00:43:43 -04:00
Tim Diekmann
d241db2d4e Fix links for AllocInit methods 2020-03-29 03:16:23 +01:00
bors
150322f86d Auto merge of #70518 - Dylan-DPC:rollup-n2gkh3a, r=Dylan-DPC
Rollup of 5 pull requests

Successful merges:

 - #69937 (ASCII methods on OsStr)
 - #70235 (Validate git setup before accessing functionality)
 - #70503 (rename Scalar::{ptr_null -> null_ptr} and add "machine_" prefix like elsewhere)
 - #70508 (Miri: use more specialized Scalar::from_ constructors where appropriate)
 - #70510 (fix TryEnterCriticalSection return type)

Failed merges:

r? @ghost
2020-03-29 00:56:47 +00:00
Tim Diekmann
4309f6d9a1 Minor doc fixes in AllocInit::init 2020-03-29 01:52:21 +01:00
Tim Diekmann
3ade8ae660 Implement init and init_offset on AllocInit and mark it unsafe 2020-03-29 01:47:05 +01:00
Dylan DPC
be8d896a4e
Rollup merge of #70510 - RalfJung:bool-vs-boolean, r=Mark-Simulacrum
fix TryEnterCriticalSection return type

Source: https://docs.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-tryentercriticalsection
Fixes https://github.com/rust-lang/rust/issues/70504
2020-03-29 01:32:23 +01:00
Dylan DPC
acc1dc2906
Rollup merge of #70508 - RalfJung:scalar-from, r=eddyb
Miri: use more specialized Scalar::from_ constructors where appropriate
2020-03-29 01:32:22 +01:00
Dylan DPC
96e2934886
Rollup merge of #70503 - RalfJung:null, r=varkor
rename Scalar::{ptr_null -> null_ptr} and add "machine_" prefix like elsewhere

"NULL pointer" is just much more common terminology than "pointer-null".
Also I forgot two methods when renaming all the `Scalar` things to `(to|from)_machine_(u|i)size`.
2020-03-29 01:32:21 +01:00
Dylan DPC
a0d6eedfad
Rollup merge of #70235 - dillona:70182-check-before-using-git, r=Mark-Simulacrum
Validate git setup before accessing functionality

Closes #70182
2020-03-29 01:32:19 +01:00
Dylan DPC
d584f5a386
Rollup merge of #69937 - TyPR124:osstr_ascii, r=dtolnay
ASCII methods on OsStr

Would close #69566

I don't know enough about encodings to know if this is a valid change, however the comment on the issue suggests it could be.

This does two things:

1. Makes ASCII methods available on OsStr

2. Makes it possible to obtain a `&mut OsStr`. This is necessary to actually use `OsStr::make_ascii_*case` methods since they modify the underlying value. As far as I can tell, the only way to modify a `&mut OsStr` is via the methods I just added.

My original hope was to have these methods on `OsStrExt` for Windows, since the standard library already assumes `make_ascii_uppercase` is valid in Windows (see the change I made to windows/process.rs). If it is found these are not valid changes on non-Windows platforms, I can move the methods to the ext trait instead.
2020-03-29 01:32:17 +01:00
TyPR124
271d43b158 add tracking issue 2020-03-28 19:23:49 -04:00
TyPR124
ca4b40348e move doc links for consistency 2020-03-28 18:35:20 -04:00
TyPR124
3781a1a2ac remove unnecessary comments 2020-03-28 18:34:49 -04:00
TyPR124
235700fea0 use make_ascii_uppercase in windows/process.rs 2020-03-28 18:34:49 -04:00
TyPR124
cc584d5166 ascii methods on osstr 2020-03-28 18:34:48 -04:00
Stein Somers
e92d740b35 BTreeMap testing: introduce symbolic constants and refer to height consistently. 2020-03-28 23:30:43 +01:00
Dylan MacKenzie
4d1194c31a Ensure output dir for dataflow results exists 2020-03-28 14:09:34 -07:00
Dylan MacKenzie
c8004027ba Dump graphviz dataflow results with flag 2020-03-28 14:09:12 -07:00
Dylan MacKenzie
edbd7c8602 dump_enabled takes a DefId instead of MirSource 2020-03-28 14:07:07 -07:00
Dylan MacKenzie
4d099e6308 Add -Z dump-mir-dataflow 2020-03-28 14:05:59 -07:00
bors
77621317d6 Auto merge of #66938 - GuillaumeGomez:lint-for-no-crate-level-doc, r=Dylan-DPC
Add lint when no doc is present at the crate-level

Follow-up of #66267.

r? @kinnison
2020-03-28 20:11:01 +00:00
Ralf Jung
38c8ba33ef fix TryEnterCriticalSection return type 2020-03-28 21:10:11 +01:00
Tim Diekmann
bf6a46db31 Make fields in MemoryBlock public 2020-03-28 20:22:07 +01:00
Ralf Jung
bd9e046496 refmt 2020-03-28 19:51:54 +01:00
Ralf Jung
1f53fdc82c get rid of useless back-and-forth cast 2020-03-28 19:40:58 +01:00