Commit Graph

87870 Commits

Author SHA1 Message Date
scalexm
6f488b945e Rename functions giving WF clauses for builtin types 2018-12-27 19:21:15 +01:00
scalexm
7b8da7908f Add utilities for creating generic types 2018-12-27 19:21:15 +01:00
scalexm
ec7362442c Return an instantiated environment instead of a generic one 2018-12-27 19:21:15 +01:00
scalexm
8cadd59674 Correctly lift empty lists of clauses and goals 2018-12-27 19:21:15 +01:00
scalexm
37ef0c38b7 Fix visit_ex_clause_with
The sub-visits were incorrectly combined with an `&&` instead of
an `||`.
2018-12-27 19:21:15 +01:00
scalexm
50f8ae364b Add a def-id in ty::ParamEnv 2018-12-27 19:21:15 +01:00
scalexm
69007bd660 Implement "lifetime juggling" methods from chalk integration trait
Fixes #55097.
2018-12-27 19:21:15 +01:00
scalexm
9b87f590dc Implement is_coinductive
Fixes #55096.
2018-12-27 19:21:15 +01:00
bors
bc09637e21 Auto merge of #56852 - kennytm:test-publish-toolstate-in-ci, r=Mark-Simulacrum
Added a job to dry-run the publish_toolstate.py once

Closes #56848.

Requires #56847 to be merged first.
2018-12-27 17:16:59 +00:00
Sean Griffin
1cd1ddbbaa
Fix typo in pin documentation
Affect is a verb, effect is a noun
2018-12-27 08:53:43 -07:00
bors
f2b92174e3 Auto merge of #56838 - Aaron1011:fix/rustdoc-infer-unify, r=nikomatsakis
Call poly_project_and_unify_type on types that contain inference types

Commit f57247c48c (Ensure that Rusdoc discovers all necessary auto
trait bounds) added a check to ensure that we only attempt to unify a
projection predicatre with inference variables. However, the check it
added was too strict - instead of checking that a type *contains* an
inference variable (e.g. '&_', 'MyType<_>'), it required the type to
*be* an inference variable (i.e. only '_' would match).

This commit relaxes the check to use 'ty.has_infer_types', ensuring that
we perform unification wherever possible.

Fixes #56822
2018-12-27 14:35:58 +00:00
Vadim Petrochenkov
bc16edeb28 Fix rebase and more CI failures 2018-12-27 15:51:37 +03:00
Vadim Petrochenkov
37af04ff8d Address review comments and CI failures 2018-12-27 15:51:37 +03:00
Vadim Petrochenkov
15cefe4b2a Make sure feature gate errors are recoverable 2018-12-27 15:51:37 +03:00
Vadim Petrochenkov
b99fb2f544 Fix trace_macros and log_syntax 2018-12-27 15:51:36 +03:00
Vadim Petrochenkov
4ac592516f Get rid of Block::recovered 2018-12-27 15:51:36 +03:00
Vadim Petrochenkov
fff01ccfa8 Do not abort compilation if expansion produces errors
Fix a number of uncovered deficiencies in diagnostics
2018-12-27 15:51:36 +03:00
Vadim Petrochenkov
a5c52c72ae AST/HIR: Introduce ExprKind::Err for better error recovery in the front-end 2018-12-27 15:51:36 +03:00
bors
d174173552 Auto merge of #57133 - SimonSapin:zero, r=oli-obk
Remove the private generic NonZero<T> wrapper type

Instead, use `#[rustc_layout_scalar_valid_range_start(1)]` directly on relevant libcore types.
2018-12-27 12:01:08 +00:00
bors
d2986970ad Auto merge of #57119 - jethrogb:jb/sgx-os-mod2, r=joshtriplett
Add `io` and `arch` modules to `std::os::fortanix_sgx`

This PR adds two more (unstable) modules to `std::os::fortanix_sgx` for the `x86_64-fortanix-unknown-sgx` target.

### io
`io` allows conversion between raw file descriptors and Rust types, similar to `std::os::unix::io`.

### arch
`arch` exposes the `ENCLU[EREPORT]` and `ENCLU[EGETKEY]` instructions. The current functions are very likely not going to be the final form of these functions (see also https://github.com/fortanix/rust-sgx/issues/15), but this should be sufficient to enable experimentation in libraries. I tried using the actual types (from the [`sgx-isa` crate](https://crates.io/crates/sgx-isa)) instead of byte arrays, but that would make `std` dependent on the `bitflags` crate which I didn't want to do at this time.
2018-12-27 09:21:06 +00:00
bors
39bc8f5899 Auto merge of #57129 - RalfJung:check-bounds, r=oli-obk
make Alloc::check_bounds_ptr private; you should use Memory::check_bounds_ptr instead

r? @oli-obk
2018-12-27 06:48:18 +00:00
kennytm
854abd319e
Added a job to dry-run the publish_toolstate.py once 2018-12-27 13:57:29 +08:00
Esteban Küber
5e952e3479 Add span label to unused string formatting argument
Fix #55350.
2018-12-26 20:36:02 -08:00
Esteban Küber
5e75001c59 Point at correct span for arguments in format strings
When a format string has escaped whitespace characters format
arguments were shifted by one per each escaped character. Account
for these escaped characters when synthesizing the spans.

Fix #55155.
2018-12-26 20:36:02 -08:00
bors
a1bad57fa5 Auto merge of #57069 - estebank:str-err, r=@cramertj
Various changes to string format diagnostics

- Point at opening mismatched formatting brace
- Account for differences between raw and regular strings
- Account for differences between the code snippet and `InternedString`
- Add more tests

```
error: invalid format string: expected `'}'`, found `'t'`
  --> $DIR/ifmt-bad-arg.rs:85:1
   |
LL | ninth number: {
   |               - because of this opening brace
LL | tenth number: {}",
   | ^ expected `}` in format string
   |
   = note: if you intended to print `{`, you can escape it using `{{`
```

Fix #53837.
2018-12-27 02:00:17 +00:00
Esteban Küber
862ebc4c38 Various changes to string format diagnostics
- Point at opening mismatched formatting brace
- Account for differences between raw and regular strings
- Account for differences between the code snippet and `InternedString`
- Add more tests
2018-12-26 14:29:43 -08:00
bors
79bbce488e Auto merge of #57124 - sunjay:stable_duration_as_u128, r=Centril
Stabilize Duration::{as_millis, as_micros, as_nanos}

Fixes #50202. 🎉

This is the stabilization PR for the `duration_as_u128` feature. I have never made one of these before so please let me know if I missed a step. I followed the [guide in the Rust Forge](https://forge.rust-lang.org/stabilization-guide.html) and also found some old stabilization PRs ([1](https://github.com/rust-lang/rust/pull/57002), [2](https://github.com/rust-lang/rust/pull/56207)) for similar features to base my work on.
2018-12-26 22:19:40 +00:00
Alexander Regueiro
5adf8c358a Changed resolution of enum variants to low priority. 2018-12-26 21:56:47 +00:00
Alexander Regueiro
ab239f37aa Minor cosmetic changes 2018-12-26 21:56:42 +00:00
Alexander Regueiro
87532e99e5 Minor clean-up 2018-12-26 21:54:18 +00:00
Alexander Regueiro
67a30d2d70 Fixed ICE when type arguments are specified on Self type. 2018-12-26 21:54:18 +00:00
Alexander Regueiro
6a3f96d302 Fixed type inference for tuple struct variants. 2018-12-26 21:54:18 +00:00
Alexander Regueiro
fa07e62389 Fixed handling of unit variants of aliased enums in type NS. 2018-12-26 21:54:18 +00:00
Alexander Regueiro
8eb1a9e4e7 Added regression test for using generic parameters on modules. 2018-12-26 21:54:18 +00:00
Alexander Regueiro
5a36f9e6e1 Fixed several ICEs. 2018-12-26 21:40:22 +00:00
Alexander Regueiro
65f50582cf Removed unnecessary special handling of VariantCtor defs in instantiate_value_path. 2018-12-26 21:40:22 +00:00
Alexander Regueiro
37e7f0a629 Expanded tests for enum variants with generic args. 2018-12-26 21:40:22 +00:00
Alexander Regueiro
66409e0334 Fixed issues raised in review. 2018-12-26 21:40:22 +00:00
Alexander Regueiro
248dbbdffa Added tests for enums & enum aliases with various combinations of generic args. 2018-12-26 21:40:22 +00:00
Alexander Regueiro
edabad64b0 Work-around for shadowing of variant names with assoc const names in libproc_macro/bridge/rpc.rs. 2018-12-26 21:40:21 +00:00
Alexander Regueiro
6a2a7edc0b Fixed issues raised in first review. 2018-12-26 21:40:21 +00:00
Alexander Regueiro
74f233388a Added chapter to Unstable Book. 2018-12-26 21:40:21 +00:00
Alexander Regueiro
58a5756f4d Fixed more tests. 2018-12-26 21:40:21 +00:00
Alexander Regueiro
b9326f75fb Fixed tests. 2018-12-26 21:27:08 +00:00
Alexander Regueiro
767ffced91 Made suggestion diagnostics more consistent for enum variant names, relative to method names. 2018-12-26 21:27:08 +00:00
Alexander Regueiro
ecacad0770 Added tests for feature. 2018-12-26 21:27:08 +00:00
Alexander Regueiro
c77fdbf2eb Implemented variants on type aliases in both ctor and pattern position. 2018-12-26 21:27:08 +00:00
Alexander Regueiro
1b150c4043 Store Ident rather than just Name in HIR types Item and ForeignItem. 2018-12-26 21:26:37 +00:00
Taylor Cramer
11f4d3e40e Add Unpin to std prelude, not just core 2018-12-26 12:20:38 -08:00
Simon Sapin
7a09115280 Remove the private generic NonZero<T> wrapper type.
Instead, use `#[rustc_layout_scalar_valid_range_start(1)]` directly
on relevant libcore types.
2018-12-26 20:54:10 +01:00