Commit graph

126384 commits

Author SHA1 Message Date
Surya Midatala
a712fbd50b Move to intra-doc links for wasi/ext/fs.rs, os_str_bytes.rs, primitive_docs.rs & poison.rs 2020-08-26 21:43:46 +05:30
Ivan Tham
9ea4593572
Use [xxx()] rather than the [xxx] function
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2020-08-26 23:21:44 +08:00
Ivan Tham
16d8d4b899
Error use explicit intra-doc link and fix text 2020-08-26 22:41:56 +08:00
Bastian
2d853148d7 Changed the location of the suggestion as well as the way the suggestion is assembled 2020-08-26 16:39:30 +02:00
jumbatm
8c0128bb02 Fix ICE on unwrap of unknown layout. 2020-08-27 00:15:24 +10:00
Elichai Turkel
0cca5978a4
Fix potential UB in align_offset docs 2020-08-26 17:02:24 +03:00
bors
6ead62235a Auto merge of #75893 - Dylan-DPC:fix/offset-to-u64, r=oli-obk
change offset from u32 to u64

References #71696

r? @oli-obk

(closed the earlier pr because the rebase got messed up)
2020-08-26 13:10:42 +00:00
Guillaume Gomez
c73d4cddcc
Clean up E0761 explanation 2020-08-26 14:51:02 +02:00
bors
894581b872 Auto merge of #5946 - mikerite:fix-5729, r=flip1995
Fix `let_and_return` bad suggestion

Add a cast to the suggestion when the return expression has adjustments.
These adjustments are lost when the suggestion is applied.

This is similar to the problem in issue #4437.

Closes #5729

changelog: Fix `let_and_return` bad suggestion
2020-08-26 12:01:32 +00:00
Amjad Alsharafi
7a7a28d6bb Fixed file formatting and made tidy happy 2020-08-26 19:17:07 +08:00
bors
9ef44799bf Auto merge of #5949 - rail-rain:fix_fp_borrow_interior_mutable_const, r=oli-obk
Fix fp in `borrow_interior_mutable_const`

fixes #5796

changelog: fix false positive in `borrow_interior_mutable_const` when referencing a field behind a pointer.
2020-08-26 11:06:37 +00:00
Amjad Alsharafi
d89d2a972d Added more min_const_generics revisions to tests 2020-08-26 18:50:27 +08:00
Amjad Alsharafi
d39cc45cf2 Added a lot of min_const_generics revisions 2020-08-26 18:50:17 +08:00
bors
ffd59bf9c6 Auto merge of #75687 - TimDiekmann:realloc-align, r=Amanieu
Allow reallocation to different alignment in `AllocRef`

The allocator-wg [has decided](https://github.com/rust-lang/wg-allocators/issues/5#issuecomment-672591112) to support reallocating to a different alignment in `AllocRef`. For more details please see the linked issue.

r? @Amanieu

closes https://github.com/rust-lang/wg-allocators/issues/5
2020-08-26 10:44:28 +00:00
Amanieu d'Antras
178c1bbb5b Fix a typo in #75781 2020-08-26 10:49:15 +01:00
csmoe
8ee206a80d suggest await on unexpected types 2020-08-26 17:40:08 +08:00
Pietro Albini
3e16d4af7f
apply bootstrap cfgs 2020-08-26 10:17:31 +02:00
Pietro Albini
e88d79ca41
bump version to 1.48 2020-08-26 10:16:59 +02:00
bors
23db5426e6 Auto merge of #5964 - matsujika:matsujika-patch-1, r=ebroto
Fix typo

changelog: none
2020-08-26 07:53:07 +00:00
Hirochika Matsumoto
9d18c24b56 Fix typo 2020-08-26 16:03:35 +09:00
Aaron Hill
b5b8b9329b
Point to a move-related span when pointing to closure upvars
Fixes #75904

When emitting move/borrow errors, we may point into a closure to
indicate why an upvar is used in the closure. However, we use the
'upvar span', which is just an arbitrary usage of the upvar. If the
upvar is used in multiple places (e.g. a borrow and a move), we may end
up pointing to the borrow. If the overall error is a move error, this
can be confusing.

This PR tracks the span that caused an upvar to become captured by-value
instead of by-ref (assuming that it's not a `move` closure). We use this
span instead of the 'upvar' span when we need to point to an upvar usage
during borrow checking.
2020-08-26 02:11:01 -04:00
bors
2fe9a33659 Auto merge of #75843 - hermitcore:devel, r=nagisa
HermitCore switchs to relocatable binaries

- switch to relocatbale binaries to realize ASLR
- remove all dependencies to gcc
2020-08-26 03:47:07 +00:00
Joshua Nelson
d3c581751b
Note that from_res panics on errors 2020-08-25 22:01:01 -04:00
Joshua Nelson
bb351defba
Use map_or(true) instead of unwrap_or(true)
Co-authored-by: Ivan Tham <pickfire@riseup.net>
2020-08-25 22:00:25 -04:00
Camelid
511ee052a0 Use intra-doc links in core::macros
Also cleaned up some things and added a few more links.
2020-08-25 18:45:20 -07:00
bors
3e98860425 Auto merge of #75811 - ecstatic-morse:better-dlerror, r=nagisa
Refactor dynamic library error checking on *nix

The old code was checking `dlerror` more often than necessary, since (unlike `dlsym`) checking the return value of [`dlopen`](https://www.man7.org/linux/man-pages/man3/dlopen.3.html) is enough to indicate whether an error occurred. In the first commit, I've refactored the code to minimize the number of system calls needed. It should be strictly better than the old version.

The second commit is an optional addendum which fixes the issue observed on illumos in #74469, a PR I reviewed that was ultimately closed due to inactivity. I'm not sure how hard we try to work around platform-specific bugs like this, and I believe that, due to the way that `dlerror` is specified in the POSIX standard, libc implementations that want to run on conforming systems cannot call `dlsym` in multi-threaded programs.
2020-08-26 01:40:26 +00:00
Camelid
acd396225e Fix typo in release notes 2020-08-25 16:12:46 -07:00
bors
ad7a03cbaa Auto merge of #5951 - ThibsG:FixMacroCloneOnRefPtr2076, r=ebroto
Fix incorrect suggestion when `clone_on_ref_ptr` is triggered in macros

In the lint `clone_on_ref_ptr`, if the `span` is in a macro, don't expand it for suggestion.

Fixes: #2076

changelog: none

r? @ebroto
2020-08-25 21:48:19 +00:00
Joshua Nelson
e233d80808 Remove outdated FIXME 2020-08-25 17:09:49 -04:00
Jonas Schievink
d9b075a756
Fix typo (thumbv8m.main-none-eabihf is Mainline) 2020-08-25 22:55:04 +02:00
bors
bf4342114e Auto merge of #75302 - Aaron1011:feature/partial-move-diag, r=estebank
Be consistent when describing a move as a 'partial' in diagnostics

When an error occurs due to a partial move, we would use the world
"partial" in some parts of the error message, but not in others. This
commit ensures that we use the word 'partial' in either all or none of
the diagnostic messages.

Additionally, we no longer describe a move out of a `Box` via `*` as
a 'partial move'. This was a pre-existing issue, but became more
noticable when the word 'partial' is used in more places.
2020-08-25 20:54:59 +00:00
Alexis Bourget
28798132aa Move to intra doc links for core::ptr::non_null 2020-08-25 22:46:12 +02:00
Joshua Nelson
5ce4ee9687 Add back Res::matches_ns, implemented in terms of ns 2020-08-25 16:45:12 -04:00
Joshua Nelson
05a040f406 Remove unused ns parameter 2020-08-25 16:41:11 -04:00
Joshua Nelson
56d3f3963c Unify error reporting for intra-doc links
- Give a suggestion even if there is no span available
- Give a more accurate description of the change than 'use the
disambiguator'
- Write much less code
2020-08-25 16:37:22 -04:00
Thibaud
370fc45a0a
Update clippy_lints/src/methods/mod.rs
Co-authored-by: Eduardo Broto <ebroto@tutanota.com>
2020-08-25 22:20:35 +02:00
bors
e191151001 Auto merge of #5961 - scottmcm:master, r=Manishearth
Re-enable len_zero for ranges now that `is_empty` is stable on them

Fixes #5956

Completed stabilization PR: https://github.com/rust-lang/rust/pull/75132

changelog: len_zero: re-enable linting ranges now that range_is_empty is stable
2020-08-25 19:30:05 +00:00
Scott McMurray
3b1e5d6ff7 Re-enable len_zero for ranges now that is_empty is stable on them 2020-08-25 12:17:03 -07:00
Dylan MacKenzie
aae6c0fbfe Explicitly pass RTLD_LOCAL to dlopen
This happens to be the default on Linux, but the default is unspecified
in the POSIX standard. Also switches to `cast` to keep line lengths in
check.
2020-08-25 12:11:30 -07:00
Pang, Baoshan
079baafdf1 For VxWorks:
fix building errors
use wr-c++ as linker
2020-08-25 12:09:39 -07:00
Dylan MacKenzie
f07011bad8 Always treat dlsym returning NULL as an error
This simplifies the code somewhat. Also updates comments to reflect
notes from reviw about thread-safety of `dlerror`.
2020-08-25 12:02:21 -07:00
bors
8ba22504e8 Auto merge of #74275 - wesleywiser:break_up_partitioning_rs, r=pnkfelix
Refactor the partitioning module to make it easier to introduce new algorithms

I've split the `librustc_mir::monomorphize::partitioning` module into a few files and introduced a `Partitioner` trait which allows us to decouple the partitioning algorithm from the code which integrates it into the query system. This should allow us to introduce new partitioning algorithms much more easily. I've also gone ahead and added a `-Z` flag to control which algorithm is used (currently there is only the `default`).

I left a few comments in places where things might be improved further.

r? @pnkfelix cc @rust-lang/wg-incr-comp
2020-08-25 18:52:11 +00:00
Joshua Nelson
18e7a1b799 Add Res::ns() instead of matches_ns() 2020-08-25 14:16:05 -04:00
bors
f326668577 Auto merge of #5958 - mikerite:fix-fmt-20200825, r=flip1995
Various fmt test improvements

Various fmt test improvements.

changelog: none
2020-08-25 17:15:51 +00:00
bors
f9015592f3 Auto merge of #5952 - 1c3t3a:1c3t3a-dev-5819, r=Manishearth
Added a lint which corrects expressions like (a - b) < f32::EPSILON, according to #5819

Fixes #5819
changelog: none
2020-08-25 16:54:48 +00:00
Scott McMurray
f3024073f9 Suggest mem::forget if mem::ManuallyDrop::new isn't used
I think this communicates the intent better, and is shorter anyway.
2020-08-25 09:40:53 -07:00
bors
ba43a4325c Auto merge of #5947 - ebroto:rustup_doc_improvements, r=flip1995
Improve documentation related to the sync process

[Rendered](https://github.com/ebroto/rust-clippy/blob/rustup_doc_improvements/CONTRIBUTING.md)

r? @flip1995

changelog: none
2020-08-25 16:33:17 +00:00
bors
5ef345a853 Auto merge of #5960 - flip1995:rustup, r=flip1995
Rustup

r? @ghost

changelog: none
2020-08-25 16:11:17 +00:00
Dániel Buga
a4090d28da Add test for issue #27130 2020-08-25 18:02:59 +02:00
Philipp Krones
acc6b6ce07
Fix typo 2020-08-25 18:01:08 +02:00