Commit graph

125381 commits

Author SHA1 Message Date
Igor Matuszewski
cb40a1c4c9 Update RLS and Rustfmt 2020-08-12 01:25:46 +02:00
Eric Huss
392116e021 Platform Support page updates.
A few updates:
- Some minor wording and formatting changes.
- Remove the `cargo` column.
- Explain the columns up-front.
- Add no-wrap on the target-triple, which looks better to me.
- Minor mention on how to install support for a built-in target via rustup.
2020-08-11 16:05:43 -07:00
Eric Huss
1902983f45 Move forge platform-support to the rustc book. 2020-08-11 16:02:00 -07:00
Stein Somers
17ab457f21 Somewhat complicated way to respect BTreeMap's node length invariant 2020-08-12 00:09:00 +02:00
bors
873fc463bd Auto merge of #74802 - Mark-Simulacrum:reland-74069, r=nnethercote
Reland #74069

Investigation in #74716 has concluded that this PR is indeed not a regression (and in fact the rollup itself is not either).

This reverts the revert in #74611.

r? @nnethercote cc @eddyb
2020-08-11 21:23:00 +00:00
Eric Huss
7291c6dccd Update cargo 2020-08-11 13:59:37 -07:00
José Luis Cruz
df5c889784
word change
there are three significantly different things printed below
2020-08-11 22:33:11 +02:00
Mark Rousskov
a3c73ca88c Remove SynchronizationScope::Other
Added in b761538997, it started out already
unused.
2020-08-11 16:16:28 -04:00
Esteban Küber
6a3deb0ae0 Suggest using 'static in assoc consts and suggest when multiple lts are needed 2020-08-11 13:02:14 -07:00
Alexis Bourget
883dffa4c9 Accept more safety comments (notably those that are on multiple lines without text after SAFETY:) 2020-08-11 21:59:25 +02:00
Alexis Bourget
bd01bf9274 Remove two links by changing the doc for SystemTimeError::duration 2020-08-11 21:53:02 +02:00
Poliorcetics
a308e74e13
Add some texts to make the tidy check for unsafe documentation pass 2020-08-11 21:37:22 +02:00
Alexis Bourget
3ff06a9f2c Move the std::vec link back to a path-based link to make it compile with --stage 0 2020-08-11 21:30:20 +02:00
bors
e5e33ebd2b Auto merge of #75421 - tmandry:rollup-ctzmzn1, r=tmandry
Rollup of 7 pull requests

Successful merges:

 - #75036 (Prefer pattern matching over indexing)
 - #75378 (Introduce `rustc_lexer::is_ident` and use it in couple of places)
 - #75393 (Fully handle "?" shortcut)
 - #75403 (Update comment for function)
 - #75407 (Requested changes to [*mut T|*const T]::set_ptr_value)
 - #75408 (Update MinGW comments in ci.yml)
 - #75409 (Fix range term in alloc vec doc)

Failed merges:

r? @ghost
2020-08-11 19:29:38 +00:00
Tyler Mandry
5d9a0b020c
Rollup merge of #75409 - pickfire:patch-4, r=GuillaumeGomez
Fix range term in alloc vec doc

`range` is not an element, it is a variable.

r? @GuillaumeGomez
2020-08-11 12:28:40 -07:00
Tyler Mandry
a028c3176a
Rollup merge of #75408 - mati865:update-ci-comment, r=pietroalbini
Update MinGW comments in ci.yml
2020-08-11 12:28:39 -07:00
Tyler Mandry
06eb274bfc
Rollup merge of #75407 - oliver-giersch:set_ptr_value, r=RalfJung
Requested changes to [*mut T|*const T]::set_ptr_value

This is a follow-up to PR #74774 (tracking issue #75091), acting on some change requests made after approval:

- adds `#[must_use]` attribute
- changes type of `val` pointer argument from `()` to `u8`
- adjusts documentation mentioning pointer provenance
2020-08-11 12:28:37 -07:00
Tyler Mandry
d38997e4d9
Rollup merge of #75403 - giraffate:update_comment_in_fn, r=ecstatic-morse
Update comment for function

`rustc::lint::builtin` -> `rustc_session::lint::builtin`
2020-08-11 12:28:35 -07:00
Tyler Mandry
a4211977d7
Rollup merge of #75393 - GuillaumeGomez:fix-help-shortcut, r=pickfire
Fully handle "?" shortcut

Fixes #75386.

cc @runiq
2020-08-11 12:28:34 -07:00
Tyler Mandry
c18b64c866
Rollup merge of #75378 - petrochenkov:isident, r=Mark-Simulacrum
Introduce `rustc_lexer::is_ident` and use it in couple of places

Implements the suggestion from https://github.com/rust-lang/rust/pull/74537#issuecomment-662261979.
2020-08-11 12:28:32 -07:00
Tyler Mandry
dcccb47cb8
Rollup merge of #75036 - lzutao:pat, r=cuviper
Prefer pattern matching over indexing

Quite a bit nicer IMO.

r? @cuviper
2020-08-11 12:28:30 -07:00
Alexis Bourget
91ba92b6df Change safety comment for usize with the one from LukasKalbertodt review 2020-08-11 21:23:00 +02:00
Nathaniel McCallum
050fb380aa Don't spill operands onto the stack in naked functions
Currently, the code spills operands onto the stack for the purpose of
debuginfo. However, naked functions can only contain an asm block. Therefore,
attempting to spill the operands on the stack is undefined behavior.

Fixes https://github.com/rust-lang/rust/issues/42779
cc https://github.com/rust-lang/rust/issues/32408
2020-08-11 15:02:03 -04:00
Nathaniel McCallum
0356bb9fbb Revert "Suppress debuginfo on naked function arguments"
This reverts commit 25670749b4.

This commit does not actually fix the problem. It merely removes the name of
the argument from the LLVM output. Even without the name, Rust codegen still
spills the (nameless) variable onto the stack which is the root cause. The root
cause is solved in the next commit.
2020-08-11 15:00:23 -04:00
Esteban Küber
becd479482 review comment: simplify code by using slice pat 2020-08-11 11:06:21 -07:00
Esteban Küber
b9585fda7b When suggesting for lts, consider existing lifetime names
Fix #72404.
2020-08-11 11:06:21 -07:00
Esteban Küber
7956b1cef7 Assoc consts don't have generics
Fix #74264.
2020-08-11 11:06:21 -07:00
Esteban Küber
0f7205f202 Fix suggestion to use lifetime in type 2020-08-11 11:06:17 -07:00
Esteban Küber
17ada052e7 Detect tuple variants used as struct pattern and suggest correct pattern 2020-08-11 10:23:52 -07:00
Guillaume Gomez
fdf2fe18a1 Fully handle "?" shortcut 2020-08-11 18:28:01 +02:00
Lzu Tao
e8ea6e59f0 prefer pattern matching over indexing 2020-08-11 16:07:39 +00:00
Ivan Tham
e4f2de2e9a
Fix range term in alloc vec doc
`range` is not an element, it is a variable.
2020-08-11 23:57:13 +08:00
flip1995
d6b991d3a0
Merge commit '09bd400243ed6f7059fedc0c1623aae3792521d6' into clippyup 2020-08-11 17:50:45 +02:00
bors
cbe7c5ce70 Auto merge of #73656 - oli-obk:deaggregate-is-cleanup, r=wesleywiser
move Deaggregate pass to post_borrowck_cleanup

Reopen of #71946

Only the second commit is from this PR, the other commit is a bugfix that's in the process of getting merged. I'll rebase once that's done

In #70073 MIR pass handling got reorganized, but with the goal of not changing behavior (except for disabling some optimizations on opt-level = 0). But there we realized that the Deaggregator pass, while conceptually more of a "cleanup" pass (and one that should be run before optimizations), was run in the middle of the optimization chain. Likely this is an accident of history, so I suggest we try and clean that up by making it a proper cleanup pass.

This does change mir-opt output, because deaggregation now runs before const-prop instead of after.

r? @wesleywiser @rust-lang/wg-mir-opt

cc @RalfJung
2020-08-11 15:38:14 +00:00
Ralf Jung
307d0d8f51 move Deaggregate pass to post_borrowck_cleanup 2020-08-11 17:09:15 +02:00
Mateusz Mikuła
24177319ca Update MinGW comments in ci.yml 2020-08-11 16:31:32 +02:00
Prabakaran Kumaresshan
32fccc445a Revert #tymethods 2020-08-11 19:50:17 +05:30
oliver-giersch
19c9674966 mentions provenance, changes argument type, adds must_use attr 2020-08-11 16:14:34 +02:00
Takayuki Nakata
62502a9403 Update comment for function
`rustc::lint::builtin` -> `rustc_session::lint::builtin`
2020-08-11 22:34:23 +09:00
bors
09bd400243 Auto merge of #5891 - flip1995:rustup, r=flip1995
Rustup

r? @ghost

Sync back rust-lang/rust#75098

changelog: none
2020-08-11 12:32:10 +00:00
bors
4b9ac51617 Auto merge of #75388 - JohnTitor:rollup-9tgkxnl, r=JohnTitor
Rollup of 10 pull requests

Successful merges:

 - #74744 (Update RELEASES.md for 1.46.0)
 - #75085 (Transmute big endian `s6_addr` and `[u16; 8]`)
 - #75226 (Miri: Renamed "undef" to "uninit")
 - #75333 (polymorphize: constrain unevaluated const handling)
 - #75338 (move stack size check to const_eval machine)
 - #75347 (Rustdoc: Fix natural ordering to look at all numbers.)
 - #75352 (Tweak conditions for E0026 and E0769)
 - #75353 (Tiny cleanup, remove unnecessary `unwrap`)
 - #75359 (unused_delims: trim expr)
 - #75360 (Add sample fix for E0749)

Failed merges:

r? @ghost
2020-08-11 12:31:56 +00:00
flip1995
9311c11d7c
Fix sync fallout 2020-08-11 14:21:27 +02:00
Lukas Kalbertodt
709d1056b8
Fix minor things in the f32 primitive docs
All of these were review comments in #74621 that I first fixed
in that PR, but later accidentally overwrote by a force push.
2020-08-11 13:50:54 +02:00
Oliver Scherer
1a0a4acd41 Add a function to TyCtxt for computing an Allocation for a static item's initializer 2020-08-11 12:24:54 +02:00
Stein Somers
3a02e06002 BTreeMap: purge innocent use of into_kv_mut 2020-08-11 12:20:18 +02:00
Prabakaran Kumaresshan
29045b699e Switch to intra-doc links in library/std/src/os/*/fs.rs 2020-08-11 15:20:01 +05:30
Yuki Okushi
532002853d
Rollup merge of #75360 - pickfire:patch-4, r=GuillaumeGomez
Add sample fix for E0749

Even though the description is clear but the solution may not be as straightforward.
Adding a suggested fix from documentation side.

r? @GuillaumeGomez

However, this suggestion should be shown in rustc itself for easy fix, the documentation should also reflect on the changes in rustc. Currently,
```
error[E0749]: negative impls cannot have any items
 --> test.rs:6:5
  |
6 |     type Foo = i32; // error!
  |     ^^^^^^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0749`.
```
rustc should tell the user to remove it.
2020-08-11 16:23:59 +09:00
Yuki Okushi
ca462d36ff
Rollup merge of #75359 - lcnr:unused-delims-trim, r=oli-obk
unused_delims: trim expr

improves rustfix output.
2020-08-11 16:23:57 +09:00
Yuki Okushi
0a8d4db4d8
Rollup merge of #75353 - estebank:tiny, r=jyn514
Tiny cleanup, remove unnecessary `unwrap`

Remove unnecessary `unwrap`.
2020-08-11 16:23:56 +09:00
Yuki Okushi
e51a839030
Rollup merge of #75352 - estebank:incorrect-tuple-struct-pat, r=oli-obk
Tweak conditions for E0026 and E0769

When we have a tuple struct used with struct we don't want to suggest using the (valid) struct syntax with numeric field names. Instead we want to suggest the expected syntax.

Given

```rust
fn main() {
    match MyOption::MySome(42) {
        MyOption::MySome { x: 42 } => (),
        _ => (),
    }
}
```

We now emit E0769 "tuple variant `MyOption::MySome` written as struct variant" instead of E0026 "variant `MyOption::MySome` does not have a field named `x`".
2020-08-11 16:23:54 +09:00