Commit Graph

109561 Commits

Author SHA1 Message Date
Dylan DPC
53d786f404
Rollup merge of #70728 - TimDiekmann:allocref-doc, r=Amanieu
Minor doc improvements on `AllocRef`

r? @Amanieu
2020-04-03 13:31:27 +02:00
Dylan DPC
b91c376e4a
Rollup merge of #70725 - Centril:nix-unwraps, r=estebank
Avoid `.unwrap()`s on `.span_to_snippet(...)`s

First commit fixes https://github.com/rust-lang/rust/issues/70724 and the others fix similar issues found by grepping.

r? @estebank
2020-04-03 13:31:25 +02:00
Dylan DPC
5082fe21a8
Rollup merge of #70706 - gizmondo:check-theme, r=GuillaumeGomez
Minor cleanup in rustdoc --check-theme

Expand and remove try_something macro. Since 2f6226518b there has been only one invocation.

r? @GuillaumeGomez
2020-04-03 13:31:24 +02:00
Dylan DPC
ea28134f2d
Rollup merge of #70696 - jumbatm:extend-issue-69020-test, r=RalfJung
Extend #69020 test to include reversed operand order.

Make sure we still emit if a lint if the generic argument comes first. See https://github.com/rust-lang/rust/pull/70566#issuecomment-607671340.

r? @RalfJung
2020-04-03 13:31:22 +02:00
bors
424c793925 Auto merge of #70582 - pnkfelix:update-llvm-to-fix-69841, r=cuviper
Fix #69841 by updating LLVM submodule.

Fix #69841 by updating LLVM submodule.

Includes regression test for issue 69841.
2020-04-03 07:26:00 +00:00
Tim Diekmann
c061ff4b69
Update mod.rs 2020-04-03 08:22:31 +02:00
Tim Diekmann
d8b0c5fb37 Minor doc improvements on AllocRef 2020-04-03 07:28:23 +02:00
bors
548afdbe1a Auto merge of #70726 - Centril:rollup-zrdkkpt, r=Centril
Rollup of 5 pull requests

Successful merges:

 - #68334 (AArch64 bare-metal targets: Build rust-std)
 - #70224 (Clean up rustdoc js testers)
 - #70532 (Miri engine: stronger type-based sanity check for assignments)
 - #70698 (bootstrap: add `--json-output` for rust-analyzer)
 - #70715 (Fix typo in operands section)

Failed merges:

r? @ghost
2020-04-03 04:18:32 +00:00
Mazdak Farrokhzad
c2372f109e
Rollup merge of #70715 - awh6al:patch-1, r=Dylan-DPC
Fix typo in operands section
2020-04-03 03:26:52 +02:00
Mazdak Farrokhzad
17f204feee
Rollup merge of #70698 - nikomatsakis:x-py-json-output, r=Mark-Simulacrum
bootstrap: add `--json-output` for rust-analyzer

Motivation is that this allows us to customize rust-analyzer's "cargo watch" integration to run x.py. You simply have to set the command to run to be `x.py --json-output`

r? @Mark-Simulacrum -- feel free to make changes, this is quick and dirty for sure
2020-04-03 03:26:50 +02:00
Mazdak Farrokhzad
4f0a791d5d
Rollup merge of #70532 - RalfJung:miri-assign, r=eddyb
Miri engine: stronger type-based sanity check for assignments

r? @oli-obk @eddyb
Fixes https://github.com/rust-lang/rust/issues/70405

That issue says
> be sure to also add appropriate mutability checks to the patterns (mutable for the source, immutable for the dest)

I decided not to do that because I see no good reason to do it. The engine does not care either way, the assignment will happen correctly.
2020-04-03 03:26:49 +02:00
Mazdak Farrokhzad
a80b491ef2
Rollup merge of #70224 - GuillaumeGomez:clean-up-rustdoc-js-testers, r=Dylan-DPC
Clean up rustdoc js testers

I realized after the improvement made by @ollie27 on the rustdoc-js-tester that a lot of code was actually duplicated. This PR intends to remove this duplication, making it simpler to update in case of future main.js updates.

r? @ollie27

cc @kinnison
2020-04-03 03:26:47 +02:00
Mazdak Farrokhzad
73f0cf69c1
Rollup merge of #68334 - andre-richter:master, r=japaric
AArch64 bare-metal targets: Build rust-std

This PR complements https://github.com/rust-lang/rust/pull/68253
2020-04-03 03:26:45 +02:00
bors
c53e4b3877 Auto merge of #70642 - eddyb:remap-sysroot-src, r=Mark-Simulacrum
Translate the virtual `/rustc/$hash` prefix back to a real directory.

Closes #53486 and fixes #53081, by undoing the remapping to `/rustc/$hash` on the fly, when appropriate (e.g. our testsuites, or user crates that depend on `libstd`), but not during the Rust build itself (as that could leak the absolute build directory into the artifacts, breaking deterministic builds).

Tested locally by setting `remap-debuginfo = true` in `config.toml`, which without these changes, was causing 56 tests to fail (see https://github.com/rust-lang/rust/issues/53081#issuecomment-606703215 for more details).

cc @Mark-Simulacrum @alexcrichton @ehuss
2020-04-03 01:22:39 +00:00
Mazdak Farrokhzad
5cb5ddeb3c .unwrap() less on .span_to_snippet() 2020-04-03 03:17:40 +02:00
Mazdak Farrokhzad
08a724967e get_fn_like_arguments: avoid .unwrap 2020-04-03 03:00:24 +02:00
Mazdak Farrokhzad
9c0826902f add_type_neq_err_label: don't .unwrap 2020-04-03 02:28:23 +02:00
jumbatm
0399d141b6 Add comment explaining the reversed operands tests
Also, fix the goofy reversed names with something clearer.
2020-04-03 08:58:00 +10:00
bors
c520802785 Auto merge of #70722 - Centril:rollup-ar4gn1x, r=Centril
Rollup of 7 pull requests

Successful merges:

 - #70487 (Stabilize float::to_int_unchecked)
 - #70595 (Remove unused discriminant reads from MIR bodies)
 - #70691 (Improve docs in `AllocRef`)
 - #70694 (Use Self over specific type in return position)
 - #70700 (Expand on platform details of `include_xxx` macros)
 - #70708 (Fix typo in u8::to_ascii_uppercase and u8::to_ascii_lowercase)
 - #70716 (Unerase regions in infer_placeholder_type)

Failed merges:

r? @ghost
2020-04-02 22:32:52 +00:00
Mazdak Farrokhzad
98cf9d9aac
Rollup merge of #70716 - matthewjasper:infer-const-type-regions, r=eddyb
Unerase regions in infer_placeholder_type

closes #70608
2020-04-03 00:32:09 +02:00
Mazdak Farrokhzad
2f28058a34
Rollup merge of #70708 - Pocakking:fix-ascii-case-conv-typo, r=sfackler
Fix typo in u8::to_ascii_uppercase and u8::to_ascii_lowercase

Corrects misspelling of fifth.
2020-04-03 00:32:07 +02:00
Mazdak Farrokhzad
28084a1f36
Rollup merge of #70700 - jrvidal:include-macro-paths, r=Dylan-DPC
Expand on platform details of `include_xxx` macros

This is a small detail that is not explicitly mentioned, but it left me scratching my head for a while until I looked into its implementation details. Maybe worth mentioning.
2020-04-03 00:32:06 +02:00
Mazdak Farrokhzad
c00a21c2e3
Rollup merge of #70694 - lzutao:self, r=Centril
Use Self over specific type in return position
2020-04-03 00:32:04 +02:00
Mazdak Farrokhzad
e07f57c51c
Rollup merge of #70691 - TimDiekmann:allocref-docs, r=RalfJung
Improve docs in `AllocRef`

r? @RalfJung
2020-04-03 00:32:03 +02:00
Mazdak Farrokhzad
4cba69e585
Rollup merge of #70595 - wesleywiser:remove_unused_discriminant_reads, r=oli-obk
Remove unused discriminant reads from MIR bodies

Allow the `SimplifyLocals` pass to remove reads of discriminants if the
read is never used.

Fixes #70531

r? @oli-obk
2020-04-03 00:32:01 +02:00
Mazdak Farrokhzad
1eabbd024c
Rollup merge of #70487 - Mark-Simulacrum:float-unchecked-casts, r=SimonSapin
Stabilize float::to_int_unchecked

This renames and stabilizes unsafe floating point to integer casts, which are intended to be the substitute for the currently unsound `as` behavior, once that changes to safe-but-slower saturating casts. As such, I believe this also likely unblocks #10184 (our oldest I-unsound issue!), as once this rolls out to stable it would be far easier IMO to change the behavior of `as` to be safe by default.

This does not stabilize the trait or the associated method, as they are deemed internal implementation details (and consumers should not, generally, want to expose them, as in practice all callers likely know statically/without generics what the return type is).

Closes #67058
2020-04-03 00:32:00 +02:00
Ralf Jung
343b3f010c switch assignment check back to testing layout equality 2020-04-02 23:45:38 +02:00
@ßd€łw@ħ@ß
56918e52d1
remove confusing about lvalues term 2020-04-02 22:20:43 +01:00
Ralf Jung
351b7d099a also use mir_assign_valid_types in from_known_layout check 2020-04-02 22:42:56 +02:00
Ralf Jung
100c809386 also accept fn-ptr-type-changing assignments 2020-04-02 22:33:47 +02:00
Ralf Jung
f1ea273133 Miri engine: stronger type-based sanity check for assignments 2020-04-02 22:33:47 +02:00
Matthew Jasper
a12ebd3027 unerase regions in infer_placeholder_type 2020-04-02 20:31:51 +01:00
@ßd€łw@ħ@ß
6eccce2cc8
fix type in operands section 2020-04-02 20:30:46 +01:00
Pocakking
354ddbfb3f Fix typo in u8::to_ascii_uppercase and u8::to_ascii_lowercase
fith => fifth
2020-04-02 20:01:29 +02:00
Alex Aktsipetrov
12785dd89c Expand and remove try_something macro.
Since 2f6226518b
there has been only one invocation.
2020-04-02 19:55:56 +02:00
bors
537ccdf3ac Auto merge of #70692 - Centril:rollup-d0t4ecx, r=Centril
Rollup of 8 pull requests

Successful merges:

 - #70281 (Implement Hash for Infallible)
 - #70421 (parse: recover on `const fn()` / `async fn()`)
 - #70615 (Renamed `PerDefTables` to `Tables`)
 - #70631 (Update cargo)
 - #70634 (Remove some reexports in `rustc_middle`)
 - #70658 (add `STILL_FURTHER_SPECIALIZABLE` flag)
 - #70678 (Add missing markdown rust annotation)
 - #70681 (Handle unterminated raw strings with no #s properly)

Failed merges:

r? @ghost
2020-04-02 15:33:19 +00:00
Niko Matsakis
e992565857 bootstrap: add --json-output for rust-analyzer 2020-04-02 10:36:25 -04:00
Roberto Vidal
65fcc3f1cd Expand on platform details of include_xxx macros 2020-04-02 16:34:43 +02:00
jumbatm
de02a9ed67 Move #69020 test to ui/associated-const + rebless. 2020-04-02 23:21:13 +10:00
jumbatm
0d73bb926c Extend #69020 test to include reversed order.
Make sure we check the case where the generic operand comes first, in
case any future changes make this ordering matter.
2020-04-02 22:45:40 +10:00
Mazdak Farrokhzad
ec0da7222d
Rollup merge of #70681 - rcoh:russell/70677-raw-str-panic, r=petrochenkov
Handle unterminated raw strings with no #s properly

The modified code to handle parsing raw strings didn't properly account for the case where there was no "#" on either end and erroneously reported this strings as complete. This lead to a panic trying to read off the end of the file.

Fixes #70677

r? @petrochenkov

cc @Centril
2020-04-02 14:28:03 +02:00
Mazdak Farrokhzad
c10f214ddc
Rollup merge of #70678 - lzutao:patch-1, r=Dylan-DPC
Add missing markdown rust annotation
2020-04-02 14:28:01 +02:00
Mazdak Farrokhzad
857942eed0
Rollup merge of #70658 - davidtwco:issue-70285-still-further-specializable, r=eddyb
add `STILL_FURTHER_SPECIALIZABLE` flag

Contributes to #70285.

This PR adds a `STILL_FURTHER_SPECIALIZABLE` flag to `TypeFlags`
which replaces `needs_infer` and `needs_subst` in `Instance::resolve`
and `assemble_candidates_from_impls`.

r? @eddyb
2020-04-02 14:28:00 +02:00
Mazdak Farrokhzad
791e872c53
Rollup merge of #70634 - Centril:import-directly, r=Mark-Simulacrum
Remove some reexports in `rustc_middle`

This will help get these imports out of the way of detecting the true dependencies in and out to `rustc_middle`, thereby helping future work towards https://github.com/rust-lang/rust/issues/65031.
2020-04-02 14:27:58 +02:00
Mazdak Farrokhzad
eefa78ebf0
Rollup merge of #70631 - ehuss:update-cargo, r=ehuss
Update cargo

8 commits in 8a0d4d9c9abc74fd670353094387d62028b40ae9..6e07d2dfb7fc87b1c9489de41da4dafa239daf03
2020-03-24 17:57:04 +0000 to 2020-03-31 03:22:39 +0000
- Fix man page typo for "Owner Options". (rust-lang/cargo#8057)
- enable progress bar on all UNIX platforms (rust-lang/cargo#8054)
- Squelch some rustdoc warnings. (rust-lang/cargo#8052)
- Remove clippy tests. (rust-lang/cargo#8053)
- Fix -Zfeatures=itarget with certain host dependencies (rust-lang/cargo#8048)
- Checking for binary that is built as an implicit dependency of an integration test. (rust-lang/cargo#8020)
- Use stabilized version of rustdoc's --crate-version (rust-lang/cargo#8039)
- Remove the `git-checkout` subcommand. (rust-lang/cargo#8040)
2020-04-02 14:27:57 +02:00
Mazdak Farrokhzad
f3559973cb
Rollup merge of #70615 - Lezzz:rename-tables, r=oli-obk
Renamed `PerDefTables` to `Tables`

Originally suggested by @eddyb
2020-04-02 14:27:55 +02:00
Mazdak Farrokhzad
03591e8a78
Rollup merge of #70421 - Centril:recover-const-async-fn-ptr, r=estebank
parse: recover on `const fn()` / `async fn()`

Recover on `const fn()` and `async fn()` function pointers, suggesting to remove the qualifier.
For example:
```
error: an `fn` pointer type cannot be `async`
  --> $DIR/recover-const-async-fn-ptr.rs:6:11
   |
LL | type T3 = async fn();
   |           -----^^^^^
   |           |
   |           `async` because of this
   |           help: remove the `async` qualifier
```

r? @estebank
2020-04-02 14:27:54 +02:00
Mazdak Farrokhzad
cb81b41c9a
Rollup merge of #70281 - xfix:infallible-hash, r=dtolnay
Implement Hash for Infallible

https://www.reddit.com/r/rust/comments/fmllgx/never_crate_stable_alternative_to/ lists not implementing `Hash` as a reason for the `never` crate. I see no reason not to implement `Hash` for `Infallible`, so might as well do it.

No changes necessary for `!`, because `!` already implements `Hash` (see https://github.com/rust-lang/rust/pull/51404).
2020-04-02 14:27:52 +02:00
Tim Diekmann
0b61239936 Improve docs in AllocRef 2020-04-02 14:20:35 +02:00
Wesley Wiser
75e2e8c71b Remove unused discriminant reads from MIR bodies
Allow the `SimplifyLocals` pass to remove reads of discriminants if the
read is never used.
2020-04-02 08:14:34 -04:00