Mazdak Farrokhzad
6f1db996c1
Rollup merge of #69847 - GuillaumeGomez:cleanup-e0393, r=Dylan-DPC
...
clean up E0393 explanation
r? @Dylan-DPC
2020-03-10 06:47:56 +01:00
Mazdak Farrokhzad
436f2ec58c
Rollup merge of #69836 - JohnTitor:immediate-outputs, r=nagisa
...
Check if output is immediate value
Fixes #62046
r? @nagisa
2020-03-10 06:47:55 +01:00
Mazdak Farrokhzad
08095f4978
Rollup merge of #69817 - thekuom:test/borrow-checking-pattern-features, r=Centril
...
test(patterns): add patterns feature tests to borrowck test suite
Addresses request here: https://github.com/rust-lang/rust/pull/69690#issuecomment-595763571
Fixes https://github.com/rust-lang/rust/issues/67311 .
r? @Centril
2020-03-10 06:47:53 +01:00
Mazdak Farrokhzad
6ad5e69b5a
Rollup merge of #69799 - TimDiekmann:zst, r=Amanieu
...
Allow ZSTs in `AllocRef`
Allows ZSTs in all `AllocRef` methods. The implementation of `AllocRef` for `Global` and `System` were adjusted to reflect those changes.
This is the second item on the roadmap to support ZSTs in `AllocRef`: https://github.com/rust-lang/wg-allocators/issues/38#issuecomment-595861542
After this has landed, I will adapt `RawVec`, but since this will be a pretty big overhaul, it makes sense to do a different PR for it.
~~Requires #69794 to land first~~
r? @Amanieu
2020-03-10 06:47:52 +01:00
Mazdak Farrokhzad
977d69fc19
Rollup merge of #69714 - spastorino:place-ref-lifetime, r=oli-obk
...
Make PlaceRef take just one lifetime
r? @eddyb
2020-03-10 06:47:50 +01:00
Mazdak Farrokhzad
5a62acaf9e
Rollup merge of #69677 - petrochenkov:spancode, r=eddyb
...
rustc_metadata: Give decoder access to whole crate store
Pre-requisite for https://github.com/rust-lang/rust/pull/68941 .
r? @eddyb
2020-03-10 06:47:49 +01:00
Mazdak Farrokhzad
61150353bf
Rollup merge of #69514 - GuillaumeGomez:remove-spotlight, r=kinnison
...
Remove spotlight
I had a few comments saying that this feature was at best misunderstood or not even used so I decided to organize a poll about on [twitter](https://twitter.com/imperioworld_/status/1232769353503956994 ). After 87 votes, the result is very clear: it's not useful. Considering the amount of code we have just to run it, I think it's definitely worth it to remove it.
r? @kinnison
cc @ollie27
2020-03-10 06:47:47 +01:00
Mazdak Farrokhzad
5b08aad6d9
Rollup merge of #69475 - Zoxc:no-no-force, r=michaelwoerister
...
Remove the `no_force` query attribute
This removes the `no_force` query attribute and instead uses the `DepNodeParams` trait to find out if a query can be forced.
Also the `analysis` query is moved to the query macro.
r? @eddyb
2020-03-10 06:47:46 +01:00
Ayush Kumar Mishra
761c8c1eef
Removed trailing whitespace
2020-03-10 09:07:29 +05:30
Christopher Durham
a56196205b
Vec::new is const tstable in 1.39 not 1.32
2020-03-09 23:07:04 -04:00
Ayush Kumar Mishra
6f2c01bcfb
Add long error explanation for E0739
2020-03-10 08:33:14 +05:30
Chris Simpkins
c60d581eb1
update x.py tidy testing command
2020-03-09 23:00:41 -04:00
YI
0a0c850d73
fix test failure due to earlier emitted error
2020-03-10 10:54:48 +08:00
Chris Simpkins
4922b683de
remove trailing whitespace (tidy)
2020-03-09 22:15:41 -04:00
Chris Simpkins
9f734c978c
Add documentation of tool testing with x.py script
2020-03-09 22:04:59 -04:00
Chris Simpkins
259b06e33f
add documentation of x.py tool testing
2020-03-09 21:55:56 -04:00
Chris Simpkins
0982c58edc
update tidy documentation to recommend ./x.py test tidy
2020-03-09 21:40:00 -04:00
YI
906bb8d0e8
fix #62456
2020-03-10 09:30:24 +08:00
Vadim Petrochenkov
2e6528961c
builtin_macros: Add attribute macro #[cfg_accessible(path)]
2020-03-10 01:02:13 +03:00
Vadim Petrochenkov
552a8875bd
expand: Implement support for retrying macro expansions
2020-03-10 00:56:09 +03:00
Ayush Kumar Mishra
7b75c346d5
Add long error explanation for E0628 #61137
2020-03-10 02:04:48 +05:30
David Tolnay
a2364dc85f
Write backtrace fmt test using relative paths
...
For some reason the absolute paths were formatted differently on the
armhf-gnu target.
thread '<unnamed>' panicked at 'assertion failed: `(left == right)`
left: `"Backtrace [\n { fn: \"__rust_maybe_catch_panic\" },\n { fn: \"std::rt::lang_start_internal\", file: \"./rust/rt.rs\", line: 300 },\n { fn: \"std::rt::lang_start\", file: \"./rust/rt.rs\", line: 400 },\n]"`,
right: `"Backtrace [\n { fn: \"__rust_maybe_catch_panic\" },\n { fn: \"std::rt::lang_start_internal\", file: \"/rust/rt.rs\", line: 300 },\n { fn: \"std::rt::lang_start\", file: \"/rust/rt.rs\", line: 400 },\n]"`', src/libstd/backtrace.rs:486:5
2020-03-09 12:24:25 -07:00
Ralf Jung
911c75ff5f
also handle abort intrinsic with new machine hook
2020-03-09 20:18:48 +01:00
David Tolnay
33600e4d2d
Add test of Debug representation of Backtrace
2020-03-09 12:01:32 -07:00
David Tolnay
a9cc010c48
Make it possible to instantiate hardcoded Backtrace from test
2020-03-09 12:01:32 -07:00
David Tolnay
1f1ca877b7
Change disabled and unsupported backtraces to print using placeholder style
2020-03-09 12:01:32 -07:00
David Tolnay
db75b6a91f
Add quotes around filename in Backtrace debug
2020-03-09 12:01:31 -07:00
David Tolnay
3ba89e8750
Remove quotes around unknown fn placeholder in backtrace
2020-03-09 12:01:31 -07:00
Ralf Jung
f34e0664a1
remove no-longer needed span from Miri Machine hook
2020-03-09 19:58:58 +01:00
Vadim Petrochenkov
eafeb9a267
expand/builtin_macros: Minor cleanup
2020-03-09 20:50:48 +03:00
Dylan Nugent
7c60405dd6
Add note about localization to std::fmt docs
2020-03-09 12:31:33 -04:00
Dan Aloni
0605abe3bb
Use GetSystemTimePreciseAsFileTime if it is available
2020-03-09 18:23:23 +02:00
Ralf Jung
51b60b75e7
Improve readability
2020-03-09 16:56:45 +01:00
John Kåre Alsaker
2f120095b5
Add a comment to recover.
2020-03-09 14:50:40 +01:00
John Kåre Alsaker
f4450772ed
Remove the no_force query attribute
2020-03-09 14:50:40 +01:00
John Kåre Alsaker
cbce21767b
Remove the need for no_force
2020-03-09 14:50:40 +01:00
John Kåre Alsaker
67012158a3
Move analysis to the query macro
2020-03-09 14:50:40 +01:00
Matthew Kuo
b974d6fc30
test(patterns): add borrowck tests for combination of pattern features
...
Adds borrowck tests for the following features:
- bindings_after_at
- or_patterns
- slice_patterns
- box_patterns
2020-03-09 08:27:45 -05:00
bors
3dbade652e
Auto merge of #69851 - Centril:rollup-iivxvah, r=Centril
...
Rollup of 6 pull requests
Successful merges:
- #69201 (Permit attributes on 'if' expressions)
- #69685 (unix: Don't override existing SIGSEGV/BUS handlers)
- #69762 (Ensure that validity only raises validity errors)
- #69779 (librustc_codegen_llvm: Use slices in preference to 0-terminated strings)
- #69801 (rustc_parse: Remove `Parser::normalized(_prev)_token`)
- #69842 (Add more regression tests)
Failed merges:
r? @ghost
2020-03-09 11:58:17 +00:00
Mazdak Farrokhzad
7e903f82ff
Rollup merge of #69842 - JohnTitor:more-tests, r=Centril
...
Add more regression tests
Closes #54239
Closes #57200
Closes #57201
Closes #60473
Closes #64620
Closes #67166
r? @Centril
2020-03-09 12:57:54 +01:00
Mazdak Farrokhzad
2677d59298
Rollup merge of #69801 - petrochenkov:nonorm, r=Centril
...
rustc_parse: Remove `Parser::normalized(_prev)_token`
Perform the "normalization" (renamed to "uninterpolation") on the fly when necessary.
The final part of https://github.com/rust-lang/rust/pull/69579 https://github.com/rust-lang/rust/pull/69384 https://github.com/rust-lang/rust/pull/69376 https://github.com/rust-lang/rust/pull/69211 https://github.com/rust-lang/rust/pull/69034 https://github.com/rust-lang/rust/pull/69006 .
r? @Centril
2020-03-09 12:57:53 +01:00
Mazdak Farrokhzad
2409e70bdb
Rollup merge of #69779 - tmiasko:di-cstr, r=nagisa
...
librustc_codegen_llvm: Use slices in preference to 0-terminated strings
Additionally whenever possible match C API provided by the LLVM.
2020-03-09 12:57:51 +01:00
Mazdak Farrokhzad
c9bbfb9474
Rollup merge of #69762 - RalfJung:validity-errors, r=oli-obk
...
Ensure that validity only raises validity errors
For now, only as a debug-assertion (similar to const-prop detecting errors that allocate).
Now includes https://github.com/rust-lang/rust/pull/69646 .
[Relative diff](https://github.com/RalfJung/rust/compare/layout-visitor...RalfJung:validity-errors ).
r? @oli-obk
2020-03-09 12:57:50 +01:00
Mazdak Farrokhzad
eaf6905c55
Rollup merge of #69685 - cuviper:soft-segv, r=sfackler
...
unix: Don't override existing SIGSEGV/BUS handlers
Although `stack_overflow::init` runs very early in the process, even
before `main`, there may already be signal handlers installed for things
like the address sanitizer. In that case, just leave it alone, and don't
bother trying to allocate our own signal stacks either.
Fixes #69524 .
2020-03-09 12:57:48 +01:00
Mazdak Farrokhzad
4ec997503c
Rollup merge of #69201 - Aaron1011:feature/permit-if-attr, r=Centril
...
Permit attributes on 'if' expressions
Previously, attributes on 'if' expressions (e.g. `#[attr] if true {}`)
were disallowed during parsing. This made it impossible for macros to
perform any custom handling of such attributes (e.g. stripping them
away), since a compilation error would be emitted before they ever had a
chance to run.
This PR permits attributes on 'if' expressions ('if-attrs' from here on).
Both built-in attributes (e.g. `#[allow]`, `#[cfg]`) and proc-macro attributes are supported.
We still do *not* accept attributes on 'other parts' of an if-else
chain. That is, the following code snippet still fails to parse:
```rust
if true {} #[attr] else if false {} else #[attr] if false {} #[attr]
else {}
```
Closes https://github.com/rust-lang/rust/issues/68618
2020-03-09 12:57:44 +01:00
Ralf Jung
1a9fc18e83
panic_bounds_check: use caller_location, like PanicFnLangItem
2020-03-09 11:16:23 +01:00
Vadim Petrochenkov
7a30bb1676
Address review comments
2020-03-09 13:07:21 +03:00
Ralf Jung
8a8870fbae
miri: add machine hook for Abort terminator
2020-03-09 11:06:55 +01:00
Vadim Petrochenkov
9be233cbfe
Use Token::uninterpolate in couple more places matching on (Nt)Ident
2020-03-09 12:42:41 +03:00
Vadim Petrochenkov
5d7f67d3b1
rustc_parse: Remove Parser::normalized(_prev)_token
2020-03-09 12:42:41 +03:00