Commit Graph

136316 Commits

Author SHA1 Message Date
Guillaume Gomez
7bc22e96d3 Don't use to_string on Symbol 2021-01-06 10:59:50 +01:00
Andrew Sun
bf80159050 Make target-cpu=native detect individual features 2021-01-06 03:23:54 -05:00
bors
9530fdc3f4 Auto merge of #80724 - GuillaumeGomez:remove-useless-doc_alias-feature, r=jyn514
Remove useless doc_alias feature gate

As `@jyn514`  rightfully noted in https://github.com/rust-lang/rust/pull/80686 , this feature is no more. Therefore, cleanup time!

r? `@jyn514`
2021-01-06 05:41:42 +00:00
Camelid
7428e2d134
Apply suggestions from code review
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2021-01-05 19:46:51 -08:00
Eric Huss
1a2ee0b4d9 Update cargo 2021-01-05 19:36:00 -08:00
Camelid
e636805eee rustdoc: Turn next_def_id comments into docs 2021-01-05 19:04:49 -08:00
Ashley Mannix
db4585aa3b use Once instead of Mutex to manage capture resolution
This allows us to return borrows of the captured backtrace frames
that are tied to a borrow of the Backtrace itself, instead of to
some short-lived Mutex guard.

It also makes it semantically clearer what synchronization is needed
on the capture.
2021-01-06 10:44:06 +10:00
bors
41601ef394 Auto merge of #80415 - cjgillot:issue-77828, r=petrochenkov
Compute parent module when collecting hir::MacroDef.

Fixes #77828.

r? `@jyn514`
2021-01-06 00:36:14 +00:00
Aru Sahni
aea9a4b449 Remove bottom margin from crate version when the sidebar is collapsed.
This fixes a mobile UI bug where a vertical scrollbar would always be
rendered on the sidebar nav when the menu was closed.
2021-01-05 18:53:23 -05:00
Arlie Davis
4721b6518c Split a func into cold/hot parts, reducing binary size
I noticed that the Size::bits function is called in many places,
and is inlined into them. On x86_64-pc-windows-msvc, this function
is inlined 527 times, and compiled separately (non-inlined) 3 times.

Each of those inlined calls contains code that panics. This commit
moves the `panic!` call into a separate function and marks that
function with `#[cold]`.

This reduces binary size by 24 KB. By itself, that's not a substantial
reduction. However, changes like this often reduce pressure on
instruction-caches, since it reduces the amount of code that is inlined
into hot code paths. Or more precisely, it removes cold code from hot
cache lines. It also removes all conditionals from Size::bits(),
which is called in many places.
2021-01-05 12:52:34 -08:00
max-heller
2bdbb0d1b4 Document hackiness around primitive associated item disambiguators 2021-01-05 15:15:25 -05:00
Camille GILLOT
4fb12369b3 Do not swallow parent for MacroDef. 2021-01-05 21:10:35 +01:00
Camille GILLOT
abef2ed2bc Add rustdoc test. 2021-01-05 21:10:34 +01:00
Camille GILLOT
59f1ccd35c Compute parent module when collecting hir::MacroDef. 2021-01-05 21:10:34 +01:00
bors
da305a2b00 Auto merge of #80711 - camelid:intrinsic-of-val-safety, r=oli-obk
Make `size_of_val` and `min_align_of_val` intrinsics unsafe

Fixes #80668.

r? `@oli-obk`
2021-01-05 17:07:25 +00:00
Guillaume Gomez
bfdc858a38 Remove useless doc_alias feature 2021-01-05 16:20:46 +01:00
bors
3b63e16552 Auto merge of #80717 - mbartlett21:patch-2, r=dtolnay
Add more code spans to docs in intrinsics.rs

I have added some more code spans in core/src/intrinsics.rs, changing some `=` to `==`, etc. I also changed the wording in some sections.
2021-01-05 14:15:49 +00:00
oli
41a732dfd4 Remove a FIXME and explain the decision 2021-01-05 12:10:56 +00:00
bors
68ec332611 Auto merge of #80699 - usbalbin:const_copy_tracking_issue, r=oli-obk
const_intrinsic_copy - Add Reference to tracking issue

Add reference to tracking issue #80697 for feature gate added in previous PR #79684
2021-01-05 11:29:27 +00:00
René Rebe
a0b0aecda3 Added support for i386-unknown-linux-gnu and i486-unknown-linux-gnu
Support for both can be useful when creating new firmware, boot loaders,
or embedded operating systems.
2021-01-05 12:05:36 +01:00
bors
f4b9d32ef5 Auto merge of #80686 - GuillaumeGomez:error-doc-alias-same-name, r=jyn514
Error when #[doc(alias)] has same name as the item

Something I came across when reviewing some doc alias PRs.

r? `@jyn514`
2021-01-05 08:47:46 +00:00
mbartlett21
63dd00b97b
Add code spans to docs in intrinsics.rs 2021-01-05 17:27:10 +10:00
Jake Vossen
65f7dba622 fixed feature gate stderr 2021-01-05 00:02:39 -07:00
Jake Vossen
f37e737535 fixed const_generics error help 2021-01-05 00:01:48 -07:00
Camelid
bbf175df3c Make size_of_val and min_align_of_val intrinsics unsafe 2021-01-04 19:23:55 -08:00
bors
f412fb56b8 Auto merge of #80708 - JohnTitor:rollup-6esk027, r=JohnTitor
Rollup of 12 pull requests

Successful merges:

 - #80442 (Mention Arc::make_mut and Rc::make_mut in the documentation of Cow)
 - #80533 (bootstrap: clippy fixes)
 - #80538 (Add check for `[T;N]`/`usize` mismatch in astconv)
 - #80612 (Remove reverted change from relnotes)
 - #80627 (Builder: Warn if test file does not exist)
 - #80637 (Use Option::filter instead of open-coding it)
 - #80643 (Move variable into the only branch where it is relevant)
 - #80656 (Fixed documentation error for `std::hint::spin_loop`)
 - #80666 (Fix missing link for "fully qualified syntax")
 - #80672 (./x.py clippy: allow the most noisy lints)
 - #80677 (doc -- list edit for consistency)
 - #80696 (make sure that promoteds which fail to evaluate in dead const code behave correctly)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-01-05 03:06:32 +00:00
Yuki Okushi
9daac58ee9
Rollup merge of #80696 - RalfJung:failing-promoteds, r=oli-obk
make sure that promoteds which fail to evaluate in dead const code behave correctly

https://github.com/rust-lang/rust/pull/80243 showed that we'll have to live with these kinds of failing promoteds for a while, so let's make sure we have a test that covers them.
2021-01-05 09:52:52 +09:00
Yuki Okushi
ee94d9d690
Rollup merge of #80677 - kw-fn:patch-2, r=jyn514
doc -- list edit for consistency
2021-01-05 09:52:50 +09:00
Yuki Okushi
cb433736da
Rollup merge of #80672 - matthiaskrgr:xpy_clippy_less_noise, r=Mark-Simulacrum
./x.py clippy: allow the most noisy lints

This silences the following clippy lints in ./x.py clippy:

many_single_char_names (there are a lot of warnings caused by stdarch)
collapsible_if (can reduce readability)
type_complexity
missing_safety_doc (there are almost 3K warnings issued)
too_many_arguments
needless_lifetimes (people want 'tcx lifetimes etc)
wrong_self_convention (warns about from_..(), to_..(), into_..().. fns that do or do not take self by reference.

Just for clarification; this only changes the output of `x.py clippy` inside the rustc repo and does not change anything about clippy or how `cargo clippy` is run on peoples crates.
2021-01-05 09:52:49 +09:00
Yuki Okushi
cda26a6b15
Rollup merge of #80666 - jjlin:master, r=Dylan-DPC
Fix missing link for "fully qualified syntax"

This issue can currently be seen at https://doc.rust-lang.org/stable/std/rc/index.html#toggle-all-docs:~:text=%5B-,fully%20qualified%20syntax

It originates from #76138, where the link was added to `library/alloc/src/sync.rs`, but not `library/alloc/src/rc.rs`.
2021-01-05 09:52:47 +09:00
Yuki Okushi
cbdc24174b
Rollup merge of #80656 - booleancoercion:master, r=sfackler
Fixed documentation error for `std::hint::spin_loop`

Fixes #80644.
2021-01-05 09:52:45 +09:00
Yuki Okushi
598d189e9b
Rollup merge of #80643 - LingMan:unwrap, r=oli-obk
Move variable into the only branch where it is relevant

At the `if` branch `filter` (the `let` binding) is `None` iff `filter` (the parameter) was `None`.
We can branch on the parameter, move the binding into the `if`, and the complexity of handling
`Option<Option<_>` largely dissolves.

`@rustbot` modify labels +C-cleanup +T-compiler

Note: I have no idea how hot this code is. If this method frequently gets called with a `None` filter, there might be a small perf improvement.
2021-01-05 09:52:44 +09:00
Yuki Okushi
faf8beddef
Rollup merge of #80637 - LingMan:filter, r=oli-obk
Use Option::filter instead of open-coding it

`@rustbot` modify labels +C-cleanup +T-compiler
2021-01-05 09:52:42 +09:00
Yuki Okushi
1c6593c473
Rollup merge of #80627 - bugadani:warn, r=Mark-Simulacrum
Builder: Warn if test file does not exist

Running `./x.py test` with a file that does not exists (but where the path belongs to a test suite) silently ignores the missing file and runs the whole test suite. This PR prints a warning to reduce the potential surprise factor.

Closes #80621
2021-01-05 09:52:40 +09:00
Yuki Okushi
d85c2fe128
Rollup merge of #80612 - rust-lang:XAMPPRocky-patch-1, r=Mark-Simulacrum
Remove reverted change from relnotes

r? `@Mark-Simulacrum`
2021-01-05 09:52:38 +09:00
Yuki Okushi
be2a3f8642
Rollup merge of #80538 - JulianKnodt:err_usize, r=lcnr
Add check for `[T;N]`/`usize` mismatch in astconv

Helps clarify the issue in #80506
by adding a specific check for mismatches between [T;N] and usize.

r? `@lcnr`
2021-01-05 09:52:37 +09:00
Yuki Okushi
4c4e8e70bb
Rollup merge of #80533 - matthiaskrgr:bootstrap_clppy, r=Mark-Simulacrum
bootstrap: clippy fixes

addresses:

clippy::or_fun_call
clippy::single_char_add_str
clippy::comparison_to_empty
clippy::or_fun_call
2021-01-05 09:52:35 +09:00
Yuki Okushi
bdf8bbde1d
Rollup merge of #80442 - steffahn:mention_arc_in_cow, r=Mark-Simulacrum
Mention Arc::make_mut and Rc::make_mut in the documentation of Cow

Following this discussion: https://users.rust-lang.org/t/should-the-cow-documentation-mention-arc/53341

_Rendered (the last paragraph is new):_

![Screenshot_20201228_171551](https://user-images.githubusercontent.com/3986214/103228135-5d72e200-4930-11eb-89e1-38b5c86b08c7.png)

`@rustbot` modify labels: T-doc, T-libs
2021-01-05 09:52:33 +09:00
bors
9919ad6e9e Auto merge of #80426 - jyn514:bootstrap-caching, r=Mark-Simulacrum
Don't use `self.date` unconditionally for `program_out_of_date()`

This avoids unnecessary cache invalidations for programs not affected by
the stage0 version (which is everything except the stage0 compiler
itself).

The redundant invalidations weren't noticed until now because they only
showed up on stage0 bumps, at which point people are used to rebuilding
everything anyway. I noticed it in https://github.com/rust-lang/rust/pull/79540
because I wasn't adding `self.date` to the stamp file (because I didn't realize it was necessary). Rather than
adding self.date I thought it was better to remove it from the cache key.
2021-01-05 00:20:18 +00:00
oli
65ee418e5c Do not run const prop on the mir_for_ctfe of const fn 2021-01-04 22:29:45 +00:00
oli
409195d4e5 Update stderr files after rebase 2021-01-04 21:40:38 +00:00
oli
3af7989a7c No doc comments on expressions 2021-01-04 21:40:38 +00:00
oli
a76dae4946 Fix wording of query description 2021-01-04 21:40:38 +00:00
oli
9eaec139d0 Small comment adjustments 2021-01-04 21:40:38 +00:00
oli
caeb3d525d Move MIR body loading to a machine function 2021-01-04 21:40:38 +00:00
oli
f6d54aa0c1 Adjust imports 2021-01-04 21:40:38 +00:00
oli
7202054800 Document all the things 2021-01-04 21:40:38 +00:00
oli
680c4022ae Comment nit 2021-01-04 21:40:38 +00:00
oli
db90150b91 Polymorphization should look at the runtime MIR of const fn 2021-01-04 21:40:38 +00:00
oli
eb4e94b2e5 Simplify the optimize_mir query 2021-01-04 21:40:38 +00:00