Commit Graph

107689 Commits

Author SHA1 Message Date
Esteban Küber
29be741c9c review comments 2020-03-10 17:59:32 -07:00
Esteban Küber
f483032e97 review comment 2020-03-06 11:58:52 -08:00
Esteban Küber
005fc6eacc Suggest removal of auto trait super traits and type params 2020-03-06 11:58:41 -08:00
Esteban Küber
6fba412499 Further tweak spans in ast validation errors 2020-03-06 10:55:21 -08:00
Esteban Küber
713a291441 review comments 2020-03-05 15:39:35 -08:00
Esteban Küber
91525fd078 Tweak output for invalid negative impl AST errors 2020-03-04 16:15:23 -08:00
bors
2b0cfa5b4c Auto merge of - RalfJung:miri, r=nikomatsakis
update miri

Let's make that toolstate green again. :D

This bumps serde in the lockfile, so r? @oli-obk

Fixes https://github.com/rust-lang/rust/issues/69462
2020-03-04 10:44:55 +00:00
Ralf Jung
faf3a5ea72 update miri 2020-03-04 11:03:08 +01:00
Ralf Jung
0a6f45e2e5 point cargo-miri to the right xargo binary 2020-03-04 10:31:00 +01:00
bors
7a3700c371 Auto merge of - faern:stabilize-assoc-int-consts, r=dtolnay
Stabilize assoc_int_consts associated int/float constants

The next step in RFC https://github.com/rust-lang/rfcs/pull/2700 (tracking issue ). Stabilizing the associated constants that were added in .

* Stabilize all constants under the `assoc_int_consts` feature flag.
* Update documentation on old constants to say they are soft-deprecated and the new ones should be preferred.
* Update documentation examples to use new constants.
* Remove `uint_macro` and use `int_macro` for all integer types since the macros were identical anyway.

r? @LukasKalbertodt
2020-03-04 07:29:32 +00:00
bors
4d71c164a8 Auto merge of - RalfJung:scalar, r=oli-obk
interpret engine: Scalar cleanup

* Remove `to_ptr`
* Make `to_bits` private

r? @oli-obk
2020-03-04 04:10:58 +00:00
bors
592e9c3700 Auto merge of - Dylan-DPC:rollup-yoaueud, r=Dylan-DPC
Rollup of 6 pull requests

Successful merges:

 -  (miri engine: turn some debug_assert into assert)
 -  (use question mark operator in a few places.)
 -  (cleanup more iterator usages (and other things))
 -  (use conditions directly)
 -  (Invoke OptimizerLastEPCallbacks in PreLinkThinLTO)
 -  (Add explanation for E0379)

Failed merges:

r? @ghost
2020-03-03 23:26:38 +00:00
Dylan DPC
f8c026b479
Rollup merge of - GuillaumeGomez:explain-e0379, r=Dylan-DPC
Add explanation for E0379

r? @Dylan-DPC
2020-03-03 21:26:18 +01:00
Dylan DPC
587ca17cdb
Rollup merge of - tmiasko:new-pass-manager-thin-lto-opt, r=nikic
Invoke OptimizerLastEPCallbacks in PreLinkThinLTO

The default ThinLTO pre-link pipeline does not include optimizer last
extension points. Thus, when using the new LLVM pass manager & ThinLTO
& sanitizers on any opt-level different from zero, the sanitizer
function passes would be omitted from the pipeline.

Add optimizer last extensions points manually to the pipeline, but guard
registration with stage check in the case this behaviour changes in the
future.
2020-03-03 21:26:16 +01:00
Dylan DPC
099cd7f402
Rollup merge of - matthiaskrgr:needless_bool, r=Dylan-DPC
use conditions directly
2020-03-03 21:26:15 +01:00
Dylan DPC
8ca3e59f8a
Rollup merge of - matthiaskrgr:clnp, r=varkor
cleanup more iterator usages (and other things)

* Improve weird formatting by moving comment inside else-code block.
* Use .any(x) instead of .find(x).is_some() on iterators.
* Use .nth(x) instead of .skip(x).next() on iterators.
* Simplify conditions like  x + 1 <= y   to   x < y
* Use let instead of match to get value of enum with single variant.
2020-03-03 21:26:13 +01:00
Dylan DPC
2cfab73594
Rollup merge of - matthiaskrgr:q, r=petrochenkov
use question mark operator in a few places.
2020-03-03 21:26:12 +01:00
Dylan DPC
fab54fc34e
Rollup merge of - RalfJung:assert, r=eddyb
miri engine: turn some debug_assert into assert

@eddyb said to avoid debug assertions in rustc. These checks here look like they are probably not too expensive. Cc @oli-obk
2020-03-03 21:26:10 +01:00
bors
4ad6248825 Auto merge of - Centril:stmt-semi-none, r=petrochenkov
encode `;` stmt without expr as `StmtKind::Empty`

Instead of encoding `;` statements without a an expression as a tuple in AST, encode it as `ast::StmtKind::Empty`.

r? @petrochenkov
2020-03-03 19:57:07 +00:00
bors
3c5b1b7d63 Auto merge of - tmiasko:weak-lang-cycle, r=alexcrichton
Improve linking of crates with circular dependencies

Previously, the code responsible for handling the cycles between crates
introduces through weak lang items, would keep a set of missing language
items:

* extending it with items missing from the current crate,
* removing items provided by the current crate,
* grouping the crates when the set changed from non-empty back to empty.

This could produce incorrect results, if a lang item was missing from a
crate that comes after the crate that provides it (in the loop iteration
order). In that case the grouping would not take place.

The changes here address this specific failure scenario by keeping track
of two separate sets of crates. Those that are required to link successfully,
and those that are available for linking.

Verified using test case from .
2020-03-03 16:38:02 +00:00
bors
b135c739fb Auto merge of - lqd:poloniusup, r=nikomatsakis
Polonius: update `polonius-engine` to 0.12.0

Since @albins won't have the time to finish up  for a while, I'll take care of the trivial remaining tasks (rebasing, taking care of tidy/rustfmt).

I'll r? @nikomatsakis since they're assigned to , but have actually [already reviewed it pre-rebase](https://github.com/rust-lang/rust/pull/68993#issuecomment-586413089).

When CI passes: I'll notify bors and close , since this PR supersedes it.
2020-03-03 13:27:52 +00:00
Guillaume Gomez
c92267a863 Add explanation for E0379 2020-03-03 13:30:17 +01:00
Tomasz Miąsko
44dba79124 Add regression test for linking issue with start-group / end-group 2020-03-03 13:11:23 +01:00
Tomasz Miąsko
3ab596514a Improve linking of crates with circular dependencies
Previously, the code responsible for handling the cycles between crates
introduces through weak lang items, would keep a set of missing language
items:

* extending it with items missing from the current crate,
* removing items provided by the current crate,
* grouping the crates when the set changed from non-empty back to empty.

This could produce incorrect results, if a lang item was missing from a
crate that comes after the crate that provides it (in the loop iteration
order). In that case the grouping would not take place.

The changes here address this specific failure scenario by keeping track
of two separate sets of crates. Those that are required to link successfully,
and those that are available for linking.

Verified using test case from 69368.
2020-03-03 13:11:19 +01:00
Matthias Krüger
ecae6e4260 use question mark operator in a few places. 2020-03-03 11:52:14 +01:00
bors
a5de254862 Auto merge of - JohnTitor:rollup-6nt3op0, r=JohnTitor
Rollup of 9 pull requests

Successful merges:

 -  (Improve documentation on iterators length)
 -  (Remove `usable_size` APIs)
 -  (more cleanups)
 -  (doc(librustc_error_codes): add long error explanation for E0719)
 -  (Toolstate: don't duplicate nightly tool list.)
 -  (Fix a leak in `DiagnosticBuilder::into_diagnostic`.)
 -  (Update my mailmap entry)
 -  (clean up E0378 explanation)
 -  (Don't convert Results to Options just for matching.)

Failed merges:

r? @ghost
2020-03-03 10:18:57 +00:00
Yuki Okushi
e453a0cc49
Rollup merge of - matthiaskrgr:if_let_some_result, r=ecstatic-morse
Don't convert Results to Options just for matching.
2020-03-03 17:50:17 +09:00
Yuki Okushi
9be7932d35
Rollup merge of - GuillaumeGomez:clean-up-e0378, r=Dylan-DPC
clean up E0378 explanation

r? @Dylan-DPC
2020-03-03 17:50:16 +09:00
Yuki Okushi
017a2f4ce6
Rollup merge of - XAMPPRocky:master, r=Dylan-DPC
Update my mailmap entry

superceding 
2020-03-03 17:50:14 +09:00
Yuki Okushi
ef311d5ab4
Rollup merge of - nnethercote:fix-DiagnosticBuilder-into_diagnostic-leak, r=Centril
Fix a leak in `DiagnosticBuilder::into_diagnostic`.

Fixes .

r? @Centril
2020-03-03 17:50:13 +09:00
Yuki Okushi
c9d421f5c0
Rollup merge of - ehuss:toolstate-nightly-cleanup, r=Mark-Simulacrum
Toolstate: don't duplicate nightly tool list.

Just some cleanup, seems good to avoid duplicating this list.
2020-03-03 17:50:11 +09:00
Yuki Okushi
9f3a192327
Rollup merge of - thekuom:doc/61137-add-long-error-code-e0719, r=davidtwco
doc(librustc_error_codes): add long error explanation for E0719

Reference issue 

- Updated error_codes.rs
- Added E0719.md in error_codes
- Updated necessary test .stderr files
2020-03-03 17:50:10 +09:00
Yuki Okushi
f19684c7cf
Rollup merge of - matthiaskrgr:misc, r=eddyb
more cleanups

* use starts_with() instead of chars().next() == Some(x)
* use subsec_micros() instead of subsec_nanos() / 1000
* use for (idx, item) in iter.enumerate() instead of manually counting loop iterations with variables
* use values() or keys() respectively when iterating only over keys or values of maps.
2020-03-03 17:50:08 +09:00
Yuki Okushi
4699b29a04
Rollup merge of - TimDiekmann:excess, r=Amanieu
Remove `usable_size` APIs

This removes the usable size APIs:
- remove `usable_size` (obv)
- change return type of allocating methods to include the allocated size
- remove `_excess` API

r? @Amanieu
closes 
2020-03-03 17:50:06 +09:00
Yuki Okushi
dfacdda649
Rollup merge of - LeSeulArtichaut:improve-doc-iter, r=steveklabnik
Improve documentation on iterators length

Attempts to resolve . @the8472 does this help?

r? @steveklabnik
2020-03-03 17:50:04 +09:00
Tomasz Miąsko
b0e288d9f1 Fix check for __msan_keep_going in sanitizer-recover test
Match `@__msan_keep_going = weak_odr constant i32 1`.
2020-03-03 08:41:16 +01:00
Tomasz Miąsko
52c5f2a577 Add test for -Znew-llvm-pass-manager -Clto=thin -Zsanitizer=...
Additionally verify that the current implementation of LLVM version
check (which uses lexicographic ordering) is good enough to exclude
versions before LLVM 9, where the new LLVM pass manager is unsupported.
2020-03-03 08:41:08 +01:00
Tomasz Miąsko
a61e13423e Invoke OptimizerLastEPCallbacks in PreLinkThinLTO
The default ThinLTO pre-link pipeline does not include optimizer last
extension points. Thus, when using the new LLVM pass manager & ThinLTO
& sanitizers on any opt-level different from zero, the sanitizer
function passes would be omitted from the pipeline.

Add optimizer last extensions points manually to the pipeline, but guard
registration with stage check in the case this behaviour changes in the
future.
2020-03-03 08:37:44 +01:00
bors
9381e8178b Auto merge of - CAD97:remove-chalk, r=nikomatsakis
Remove experimental chalk option

As suggested by @nikomatsakis [here](https://github.com/rust-lang/rust/pull/68807#issuecomment-583339932).

The current version of chalk used by the experimental `-Zchalk` flag is [v0.9.0, which is over a year old](https://crates.io/crates/chalk-engine). Since v0.9.0, chalk has seen [a lot of further development](https://github.com/rust-lang/chalk/compare/41dfe13...master), and the intent is to eventually upgrade rustc to use a more recent chalk.

However, it will take a decent chunk of effort to upgrade the current experimental chalk support, and it is currently [blocking at least some PRs](https://github.com/rust-lang/rust/pull/68807) due to chalk:0.9.0's use of unstable features. So for the interim until the next chalk release and experimental rustc integration, we remove the chalk-specific code from rustc.
2020-03-03 04:31:01 +00:00
Matthias Krüger
df716b0e37 use conditions directly 2020-03-03 03:46:45 +01:00
Matthias Krüger
10183851fb Improve weird formatting by moving comment inside else-code block. 2020-03-03 01:01:21 +01:00
Matthias Krüger
ae34b9d996 Use .any(x) instead of .find(x).is_some() on iterators. 2020-03-03 01:01:14 +01:00
Matthias Krüger
c287d86d2c Use .nth(x) instead of .skip(x).next() on iterators. 2020-03-03 01:00:48 +01:00
Matthias Krüger
5abaeb3d67 Simplify conditions like x + 1 <= y to x < y 2020-03-03 01:00:32 +01:00
Matthias Krüger
e364c283fd Use let instead of match to get value of enum with single variant. 2020-03-03 01:00:08 +01:00
CAD97
b3777c952f Remove chalk integration 2020-03-02 18:11:53 -05:00
Tim Diekmann
d8e3557dba Remove usable_size APIs 2020-03-03 00:08:24 +01:00
bors
97b3d81615 Auto merge of - ehuss:update-cargo-clippy, r=Dylan-DPC
Update cargo, clippy

Closes 

## cargo

16 commits in e57bd02999c9f40d52116e0beca7d1dccb0643de..bda50510d1daf6e9c53ad6ccf603da6e0fa8103f
2020-02-21 20:20:10 +0000 to 2020-03-02 18:05:34 +0000
- Fix rare failure in collision_export test. ()
- Ignore broken Cargo.toml in git sources ()
- Add more fingerprint mtime debug logging. ()
- Fix plugin tests for latest nightly. ()
- Simplified usage code of SipHasher ()
- Add a special case for git config discovery inside tests ()
- Fixes issue  ()
- Filter out cfgs which should not be used during build ()
- Provide extra context on a query failure. ()
- Try to clarify `cargo metadata`'s relationship with the workspace. ()
- Update libgit2 dependency ()
- Fix link in comment ()
- Enable `cargo doc --open` tests on macos. ()
- build-std: remove sysroot probe ()
- Try to clarify how feature flags work on the "current" package. ()
- Add extra details in the new feature resolver doc comment. ()

## clippy

6 commits in fc5d0cc583cb1cd35d58fdb7f3e0cfa12dccd6c0..8b7f7e667268921c278af94ae30a61e87a22b22b
2020-02-24 05:58:17 +0000 to 2020-03-02 20:00:31 +0000
- Rustup to  ()
- Some rustups ()
- Update git2 to 0.12 ()
- Rustup to  ()
- Add lint to improve floating-point expressions ()
- Do not run deploy action on other repos ()
2020-03-02 22:58:48 +00:00
LeSeulArtichaut
0c82a5c1d3 Apply suggestions from code review 2020-03-02 21:42:55 +01:00
Eric Huss
15264e95f2 Update cargo, clippy 2020-03-02 12:25:29 -08:00