Commit Graph

92813 Commits

Author SHA1 Message Date
varkor
102f7a8b26 Make sure const params with type params don't cause errors without a feature gate 2019-04-25 21:12:03 +01:00
varkor
976b3d1d9e Prevent const parameters having type parameters as types 2019-04-25 21:11:46 +01:00
varkor
f024196dd5 Fix indexing issue for const parameter invariance 2019-04-25 20:16:11 +01:00
bors
c32171bd5e Auto merge of #60192 - t-rapp:tr-saturating-funcs, r=alexcrichton
Implement saturating_abs() and saturating_neg() functions for signed integer types

Similar to wrapping_abs() / wrapping_neg() functions but saturating at the numeric bounds instead of wrapping around. Complements the existing set of functions with saturation mechanics.

cc #59983
2019-04-25 17:26:20 +00:00
Ralf Jung
16ad9777b8 when testing Miri, compile libstd for Miri 2019-04-25 18:47:36 +02:00
John Kåre Alsaker
53269c7f6e Update trait queries 2019-04-25 18:23:36 +02:00
John Kåre Alsaker
b164a2da63 Update trait_impls_of 2019-04-25 18:23:35 +02:00
John Kåre Alsaker
1fe0d4e383 Update mir_const_qualif 2019-04-25 18:23:34 +02:00
John Kåre Alsaker
d56d2fbaea Update rvalue_promotable_map 2019-04-25 18:23:33 +02:00
John Kåre Alsaker
b8b4ad597a Update region_scope_tree 2019-04-25 18:23:32 +02:00
Alex Crichton
955f283e11 rustc: Flag metadata compatible with multiple CGUs
It looks like the `OutputType::Metadata` kind in the compiler was
misclassified in #38571 long ago by accident as incompatible with
codegen units and a single output file. This means that if you emit both
a linkable artifact and metadata it silently turns off multiple codegen
units unintentionally!

This commit corrects the situation to ensure that if `--emit metadata`
is used it doesn't implicitly disable multiple codegen units. This will
ensure we don't accidentally regress compiler performance when striving
to implement pipelined compilation!
2019-04-25 09:06:38 -07:00
Giles Cope
66e41bc675 Improved error message when type must be bound due to generator.
Error now mentions type var name and span is highlighted.
2019-04-25 16:42:59 +01:00
Tobias Rapp
c7d47c8cf4 Add tests for saturating_abs() and saturating_neg functions 2019-04-25 17:04:17 +02:00
Tobias Rapp
8234ac32bd Add saturating_abs() and saturating_neg() functions to signed integer types
Similar to wrapping_abs() / wrapping_neg() functions but saturating at
the numeric bounds instead of wrapping around. Complements the existing
set of functions with saturation mechanics.
2019-04-25 17:04:11 +02:00
bors
bd31c392f2 Auto merge of #60257 - matthiaskrgr:submodule_upd, r=oli-obk
submodules: update clippy from 9897442f to 8c0e038f

Should fix clippy/rls toolstate breakage

Changes:
````
Rustup for https://github.com/rust-lang/rust/pull/59042
Update pulldown_cmark to 0.5
Only run AppVeyor on r+, try and the master branch
Remove approx_constant known problems
Suppress let_and_return if let has attributes
Add test for or_fun_call macro suggestion
UI test cleanup: Extract needless_range_loop tests
Change "if types change" to "if you later change the type"
````

r? @oli-obk
2019-04-25 14:10:19 +00:00
gnzlbg
d37f3fc1ec Add feature-gate for f16c target feature 2019-04-25 15:44:22 +02:00
Santiago Pastorino
72cda98e48 Implement Debug for Place using Place::iterate 2019-04-25 14:45:59 +02:00
Guillaume Gomez
6aa5a5df96 Improvement comment explanations 2019-04-25 13:20:43 +02:00
Matthias Krüger
f9945f58e2 submodules: update clippy from 9897442f to 8c0e038f
Changes:
````
Rustup for https://github.com/rust-lang/rust/pull/59042
Update pulldown_cmark to 0.5
Only run AppVeyor on r+, try and the master branch
Remove approx_constant known problems
Suppress let_and_return if let has attributes
Add test for or_fun_call macro suggestion
UI test cleanup: Extract needless_range_loop tests
Change "if types change" to "if you later change the type"
````
2019-04-25 13:18:44 +02:00
Mazdak Farrokhzad
4bd36ab64c Introduce hir::ExprKind::Use and employ in for loop desugaring.
Here, ExprKind::Use(P<Expr>) tweaks the drop order to act the
same way as '{ let _tmp = expr; _tmp }' does.
2019-04-25 11:51:53 +02:00
bors
112f7e9ac5 Auto merge of #60248 - estebank:macro-comma, r=oli-obk
Add guard for missing comma in macro call suggestion

Fix #60233. Follow up to #58796.

r? @oli-obk
2019-04-25 09:22:30 +00:00
bors
3d720d7e61 Auto merge of #60162 - gnzlbg:uss, r=alexcrichton
Breaking update of stdsimd

This commit updates stdsimd and contains two breaking changes:

* https://github.com/rust-lang-nursery/stdsimd/pull/733
* https://github.com/rust-lang-nursery/stdsimd/pull/586

We already did a crater run of 586 but we should do another one here.

r? @alexcrichton
2019-04-25 06:34:07 +00:00
bors
9aea1163df Auto merge of #60250 - Centril:rollup-d9tehhr, r=Centril
Rollup of 6 pull requests

Successful merges:

 - #59560 (MIR generation cleanup)
 - #59697 (tweak unresolved label suggestion)
 - #60038 (Add codegen test for PGO instrumentation.)
 - #60160 (Fix #58270, fix off-by-one error in error diagnostics.)
 - #60185 (Reexport IntErrorKind in std)
 - #60243 (Add regression test for #53249.)

Failed merges:

r? @ghost
2019-04-25 03:44:22 +00:00
Mazdak Farrokhzad
1443f3b4e0
Rollup merge of #60243 - davidtwco:issue-53249, r=cramertj
Add regression test for #53249.

Fixes #53249.

r? @cramertj
2019-04-25 03:05:26 +02:00
Mazdak Farrokhzad
3fffcd3314
Rollup merge of #60185 - NieDzejkob:int-error-kind-reexport, r=rkruppe
Reexport IntErrorKind in std

Currently `IntErrorKind` can only be found in `core`. @Centril confirmed on Discord that this is unintentional (should I r? him in this situation?).

Should there be a test for this? As far as this *specific* situation goes, I don't think so, I'll risk it and say that there's no way this regresses. However, it might be a good idea to have some tool detect public items in `core` that are not reexported in `std`. Does this belong in tidy, or should that be a separate tool? Is there some rustc-specific *linter*? Unless that's entirely a dumb idea, this should probably get an issue.

Note: My local build hasn't finished yet, but it's well past the point where I would expect problems.
2019-04-25 03:05:25 +02:00
Mazdak Farrokhzad
a4ef188ab6
Rollup merge of #60160 - xldenis:fix-overlapping-zero-width-annotation, r=estebank
Fix #58270, fix off-by-one error in error diagnostics.

This fixes #58270 by checking if two diagnostics overlap completely when we're calculating the line offset for each message.
2019-04-25 03:05:24 +02:00
Mazdak Farrokhzad
bb892be98e
Rollup merge of #60038 - michaelwoerister:pgo-updates-2, r=alexcrichton
Add codegen test for PGO instrumentation.

This PR adds a codegen test that makes sure that LLVM actually generates instrumentation code when we enable PGO instrumentation in `rustc`.

The second commit updates a test case to the new commandline option syntax introduced in #59874. Without the fix the test still works, but it confusingly creates a directory called `test.profraw`, which usually is the name of the _file_ where profiling data is collected.
2019-04-25 03:05:22 +02:00
Mazdak Farrokhzad
a552bebaf6
Rollup merge of #59697 - euclio:label-fixes, r=zackmdavis
tweak unresolved label suggestion

Only suggest label names in the same hygiene context, and use a
structured suggestion.

Question for reviewer: Is this the right way to check for label hygiene?
2019-04-25 03:05:20 +02:00
Mazdak Farrokhzad
5440cf1cb6
Rollup merge of #59560 - matthewjasper:mir-generation-cleanup, r=oli-obk
MIR generation cleanup

* Handle the case where the body of a constant is a subtype of the type of the constant (see `mir_static_subtype.rs`).
* Move the evaluation of `ExprKind::Use` into `into.rs`, saving an unnecessary copy.
2019-04-25 03:05:19 +02:00
bors
3d21124839 Auto merge of #59042 - ljedrz:HirIdification_rework_map, r=Zoxc
HirIdification: rework Map

The next iteration of HirIdification (#57578).

- remove `NodeId` from `Entry`
- change `Map::map` to an `FxHashMap<HirId, Entry>`
- base the `NodeId` `Map` methods on `HirId` ones (reverses the current state)
- HirIdify `librustdoc` a little bit (some `NodeId` `Map` methods were converted to work on `HirId`s)

The second change might have performance implications, so I'd do a perf run to be sure it's fine; it simplifies the codebase and shouldn't have an impact as long as the `Map` searches are cached (which is now possible thanks to using `HirId`s).

r? @Zoxc
2019-04-25 00:53:28 +00:00
Esteban Küber
0e505d427a Add guard for missing comma in macro call suggestion 2019-04-24 16:45:29 -07:00
John Kåre Alsaker
5d67618d4c Update inferred_outlives_of 2019-04-25 01:38:54 +02:00
Alexey Shmalko
f29e9a5cb8
Handle common assert! misuses 2019-04-25 02:06:38 +03:00
Tyler Mandry
56ab3e70e7 Add builtin impls for int and float inference vars in chalk 2019-04-24 15:57:43 -07:00
Tyler Mandry
c75e0890be chalkify: Add Copy/Clone builtins 2019-04-24 15:57:03 -07:00
Guillaume Gomez
f199627e69 Remove useless code and update index page test 2019-04-24 23:45:18 +02:00
Guillaume Gomez
feb5a53266 Prevent failure in case no space left on device in rustdoc 2019-04-24 22:31:30 +02:00
Guillaume Gomez
459d677bff Add test for rustdoc cfg(test) feature 2019-04-24 22:26:42 +02:00
David Wood
04023dc22d
Add regression test for #53249. 2019-04-24 20:56:18 +01:00
Guillaume Gomez
8ed2292dbe Set test flag when rustdoc is running with --test option 2019-04-24 21:51:57 +02:00
Wim Looman
a0e0849a3b Add Pin::{into_inner,into_inner_unchecked} 2019-04-24 21:19:41 +02:00
sd234678
ef37f38726 Derive Default for EllipsisInclusiveRangePatterns 2019-04-24 19:38:10 +01:00
Matthew Jasper
e9c687b04a Evaluate hair::ExprKind::Use in into
This avoids some unnecessary moves
2019-04-24 19:38:02 +01:00
Matthew Jasper
ff4d4b277f Allow subtyping of the final expression of a constant
Fixes an ICE for the following code:

fn foo(_ : &()) {}
static X: fn(&'static ()) = foo;
2019-04-24 19:37:56 +01:00
Matthew Jasper
eb37c648d7 Remove incorrect debug assertion in interpret
Cast type may be a subtype of the destination type. There is a later
assertion that they have the same layout.
2019-04-24 19:37:13 +01:00
sd234678
64f7cede8b Derive Default instead of new in applicable lint 2019-04-24 19:35:41 +01:00
ljedrz
37954df1a7 doc: some HirIdification 2019-04-24 19:51:25 +02:00
ljedrz
b71107912d hir: make NodeId methods depend on HirId ones 2019-04-24 19:51:25 +02:00
ljedrz
16fd0f47aa hir: remove NodeId from Entry & simplify Map 2019-04-24 19:51:25 +02:00
Mateusz Mikuła
d402415961 Bootstrap x86_64 musl by itself 2019-04-24 18:12:49 +02:00