Commit Graph

110017 Commits

Author SHA1 Message Date
Josh Stone
6a3425eb08
Rollup merge of #75710 - ThibsG:FixBadPrinting75447, r=oli-obk
Fix bad printing of const-eval queries

Fixes: #75447

r? @RalfJung

cc @oli-obk
2020-08-20 10:07:27 -07:00
Josh Stone
7ac126ec56
Rollup merge of #75703 - tmiasko:stack-overflow-musl, r=cuviper
Enable stack-overflow detection on musl for non-main threads
2020-08-20 10:07:24 -07:00
Josh Stone
ba104d291a
Rollup merge of #75702 - GuillaumeGomez:cleanup-e0759, r=pickfire
Clean up E0759 explanation

r? @Dylan-DPC

cc @pickfire
2020-08-20 10:07:22 -07:00
Guillaume Gomez
7f55c83487 Apply review comments 2020-08-20 15:25:35 +02:00
Lzu Tao
86cf46172f Suppress MIR comments of Unit type 2020-08-20 09:32:35 +00:00
Lzu Tao
f6bd213569 Add missing tick for doc 2020-08-20 09:32:35 +00:00
Lzu Tao
633a2e31ef Suppress MIR comments for FnDef in ty::Const 2020-08-20 09:27:33 +00:00
ThibsG
bd716753f4 Set RUST_BACKTRACE env variable 2020-08-20 10:00:07 +02:00
bors
1a22a0ff93 Auto merge of #75595 - davidtwco:polymorphization-predicate-simplification-correction, r=eddyb
polymorphize: if any param in a predicate is used, then all are used

Addresses [review](https://github.com/rust-lang/rust/pull/75518#discussion_r470907646) [comments](https://github.com/rust-lang/rust/pull/75518#discussion_r470907865) [from](https://github.com/rust-lang/rust/pull/75518#discussion_r470908188) @eddyb in #75518 that I didn't get to resolve before bors merged.

This PR modifies polymorphization's handling of predicates so that if any generic parameter is used in a predicate then all parameters in that predicate are used.

r? @eddyb
2020-08-20 05:06:55 +00:00
bors
f6049b60db Auto merge of #75720 - ehuss:update-books, r=ehuss
Update books

## nomicon

2 commits in bfe1ab96d717d1dda50e499b360f2e2f57e1750a..25854752549d44d76fbd7650e17cb4f167a0b8fb
2020-06-05 13:19:42 -0400 to 2020-08-19 16:41:48 -0400
- Follow-up of rust-lang/rust#75152 (rust-lang-nursery/nomicon#235)
- Follow-up for rust-lang/rust#74850 (rust-lang-nursery/nomicon#233)

## reference

7 commits in c9b2736a059469043177e1e4ed41a55d7c63ac28..1b6c4b0afab97c0230433466c97167bbbe8445f6
2020-08-03 03:34:03 -0700 to 2020-08-18 17:04:28 -0700
- Some constant/static updates. (rust-lang-nursery/reference#867)
- Add casting rules from function items to other types (rust-lang-nursery/reference#878)
- Apply joshtriplett's suggestion
- Add note clarifying 16-bit support.
- Document min pointer width.
- Update to `dyn Trait` syntax in a couple places (rust-lang-nursery/reference#875)
- mention that `#[track_caller]` on `fn main` is forbidden (rust-lang-nursery/reference#872)

## book

2 commits in 363293c1c5ce9e84ea3935a5e29ce8624801208a..c0a6a61b8205da14ac955425f74258ffd8ee065d
2020-08-03 15:56:30 -0500 to 2020-08-14 14:21:49 -0500
- Correct listing 11-10: Take tests module out of main function. (rust-lang/book#2427)
- Update link to russian translation (rust-lang/book#2423)

## rust-by-example

5 commits in 2e9271981adc32613365810f3428334c07095215..80a10e22140e28392b99d24ed02f4c6d8cb770a0
2020-07-27 13:39:16 -0500 to 2020-08-08 09:56:46 -0300
- Add tuple `..` operator example (rust-lang/rust-by-example#1368)
- Clarify wording (rust-lang/rust-by-example#1366)
- Include arc (rust-lang/rust-by-example#1365)
- Modify supertraits sample code (rust-lang/rust-by-example#1361)
- Remove mention of `try!` in `Display` example (rust-lang/rust-by-example#1357)

## embedded-book

3 commits in b5256448a2a4c1bec68b93c0847066f92f2ff5a9..0cd2ca116274b915924c3a7e07c1e046b6f19b77
2020-07-24 23:09:29 +0000 to 2020-08-19 10:33:15 +0000
- Ignore unused argument in closure  (rust-embedded/book#261)
- Fix broken sentence  (rust-embedded/book#260)
- Add additional command to try when verifying installation.  (rust-embedded/book#259)
2020-08-20 03:09:19 +00:00
bors
1a3210993d Auto merge of #75723 - ehuss:update-cargo, r=ehuss
Update cargo

5 commits in ab32ee88dade1b50c77347599e82ca2de3fb8a51..51b66125ba97d2906f461b3f4e0408f206299bb6
2020-08-10 17:44:43 +0000 to 2020-08-19 20:22:52 +0000
- Add chapters on dependency resolution and SemVer compatibility. (rust-lang/cargo#8609)
- Renames SourceId::into_url -> SourceId::as_url (rust-lang/cargo#8611)
- Fix bug with PathAndArg config values (rust-lang/cargo#8629)
- Show full error context on `cargo run` error. (rust-lang/cargo#8627)
- Fix typo in SIGQUIT description (rust-lang/cargo#8615)
2020-08-20 01:08:08 +00:00
bors
5f6fcad644 Auto merge of #75563 - richkadel:llvm-coverage-map-gen-5.4, r=wesleywiser
Moved coverage counter injection from BasicBlock to Statement.

As discussed on Zulip: https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Implement.20LLVM-compatible.20source-based.20cod.20compiler-team.23278
2020-08-19 22:48:40 +00:00
Eric Huss
77a5675b1f Update cargo 2020-08-19 15:11:58 -07:00
Eric Huss
4890186957 Update books 2020-08-19 14:07:46 -07:00
bors
32c654a979 Auto merge of #75590 - Mark-Simulacrum:tagged-ptr, r=ecstatic-morse
Add a packed/tagged pointer abstraction and utilize it for ParamEnv

The intent here is mostly just to add the abstraction; I suspect that there are definitely more use cases for it, and we can explore those over time now that there's a (mostly) safe abstraction that can be used in rustc.
2020-08-19 20:20:31 +00:00
Mark Rousskov
107e2904bf Use CopyTaggedPtr for ParamEnv 2020-08-19 15:08:35 -04:00
Mark Rousskov
c8fe232836 Add tagged pointer impl to data structures 2020-08-19 15:08:35 -04:00
Tyler Mandry
7d1407721c
Rollup merge of #75649 - jyn514:inherent-lang-impls, r=guillaumegomez
Fix intra-doc links for inherent impls that are both lang items and not the default impl

I found in https://github.com/rust-lang/rust/pull/75464#issuecomment-675125984 that `str::to_uppercase()` doesn't resolve while `str::trim()` does. The only real difference is that `to_uppercase` is defined in `alloc`, while trim is defined in `core`. It turns out that rustdoc was ignoring `lang_items.str_alloc_impl()` - it saw them in `collect_trait_impls`, but not for intra-doc links.

This uses the same `impls` for all parts of rustdoc, so that there can be no more inconsistency. It does have the slight downside that the matches are no longer exhaustive but it will be very clear if a new lang item is missed because it will panic when you try to document it (and if you don't document it, does rustdoc really need to know about it?).

~~This needs a test case (probably just `str::to_uppercase`).~~ Added.

This is best reviewed commit-by-commit.

r? @GuillaumeGomez
2020-08-19 11:12:22 -07:00
Tyler Mandry
0e7e939788
Rollup merge of #75593 - Mark-Simulacrum:compiler-docs-must-not-overlap, r=pietroalbini
Adjust installation place for compiler docs

This avoids conflicts when installing with rustup; rustup does not currently
support overlapping installations.

r? @matthiaskrgr
2020-08-19 11:12:18 -07:00
Tyler Mandry
1f70776f7b
Rollup merge of #75587 - RalfJung:mir-comment-fixes, r=ecstatic-morse
mir building: fix some comments

r? @oli-obk

At least I hope these fixes are right, please double-check.^^
2020-08-19 11:12:16 -07:00
Tyler Mandry
672d009b0c
Rollup merge of #75069 - lcnr:type-of-lazy-norm, r=varkor
move const param structural match checks to wfcheck

fixes #75047 fixes #74950

We currently check for structural match violations inside of `type_of`.
As we need to check the array length when checking if `[NonEq; arr_len]` is structural match, we potentially require the variance of an expression. Computing the variance requires `type_of` for all types though, resulting in a cycle error.

r? @varkor @eddyb
2020-08-19 11:12:15 -07:00
ThibsG
ccb049387a Fix bad printing of const-eval queries 2020-08-19 17:48:20 +02:00
Joshua Nelson
aff01f8de9 Add test for f32 and f64 methods 2020-08-19 10:53:44 -04:00
bors
e7f6ed14d5 Auto merge of #74098 - GuillaumeGomez:doc-alias-checks, r=ollie27
Doc alias checks: ensure only items appearing in search index can use it

Following the discussion in #73721, I added checks to ensure that only items appearing in the search are allowed to have doc alias.

r? @ollie27
2020-08-19 13:10:16 +00:00
Joshua Nelson
570b0d9ece Add a test 2020-08-19 08:26:31 -04:00
Joshua Nelson
121974e37d xpy fmt 2020-08-19 08:26:31 -04:00
Joshua Nelson
219e93d91e Use impls for intra doc links as well 2020-08-19 08:26:28 -04:00
Guillaume Gomez
46f2b410e0 Clean up E0759 explanation 2020-08-19 14:22:52 +02:00
Joshua Nelson
9cf2fa84e8 Allow reusing the code in collect_trait_impls 2020-08-19 08:18:25 -04:00
Joshua Nelson
06d6d3dff5 impl_for_type -> PrimitiveType::impls 2020-08-19 08:18:25 -04:00
Joshua Nelson
3ddd8b233c Return all impls, not just the primary one 2020-08-19 08:18:24 -04:00
Joshua Nelson
8a0aa7bd9d Say tcx.lang_items() less 2020-08-19 08:18:24 -04:00
Joshua Nelson
967ec1f623 Refactor impl_for_type into a separate function 2020-08-19 08:18:24 -04:00
Yuki Okushi
98f7d882c8
Rollup merge of #75665 - GuillaumeGomez:doc-examples-coverage, r=jyn514
Add doc examples coverage

r? @jyn514
2020-08-19 15:54:37 +09:00
Yuki Okushi
e6fe5232df
Rollup merge of #75658 - tgnottingham:issue-75599, r=estebank
Don't emit "is not a logical operator" error outside of associative expressions

Avoid showing this error where it doesn't make sense by not assuming
"and" and "or" were intended to mean "&&" and "||" until after we decide
to continue parsing input as an associative expression.

Note that the decision of whether or not to continue parsing input as an
associative expression doesn't actually depend on this assumption.

Fixes #75599

---

First time contributor! Let me know if there are any conventions or policies I should be following that I missed here. Thanks :)
2020-08-19 15:54:35 +09:00
Yuki Okushi
e6e917e12d
Rollup merge of #75652 - jyn514:true-false-2, r=GuillaumeGomez
Resolve true and false as booleans

Successor to https://github.com/rust-lang/rust/pull/75101.

r? @Manishearth
cc @rust-lang/rustdoc
2020-08-19 15:54:34 +09:00
Yuki Okushi
e8d30bf542
Rollup merge of #75554 - jumbatm:fix-clashing-extern-decl-overflow, r=lcnr
Fix clashing_extern_declarations stack overflow for recursive types.

Fixes #75512.

Adds a seen set to `structurally_same_type` to avoid recursing indefinitely for types which contain values of the same type through a pointer or reference.
2020-08-19 15:54:30 +09:00
Rich Kadel
d129ac2655 Moved coverage counter injection from BasicBlock to Statement. 2020-08-18 21:06:45 -07:00
bors
c03c213daf Auto merge of #75677 - cuviper:shrink-towel, r=Mark-Simulacrum
Don't panic in Vec::shrink_to_fit

We can help the compiler see that `Vec::shrink_to_fit` will never reach the panic case in `RawVec::shrink_to_fit`, just by guarding the call only for cases where the capacity is strictly greater. A capacity less than the length is only possible through an unsafe call to `set_len`, which would break the `Vec` invariants, so `shrink_to_fit` can just ignore that.

This removes the panicking code from the examples in both #71861 and #75636.
2020-08-19 02:56:59 +00:00
bors
1656582822 Auto merge of #75555 - workingjubilee:update-everything, r=Mark-Simulacrum
Cargo update (almost) all the things!

This runs `cargo update` on our dependency tree, bumping numerous crates. See details in the first commit of this PR.

Several updates were held back intentionally; version_check in particular landed a change in behavior in 0.9.2 (arguably a bug fix, but still will be split into a separate PR).
2020-08-19 01:02:19 +00:00
Tomasz Miąsko
6a80b1387f Enable stack-overflow detection on musl for non-main threads 2020-08-19 00:00:00 +00:00
bors
30f0a07684 Auto merge of #75516 - matklad:remove-deprecation, r=petrochenkov
Promote missing_fragment_specifier to hard error

It has been deny_by_default since 2017 (and warned for some time
before that), so it seems reasonable to promote it.

The specific technical motivation to do this now is to remove a field
from `ParseSess` -- it is a global state, and global state makes
extracting libraries annoying.

Closes #40107
2020-08-18 20:51:22 +00:00
Bastian Kauschke
7542615c21 change const param ty warning message 2020-08-18 22:44:06 +02:00
Bastian Kauschke
6ad01e9932 run wfcheck in parralel again, add test for 74950 2020-08-18 22:14:40 +02:00
Bastian Kauschke
70dfe3fa74 move const param structural match checks to wfcheck 2020-08-18 22:14:40 +02:00
Tomasz Miąsko
8c40426051 Fix asm compiler flags change from cmake 0.1.44
cmake-rs@8141f0e changed the logic for handling asm compiler flags.
This change was pulled in with the cmake 0.1.42 -> 0.1.44 update.

This introduced two new flags to the LLVM build, breaking it:
"-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64"
"-DCMAKE_ASM_COMPILER=/usr/bin/cc"

This patch should resolve the breakage by handling it in bootstrap.
2020-08-18 12:58:19 -07:00
Tyson Nottingham
ff73a40995 Don't emit "is not a logical operator" error outside of associative expressions
Avoid showing this error where it doesn't make sense by not assuming
"and" and "or" were intended to mean "&&" and "||" until after we decide
to continue parsing input as an associative expression.

Note that the decision of whether or not to continue parsing input as an
associative expression doesn't actually depend on this assumption.

Fixes #75599
2020-08-18 12:15:57 -07:00
Josh Stone
7551f3fbbd Don't panic in Vec::shrink_to_fit 2020-08-18 11:45:40 -07:00
bors
b287b56f97 Auto merge of #75635 - Aaron1011:fix/incr-fn-param-names, r=eddyb
Don't use `dep_graph.with_ignore` when encoding fn param names

The call to `with_ignore` was added years ago, and should no longer be
necessary with the modern incremental query infrastructure.

I also removed a related FIXME comment for issue #38501, which was
closed months ago.
2020-08-18 16:18:07 +00:00
Jubilee Young
8f5ea8083d Resolve licensing by updating tinyvec 0.3.3 -> 0.3.4
Per https://github.com/rust-lang/rust/pull/75555#issuecomment-675090858
Zlib license might be OK. "OR Apache-2.0 OR MIT" definitely is.
unicode-normalization depends on this and rustc_parse, clippy,
and many other things depend on unicode-normalization.
2020-08-18 10:27:13 -04:00