Commit graph

105377 commits

Author SHA1 Message Date
Lzu Tao
ea6bb7fe17 Inline AsRef<Path> for str 2020-01-10 18:56:30 +00:00
Lzu Tao
eca1e8bd9b Inline PathBuf::deref to make it zero cost 2020-01-10 18:48:15 +00:00
Dylan DPC
4fadb507f4
Update E0185.md 2020-01-10 23:56:00 +05:30
Lzu Tao
137a31d692 Inline to make OsStr::is_empty zero cost 2020-01-10 18:20:40 +00:00
Mikail Bagishov
91e9531ed1
Clarify test timeout evironment variables 2020-01-10 21:00:29 +03:00
bors
ac6eb0db01 Auto merge of #67996 - JohnTitor:clippy-up, r=JohnTitor
Update Clippy

Fixes #67994

r? @ghost
2020-01-10 16:53:17 +00:00
varkor
8ca55641fd Clarify suggestion for E0013 2020-01-10 13:31:36 +00:00
Lzu Tao
cd9a73d2ea make use of pointer::is_null 2020-01-10 12:52:00 +00:00
bors
f795e8a216 Auto merge of #67397 - michaelwoerister:query-keys-in-self-profiling, r=wesleywiser
self-profiling: Support recording query keys

This PR makes self-profiling able to record query keys. The implementation is not as efficient as it could be yet (all query keys except for `DefId`s cause string data to be duplicated) and the rendered strings could be nicer too. But the implementation is functional and introduces the basic framework for emitting per-query-invocation event data.

I tried to add proper documentation on how everything works. Let me know if more documentation is needed.

r? @wesleywiser

@Mark-Simulacrum, heads up: This updates `measureme` to 0.7.0 which means that `summarize` on perf.rlo needs to be update accordingly once this is merged.
2020-01-10 12:18:46 +00:00
Matthew Healy
7e50b599bf Prefer llvm-skip-rebuild flag value over config.toml 2020-01-10 11:13:49 +01:00
Matthew Healy
0bbbd5d418 Match llvm-skip-rebuild flag 2020-01-10 11:13:49 +01:00
Michael Woerister
ad65e3e6bc Fix some rebasing fallout. 2020-01-10 10:57:36 +01:00
Michael Woerister
11e4844480 Update measureme to 0.7.1 in order to fix compilation error on big-endian platforms. 2020-01-10 10:19:40 +01:00
Michael Woerister
83e921d770 Run 'x.py fmt'. 2020-01-10 10:19:39 +01:00
Michael Woerister
6848ed2d65 self-profile: Fix issue with handling query blocking. 2020-01-10 10:19:39 +01:00
Michael Woerister
b8ead417a6 Initial support for recording query keys in self-profiling data. 2020-01-10 10:19:39 +01:00
Michael Woerister
996511a456 Use 'relaxed' memory ordering for simple atomic counters in dep-graph. 2020-01-10 10:18:21 +01:00
Michael Woerister
a62c040929 self-profile: Switch to new approach for event_id generation that enables query-invocation-specific event_ids. 2020-01-10 10:18:21 +01:00
Guillaume Gomez
c899f67673
Improve E0185 wording 2020-01-10 10:05:49 +01:00
Oliver Scherer
a5d8ab713a Rebase fallout 2020-01-10 09:08:25 +01:00
Oliver Scherer
43313d5743 Remove an outdated comment 2020-01-10 09:08:25 +01:00
Oliver Scherer
050146f7f0 Add regression tests for promotion mir expansion 2020-01-10 09:08:25 +01:00
Oliver Scherer
ecd5852194 Errors in promoteds may only cause lints not hard errors 2020-01-10 09:08:25 +01:00
Oliver Scherer
6e1bbff2c6 Promoteds also need param envs.
This also allows us to use the `const_eval` query again without causing cycles
2020-01-10 09:08:25 +01:00
Santiago Pastorino
36b1756711 Do not store lint_root 2020-01-10 09:08:25 +01:00
Santiago Pastorino
156561267e Add span_bug that notes that shuffle indices must be constant 2020-01-10 09:08:25 +01:00
Santiago Pastorino
8533caa26f Make Place Copy 2020-01-10 09:08:25 +01:00
Santiago Pastorino
a5715a32b5 Use re_erased instead of re_static 2020-01-10 09:08:25 +01:00
Santiago Pastorino
7f3459a3b3 No need to use local.into here 2020-01-10 09:08:25 +01:00
Santiago Pastorino
a9de4f11ed Fix print const on librustdoc 2020-01-10 09:08:25 +01:00
Santiago Pastorino
5d9b399044 Remove PlaceBase enum and make Place base field be local: Local 2020-01-10 09:08:25 +01:00
Santiago Pastorino
fd5aa32c35 Remove Static from PlaceBase 2020-01-10 09:08:24 +01:00
Santiago Pastorino
9e70c47783 Remove unused param_env parameter 2020-01-10 09:08:24 +01:00
Santiago Pastorino
fb2f0ec416 Use if let instead of match with one meaningful arm 2020-01-10 09:08:24 +01:00
Santiago Pastorino
b63597dedb Remove StaticKind 2020-01-10 09:08:24 +01:00
Santiago Pastorino
6f2c7025b8 Remove StaticKind::Promoted 2020-01-10 09:08:24 +01:00
Santiago Pastorino
6aa4b5a760 Add promoted_operand closure to reuse code across different 2020-01-10 09:08:24 +01:00
Santiago Pastorino
32fe47779b Promote Arguments to constants instead of statics 2020-01-10 09:08:24 +01:00
Santiago Pastorino
2508f17ac2 Promote Repeats to constants instead of statics 2020-01-10 09:08:24 +01:00
Santiago Pastorino
1688719214 Promote Refs to constants instead of static 2020-01-10 09:08:24 +01:00
Santiago Pastorino
a59abfa450 Revert const_eval call to use const_eval_raw to avoid const validation cycles 2020-01-10 09:07:53 +01:00
Jethro Beekman
afced94155 Allow specifying LLVM args in target specifications 2020-01-10 08:12:55 +01:00
Mazdak Farrokhzad
8bd3d240e3 nix syntax::errors & prefer rustc_errors over errors 2020-01-10 07:41:30 +01:00
Mazdak Farrokhzad
d5598aa7a0 Introduce #![feature(half_open_range_patterns)].
This feature adds `X..`, `..X`, and `..=X` patterns.
2020-01-10 07:29:04 +01:00
Esteban Küber
fcd850fc5d Do not ICE on unicode next point
Use `shrink_to_hi` instead of `next_point`
Fix #68000.
2020-01-09 22:10:18 -08:00
bors
2d8d559bbe Auto merge of #68078 - Centril:rollup-qvq052k, r=Centril
Rollup of 6 pull requests

Successful merges:

 - #66463 (Point at opaque and closure type definitions in type errors)
 - #67501 (Reduce special treatment for zsts)
 - #67820 (Parse the syntax described in RFC 2632)
 - #67922 (rustc_ast_lowering: misc cleanup & rustc dep reductions)
 - #68071 (Extend support of `_` in type parameters)
 - #68073 (expect `fn` after `const unsafe` / `const extern`)

Failed merges:

r? @ghost
2020-01-10 02:09:41 +00:00
Mazdak Farrokhzad
6f3f1c537b
Rollup merge of #68073 - Centril:fix-68062, r=estebank
expect `fn` after `const unsafe` / `const extern`

Fixes #68062

r? @estebank @petrochenkov
cc @Aaron1011
2020-01-10 02:47:36 +01:00
Mazdak Farrokhzad
2307f0c4ea
Rollup merge of #68071 - estebank:ice-67995, r=Centril
Extend support of `_` in type parameters

 - Account for `impl Trait<_>`.
 - Provide a reasonable `Span` for empty `Generics` in `impl`s.
 - Account for `fn foo<_>(_: _) {}` to suggest `fn foo<T>(_: T) {}`.
 - Fix #67995. Follow up to #67597.
2020-01-10 02:47:34 +01:00
Mazdak Farrokhzad
3bfa28c3a8
Rollup merge of #67922 - Centril:lowering-cleanup, r=petrochenkov
rustc_ast_lowering: misc cleanup & rustc dep reductions

- The first two commits do some code simplification.
- The next three do some file splitting (getting `lib.rs` below the 3kloc tidy lint).
- The remaining commits reduce the number of `rustc::` imports. This works towards making lowering independent of the `rustc` crate.

r? @oli-obk cc @Zoxc
2020-01-10 02:47:33 +01:00
Mazdak Farrokhzad
f3963873aa
Rollup merge of #67820 - ecstatic-morse:const-trait, r=oli-obk
Parse the syntax described in RFC 2632

This adds support for both `impl const Trait for Ty` and `?const Trait` bound syntax from rust-lang/rfcs#2632 to the parser. For now, both modifiers end up in a newly-added `constness` field on `ast::TraitRef`, although this may change once the implementation is fleshed out.

I was planning on using `delay_span_bug` when this syntax is encountered during lowering, but I can't write `should-ice` UI tests. I emit a normal error instead, which causes duplicates when the feature gate is not enabled (see the `.stderr` files for the feature gate tests). Not sure what the desired approach is; Maybe just do nothing when the syntax is encountered with the feature gate is enabled?

@oli-obk I went with `const_trait_impl` and `const_trait_bound_opt_out` for the names of these features. Are these to your liking?

cc #67792 #67794

r? @Centril
2020-01-10 02:47:32 +01:00