Commit Graph

137714 Commits

Author SHA1 Message Date
b-naber
9946b54823 add suggestion for nested fields 2021-01-30 23:19:41 +01:00
oberien
f1cd17961c impl Seek for Empty
Fix #78029
2021-01-30 23:00:10 +01:00
Mara Bos
bef4ec2fc5
Bump as_mut_str_for_str stable version. 2021-01-30 22:10:25 +01:00
bors
04caa632dd Auto merge of #81565 - nikic:revert, r=nagisa
Revert dist-x86_64-linux update to Clang 11

This reverts commit cb6787ae82, reversing changes made to 0248c6f178.

The change causes errors when linking rustc shared objects with the binutils linker.

Fixes #81554.

r? `@Mark-Simulacrum`
2021-01-30 20:46:58 +00:00
bjorn3
84f24e530a Re-enable mir inlining for the sysroot 2021-01-30 21:26:37 +01:00
Mara Bos
fe4ac95cb8
Bump stable version of arc_mutate_strong_count 2021-01-30 21:08:30 +01:00
Ömer Sinan Ağacan
8b5187f7ea Fix an old FIXME in redundant paren lint
Referenced bug was fixed a while ago
2021-01-30 22:39:56 +03:00
bjorn3
7657ebccc8 Fix macOS build 2021-01-30 20:05:38 +01:00
Ömer Sinan Ağacan
5f1a7aa46d Add a test for #71202
Closes #71202
2021-01-30 21:54:01 +03:00
bjorn3
356d749952 Update Readme.md for the fixed abi compatibility 2021-01-30 19:38:57 +01:00
Mara Bos
3a0ae08ae2 Update clippy test output for panic macros. 2021-01-30 19:33:21 +01:00
Mara Bos
db85dac219 Update clippy test output for panic macros. 2021-01-30 19:33:21 +01:00
bjorn3
d34b5e2885 Rustup to rustc 1.51.0-nightly (b12290861 2021-01-29) 2021-01-30 19:29:02 +01:00
pierwill
adfb04fc4e Edit rustc_typeck top-level docs
Edit punctuation and wording in note on type variables
vs. type parameters.

Also add missing punctuation and two inter-doc links.
2021-01-30 10:04:19 -08:00
Ivan Tham
131ee07844
Remove extra trailing spaces 2021-01-31 01:36:15 +08:00
bjorn3
8faae2992a Add missing dir to .gitignore 2021-01-30 18:27:28 +01:00
Ivan Tham
6d7ef10b46
Fix docblock short code missing end whitespaces 2021-01-31 01:27:21 +08:00
Ivan Tham
d3048eea3c
Improve docblock readability on small screen 2021-01-31 01:19:29 +08:00
The8472
55d6247f52 Clarify that guarantees extend to other advancing iterator methods. 2021-01-30 18:07:48 +01:00
flip1995
ac912be984 Merge commit '95c0459217d1661edfa794c8bb122452b92fb485' into clippyup 2021-01-30 18:06:34 +01:00
flip1995
21758bf1fb
Merge commit '95c0459217d1661edfa794c8bb122452b92fb485' into clippyup 2021-01-30 18:06:34 +01:00
bors
95c0459217 Auto merge of #6654 - flip1995:no_lazy_static_regex, r=flip1995
No lazy static regex

r? `@llogiq`

#6500

regex is unnecessary for this lint (https://github.com/rust-lang/rust-clippy/pull/6500#discussion_r558555071)
lazy_static is unnecessary. The std lazy feature should be  used instead.

changelog: none
2021-01-30 16:49:45 +00:00
Ivan Tham
4a2a5f0780
Fix ascii art text wrapping in mobile
Fix #81377
2021-01-31 00:45:19 +08:00
Nikita Popov
8c7611caf0 Revert "Auto merge of #81489 - nikic:x86-64-dist-update, r=Mark-Simulacrum"
This reverts commit cb6787ae82, reversing
changes made to 0248c6f178.
2021-01-30 17:44:49 +01:00
flip1995
3874631600
Remove unknown_clippy_lints allow attribute 2021-01-30 17:43:20 +01:00
flip1995
797cf6554d
Get rid of regex and lazy_static dependencies 2021-01-30 17:43:00 +01:00
bors
fd20a8be0d Auto merge of #81453 - jumbatm:clashing-extern-decl-perf, r=nagisa
clashing_extern_declarations: Use symbol interning to avoid string alloc.

Use symbol interning as a hack to avoid allocating a string for every symbol name we store in the seen set. This hopefully addresses the minor perf regression described in https://github.com/rust-lang/rust/pull/80009#issuecomment-763526902.

r? `@nagisa`
2021-01-30 16:41:05 +00:00
bjorn3
f3447682d0 Handle PassMode::Cast in combination with #[repr(align)] 2021-01-30 17:26:51 +01:00
bjorn3
18de1b1fde
Merge pull request #1131 from bjorn3/abi_compat
Full abi compatibilty
2021-01-30 16:53:15 +01:00
bjorn3
6a739b3ae1
Merge pull request #1132 from Uriopass/master
Don't set RUSTFLAGS when no specific linker is needed
2021-01-30 16:31:48 +01:00
Paris DOUADY
3eb649c631 dont set rustflags when no specific linker needed 2021-01-30 16:25:48 +01:00
bors
4db76a6bcc Auto merge of #6653 - flip1995:rustup, r=flip1995
Rustup

changelog: Deprecate `unknown_clippy_lints` (integrated in `unknown_lints`)

r? `@ghost`
2021-01-30 14:53:30 +00:00
flip1995
60ab57e4eb
Bump nightly version -> 2021-01-30 2021-01-30 15:52:02 +01:00
flip1995
e2859437f9
Merge remote-tracking branch 'upstream/master' into rustup 2021-01-30 15:51:16 +01:00
Steve Heindel
642d27d40a Fix typo in E0759 2021-01-30 09:48:37 -05:00
J. Ryan Stinnett
7e3217845d Balance sidebar Deref cycle check with main content
The `Deref` cycle checks added as part of #80653 were "unbalanced" in the sense
that the main content code path checks for cycles _before_ descending, while the
sidebar checks _after_. Checking _before_ is correct, so this changes the
sidebar path to match the main content path.
2021-01-30 14:23:50 +00:00
Konrad Borowski
56c27360b1 Replace predecessor with range in collections documentation
Fixes #81548.
2021-01-30 14:24:06 +01:00
bjorn3
7fcf59f19e Add print on panic for predefining of a function 2021-01-30 14:19:13 +01:00
Ralf Jung
944237f6cd codegen: assume constants cannot fail to evaluate
also don't submit code to LLVM when the session has errors
2021-01-30 12:29:57 +01:00
bjorn3
2d6981756d Handle argument extension mode 2021-01-30 12:25:20 +01:00
bjorn3
b5ddb76f84 Force stack slot size to be a multiple of 16
This ensures that all stack slots are aligned to 16 bytes. Without this
linking against crates compiled with cg_llvm may cause a crash due to
simd instructions requiring a 16 byte alignment.
2021-01-30 12:11:40 +01:00
est31
cddeb5e47b Misc ip documentation fixes 2021-01-30 12:06:06 +01:00
bors
7ce1b3b244 Auto merge of #81545 - JohnTitor:rollup-zlt3tn6, r=JohnTitor
Rollup of 16 pull requests

Successful merges:

 - #79023 (Add `core::stream::Stream`)
 - #80562 (Consider Scalar to be a bool only if its unsigned)
 - #80886 (Stabilize raw ref macros)
 - #80959 (Stabilize `unsigned_abs`)
 - #81291 (Support FRU pattern with `[feature(capture_disjoint_fields)]`)
 - #81409 (Slight simplification of chars().count())
 - #81468 (cfg(version): treat nightlies as complete)
 - #81473 (Warn write-only fields)
 - #81495 (rustdoc: Remove unnecessary optional)
 - #81499 (Updated Vec::splice documentation)
 - #81501 (update rustfmt to v1.4.34)
 - #81505 (`fn cold_path` doesn't need to be pub)
 - #81512 (Add missing variants in match binding)
 - #81515 (Fix typo in pat.rs)
 - #81519 (Don't print error output from rustup when detecting default build triple)
 - #81520 (Don't clone LLVM submodule when download-ci-llvm is set)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-01-30 10:50:16 +00:00
bjorn3
139a6d12de Fix 128bit checked math intrinsic calls 2021-01-30 11:02:24 +01:00
0yoyoyo
81ed4cfd01 Add a regression test 2021-01-30 18:26:29 +09:00
bors
ebaea9e850 Auto merge of #81521 - nikic:update-dist-various, r=Mark-Simulacrum
Update dist-various to Ubuntu 20.04

This updates the dist-various-1 and dist-various-2 images to Ubuntu
20.04. This requires some adjustments:

 * `DEBIAN_FRONTEND=noninteractive` required for apt install.
 * `team-gcc-argm-embedded` PPA does not support focal. However,
   we can simply use the distro-provided `gcc-arm-none-eabi`. Per
   the comment, the PPA was only used to get a newer version.
 * rumprun has to be updated to avoid a linker error.
 * We need to build rumrun with `NOGCCERROR`, which disables use
   of `-Werror` and allows building with a newer compiler.
 * We need to install `libtinfo5`, which appears to be a dependency
   of the clang used during the fuchsia build.
 * We need to switch to `g++-8` rather than `g++-7`, as at least
   `g++-7-arm-linux-gnueabi` is not available on focal.
 * We need to upgrade to GCC 6.5 for the Solaris build, as GCC 6.4
   does not support the newer libisl version.

r? `@Mark-Simulacrum`
2021-01-30 07:41:19 +00:00
Philip Hayes
7f1595e18f Fix let_and_return false positive
The issue:

See this Rust playground link: https://play.rust-lang.org/?edition=2018&gist=12cb5d1e7527f8c37743b87fc4a53748

Run the above with clippy to see the following warning:

```
warning: returning the result of a `let` binding from a block
  --> src/main.rs:24:5
   |
23 |     let value = Foo::new(&x).value();
   |     --------------------------------- unnecessary `let` binding
24 |     value
   |     ^^^^^
   |
   = note: `#[warn(clippy::let_and_return)]` on by default
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
help: return the expression directly
   |
23 |
24 |     Foo::new(&x).value()
   |
```

Implementing the suggested fix, removing the temporary let binding,
yields a compiler error:

```
error[E0597]: `x` does not live long enough
  --> src/main.rs:23:14
   |
23 |     Foo::new(&x).value()
   |     ---------^^-
   |     |        |
   |     |        borrowed value does not live long enough
   |     a temporary with access to the borrow is created here ...
24 | }
   | -
   | |
   | `x` dropped here while still borrowed
   | ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `Foo`
   |
   = note: the temporary is part of an expression at the end of a block;
           consider forcing this temporary to be dropped sooner, before the block's local variables are dropped
help: for example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block
   |
23 |     let x = Foo::new(&x).value(); x
   |     ^^^^^^^                     ^^^
```

The fix:

Of course, clippy looks like it should already handle this edge case;
however, it appears `utils::fn_def_id` is not returning a `DefId` for
`Foo::new`. Changing the `qpath_res` lookup to use the child Path
`hir_id` instead of the parent Call `hir_id` fixes the issue.
2021-01-29 22:19:09 -08:00
Hirochika Matsumoto
6bc9634de3 Rename function to suggest_accessing_field_where_appropriate 2021-01-30 14:25:43 +09:00
Hirochika Matsumoto
2ce2d145c2 Account for union 2021-01-30 14:18:50 +09:00
Hirochika Matsumoto
08d31e0f09 Remove logging iterator 2021-01-30 13:50:44 +09:00