Commit Graph

132851 Commits

Author SHA1 Message Date
Camelid
bd7cbaecd3 Explain fully qualified syntax for Rc and Arc 2020-10-28 16:31:44 -07:00
Eduardo Broto
50419118b4 Merge commit '645ef505da378b6f810b1567806d1bcc2856395f' into clippyup 2020-10-28 23:36:07 +01:00
Eduardo Broto
77da566cc6 Merge commit '645ef505da378b6f810b1567806d1bcc2856395f' into clippyup 2020-10-28 23:36:07 +01:00
Matthias Krüger
abd64d7c05 add a couple of ICE testcases
Fixes #6250
Fixes #6251
Fixes #6252
Fixes #6255
Fixes #6256
2020-10-28 23:35:11 +01:00
bors
4f1240fd94 Auto merge of #6263 - matthiaskrgr:diff_u, r=ebroto
use diff -u in driver.sh test

this changs the add/delete indication from
>
>
<
to
+
+
-
(same as git diff)

changelog: none
2020-10-28 22:33:01 +00:00
Matthias Krüger
0d6eed1b1f use diff -u in driver.sh test
this changs the add/delete indication from
>
>
<
to
+
+
-
(same as git diff)
2020-10-28 23:19:04 +01:00
bors
645ef505da Auto merge of #6257 - giraffate:sync-from-rust, r=ebroto
Rustup

changelog: none
2020-10-28 21:53:23 +00:00
Eduardo Broto
e83e79f1c2 Reinstate link to temporary_cstr_as_ptr 2020-10-28 22:36:22 +01:00
Eduardo Broto
a50d9e7af6 Deprecate temporary_cstr_as_ptr 2020-10-28 22:34:45 +01:00
Ian Jackson
776e204609 rustdoc: Use Vec::into_iter() rather than drain()
This allows removing a `mut` which is nicer.

Suggested-by: @jyn514
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2020-10-28 21:29:21 +00:00
Ian Jackson
1d6c860277
Add a comment about non-panicking of splitn().next().unwrap()
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2020-10-28 21:25:47 +00:00
bjorn3
4cc6b4f9bf Fix many clippy warnings 2020-10-28 21:47:25 +01:00
Mara Bos
b48fee010c Add tracking issue number for panic_any. 2020-10-28 21:23:45 +01:00
Mara Bos
a9d334d386
Update panic_any feature name.
Co-authored-by: Camelid <camelidcamel@gmail.com>
2020-10-28 21:21:41 +01:00
Ian Jackson
39b80cb7c0 rustdoc: Fix some nits
* Remove a needless comma in the Rust code
* Replace double spaces after full stops with single spaces

Requested-by: @GuillaumeGomez
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2020-10-28 20:13:31 +00:00
bors
31ee872db5 Auto merge of #78415 - tgnottingham:expn_id_tag_hash, r=Aaron1011
rustc_span: avoid hashing ExpnId tag when using cached hash
2020-10-28 20:03:55 +00:00
Nadrieril
41a74ace4a Apply suggestions from code review
Co-authored-by: Who? Me?! <mark-i-m@users.noreply.github.com>
Co-authored-by: varkor <github@varkor.com>
2020-10-28 19:08:01 +00:00
Dániel Buga
0fabbf9713 Fix typos 2020-10-28 19:32:28 +01:00
Eric Huss
72016f4ceb Update cargo 2020-10-28 11:14:47 -07:00
Ian Jackson
709efd9df6 rustdoc: Provide a --default-theme THEME option
This is a fairly simple special case of --default-eetting.  We must
set both "theme" and "use-system-theme".

Providing it separately enables us to document a way to set the theme
without expoosing the individual settings keywords, which are quite
complex.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2020-10-28 18:01:06 +00:00
Ian Jackson
d8a4497561 rustdoc: Provide a general --default-setting SETTING[=VALUE] option
We just plumb through what the user tells us.

This is flagged as unstable, mostly because I don't understand the
compatibility rules that rustdoc obeys for local storage data, and how
error handling of invalid data works.

We collect() the needed HashMap from Vec of Vecs of (key, value)
pairs, so that there is a nice place to add new more-specific options.
It would have been possible to use Extend::extend but doing it this
way ensures that all the used inputs are (and will stay) right next to
each other.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2020-10-28 17:54:07 +00:00
Ian Jackson
5cd96d638c rustdoc: Provide a way to set the default settings from Rust code
rustdoc has various user-configurable preferences.  These are recorded
in web Local Storage (where available).  But we want to provide a way
to configure the default default, including for when web storage is
not available.

getSettingValue is the function responsible for looking up these
settings.  Here we make it fall back some in-DOM data, which
ultimately comes from RenderOptions.default_settings.

Using HTML data atrtributes is fairly convenient here, dsspite the
need to transform between snake and kebab case to avoid the DOM
converting kebab case to camel case (!)

We cache the element and dataset lookup in a global variable, to
ensure that getSettingValue remains fast.

The DOM representation has to be in an element which precedes the
inclusion of storage.js.  That means it has to be in the <head> and we
should not use an empty <div> as the container (although most browsers
will accept that).  An empty <script> element provides a convenient
and harmless container object.  <meta> would be another possibility
but runs a greater risk of having unwanted behaviours on weird
browsers.

We trust the RenderOptions not to contain unhelpful setting names,
which don't fit nicely into an HTML attribute.  It's awkward to quote
dataset keys.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2020-10-28 17:54:06 +00:00
Eric Huss
23167cbfe9 Update books 2020-10-28 10:53:15 -07:00
bors
3dddf6ac1e Auto merge of #78414 - nox:function-sections, r=nagisa,bjorn3
Implement -Z function-sections=yes|no

This lets rustc users tweak whether all functions should be put in their own TEXT section, using whatever default value the target defines if the flag is missing.

I'm having fun experimenting with musl libc and trying to implement the start symbol in Rust, that means avoiding code that requires relocations, and AFAIK putting everything in its own section makes the toolchain generate `GOTPCREL` relocations for symbols that could use plain old PC-relative addressing (at least on `x86_64`) if they were all in the same section.
2020-10-28 17:47:36 +00:00
Peter Todd
061715604a
Inline NonZeroN::from(n) 2020-10-28 13:26:44 -04:00
Dániel Buga
a8803d3c04 Delete files immediately, instead of collecting into vector 2020-10-28 17:22:10 +01:00
Dániel Buga
2fa359814a Avoid reallocating cgu_path_components 2020-10-28 17:22:10 +01:00
Dániel Buga
5248b20d9a Reuse memory 2020-10-28 17:22:10 +01:00
Dániel Buga
a21f3a76a9 Clean up encode_dep_graph 2020-10-28 17:22:05 +01:00
Takayuki Nakata
c42a22d2dc Use double_neg.stderr 2020-10-29 01:02:09 +09:00
Ian Jackson
2e10475fdd rustdoc: js: Use getSettingValue for all rustdoc-* values
Currently, storage.js and main.js have many open-coded calls to
getCurrentValue for "rustdoc-" values, but these are settings and
should be handled by getSettingValue.

So make getSettingValue part of storage.js (where everyone can call
it) and use it everywhere.

No functional change yet.  We are going to make getSettingValue do
something more sophisticated in a moment.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2020-10-28 15:44:59 +00:00
Dániel Buga
f3e6d882fe Fix typos and replace static vector with slice 2020-10-28 16:42:28 +01:00
bors
717eb6ccea Auto merge of #78409 - pietroalbini:build-manifest-checksum-cache, r=Mark-Simulacrum
Add checksums cache to build-manifest

During the release process we're currently calculating the SHA256 of each file three times:

1. In `build-manifest`, to fill the `hash = "f00"` keys of the manifests.
2. In `promote-release`, to generate the `.sha256` files.
3. In `promote-release`, to generate the `.asc` GPG signatures.

Calculations 1. and 2. could be merged into a single one if there was a way for `build-manifest` to pass the checksums it generated over to `promote-release`. Unfortunately calculation 3. can't be merged as GPG requires extra metadata to be hashed.

This PR adds support for merging 1. and 2. by creating the `BUILD_MANIFEST_CHECKSUM_CACHE` environment variable, which points to a JSON file storing a cache of all the calculated checksums. `build-manifest` will load it at startup and avoid generating existing checksums, and it will dump its internal checksums cache into it when it exits successfully.

This PR also allows to run `build-manifest` multiple times without the need to wait for checksums to be calculated in the following invocations. The speedup will allow to work torwards a fix for https://github.com/rust-lang/promote-release/issues/15 without impacting the release process duration nor our storage costs.

This PR can be reviewed commit-by-commit.
r? `@Mark-Simulacrum`
2020-10-28 14:52:20 +00:00
Guillaume Gomez
f553c226c1
Fix typo "compiltest" 2020-10-28 15:51:26 +01:00
Pietro Albini
92fc1f8f9e
build-manifest: include artifacts in a new table
This commit adds to the generated manifest all files we ship that are
not rustup components, namely:

* Source code tarballs (rustc-{channel}-src.tar.xz)
* Windows installers (rust-{channel}-{target}.msi)
* macOS installers (rust-{channel}-{target}.pkg)

Those files are included in a new "artifacts" table of the manifest, to
avoid interfering with existing rustup installations.
2020-10-28 15:29:11 +01:00
Hameer Abbasi
22060fa0dc Assert in every case. 2020-10-28 12:51:15 +00:00
Hameer Abbasi
fab79c27ef Extend test to cover dyn methods/functions. 2020-10-28 12:29:13 +00:00
varkor
a6d01da716 Remove irrelevant FIXME 2020-10-28 10:47:27 +00:00
varkor
6c73adf324 Adjust turbofish help message for const generics 2020-10-28 10:47:27 +00:00
bjorn3
5103a258aa Rustup to rustc 1.49.0-nightly (07e968b64 2020-10-27) 2020-10-28 11:36:57 +01:00
Hameer Abbasi
9e60f4511e Add const generics tests for supertraits + dyn traits. 2020-10-28 10:36:19 +00:00
Ralf Jung
c90ef979de fix a comment in validity check 2020-10-28 10:39:21 +01:00
Takayuki Nakata
ffc2e66671 Fix reference 2020-10-28 14:36:29 +09:00
Takayuki Nakata
dace756c6f cargo dev update_lints 2020-10-28 14:25:41 +09:00
Takayuki Nakata
8e988e1c66 Merge remote-tracking branch 'upstream/master' into sync-from-rust 2020-10-28 14:14:09 +09:00
bors
2eb4fc800a Auto merge of #78323 - est31:smaller_list_overlap, r=varkor
Iterate over the smaller list

If there are two lists of different sizes,
iterating over the smaller list and then
looking up in the larger list is cheaper
than vice versa, because lookups scale
sublinearly.
2020-10-28 03:58:32 +00:00
Camelid
0217edbd29
Clean up intra-doc links in std::path 2020-10-27 20:54:30 -07:00
Takayuki Nakata
4c58860cbf Fix suggestion to add unneeded space in unused_unit 2020-10-28 12:40:47 +09:00
bors
db241bb0c8 Auto merge of #78458 - Dylan-DPC:rollup-tan044s, r=Dylan-DPC
Rollup of 10 pull requests

Successful merges:

 - #78152 (Separate unsized locals)
 - #78297 (Suggest calling await on method call and field access)
 - #78351 (Move "mutable thing in const" check from interning to validity)
 - #78365 (check object safety of generic constants)
 - #78379 (Tweak invalid `fn` header and body parsing)
 - #78391 (Add const_fn in generics test)
 - #78401 (resolve: private fields in tuple struct ctor diag)
 - #78408 (Remove tokens from foreign items in `TokenStripper`)
 - #78447 (Fix typo in  comment)
 - #78453 (Fix typo in comments)

Failed merges:

r? `@ghost`
2020-10-28 01:40:06 +00:00
Daniel Frampton
a3bff69134 Use unwrapDIPtr because the Scope may be passed as None 2020-10-27 18:05:16 -07:00