Commit Graph

79820 Commits

Author SHA1 Message Date
Niko Matsakis
5e9f8d5c69 promote canonical into a module 2018-06-26 10:31:49 -04:00
Niko Matsakis
71234278fa align the type-op outputs with what canonicalized queries give 2018-06-26 10:31:49 -04:00
Niko Matsakis
6ac89174b8 mk fully_perform_op_and_get_region_constraint_data a TypeOp method 2018-06-26 10:31:49 -04:00
Niko Matsakis
efc84c83f9 remove the TypeOp vs InfcxTypeOp distinction 2018-06-26 10:31:49 -04:00
Niko Matsakis
dee18864ad promote type_op into a mod.rs file 2018-06-26 10:31:49 -04:00
Niko Matsakis
252a6dfa35 introduce DropckOutlives type-op 2018-06-26 10:31:49 -04:00
Niko Matsakis
7a641cb145 make TypeOp implement debug instead of carrying a closure
This allows us to avoid some silly clones etc.
2018-06-26 10:31:49 -04:00
Niko Matsakis
e7a9e7aef2 extract a enabled helper to remove some ad-hoc conditionals 2018-06-26 10:31:49 -04:00
Niko Matsakis
65ceec71ec make TypeOutlives parameterized over a delegate
It was only using the `infcx` to "accumulate" constraints anyhow.
2018-06-26 10:31:49 -04:00
Niko Matsakis
b858ed5919 obligations.rs: rustfmt 2018-06-26 10:31:49 -04:00
Niko Matsakis
5829746ddd resolve type vars *before* entering type_must_outlive
All recursive calls only use type-vars that should already be
resolved, because they were obtained from `ty`.
2018-06-26 10:31:49 -04:00
Niko Matsakis
13e77934e5 create InfcxTypeOp that only depend on an infcx
We want any add'l context required to be passed through the struct
itself.
2018-06-26 10:31:49 -04:00
Niko Matsakis
846cc263cf make normalize into an op 2018-06-26 10:31:49 -04:00
Niko Matsakis
f998628e5c let trivial_noop take ownership of self 2018-06-26 10:31:49 -04:00
Niko Matsakis
8147d17d8e make normalize take ownership of the thing to be normalized 2018-06-26 10:31:49 -04:00
Niko Matsakis
214d7650c9 introduce prove_predicates type op 2018-06-26 10:31:49 -04:00
Niko Matsakis
7c62461c39 introduce trivial_noop to accommodate micro-optimizations 2018-06-26 10:31:49 -04:00
Niko Matsakis
9b4fe44280 introduce Eq type-op 2018-06-26 10:31:49 -04:00
Niko Matsakis
2b52793f74 introduce Subtype type_op 2018-06-26 10:31:49 -04:00
Niko Matsakis
909b10c33b introduce type_op 2018-06-26 10:31:49 -04:00
bors
2808460e0f Auto merge of #51678 - Zoxc:combine-lints, r=estebank
Combine all builtin late lints
2018-06-26 14:18:13 +00:00
Oliver Schneider
a693c9206b Use proper debugging statements for infinite recursion assertion 2018-06-26 13:56:42 +02:00
bors
764232cb2a Auto merge of #51805 - pietroalbini:rollup, r=pietroalbini
Rollup of 11 pull requests

Successful merges:

 - #51104 (add `dyn ` to display of dynamic (trait) types)
 - #51153 (Link panic and compile_error docs)
 - #51642 (Fix unknown windows build)
 - #51730 (New safe associated functions for PinMut)
 - #51731 (Fix ICEs when using continue as an array length inside closures (inside loop conditions))
 - #51747 (Add error for using null characters in #[export_name])
 - #51769 (Update broken rustc-guide links)
 - #51786 (Remove unnecessary stat64 pointer casts)
 - #51788 (Fix typo)
 - #51789 (Don't ICE when performing `lower_pattern_unadjusted` on a `TyError`)
 - #51791 (Minify css)

Failed merges:

r? @ghost
2018-06-26 11:20:18 +00:00
Fabian Kössel
bd853a6469 Add unit tests for .mod_euc() and .div_euc() 2018-06-26 13:09:57 +02:00
Fabian Kössel
daeadc6c2e Clarify rational behind current implementation of .mod_euc() 2018-06-26 13:09:56 +02:00
Fabian Kössel
af6f0f2e10 Document round-off error in .mod_euc()-method, see issue #50179 2018-06-26 13:09:55 +02:00
Pietro Albini
a539885450
Rollup merge of #51791 - GuillaumeGomez:minify-css, r=estebank
Minify css

Sizes changes:

```
dark.css: 8821 => 7804 (~11%)
light.css: 8587 => 7565 (~11%)
rustdoc.css: 22364 => 17818 (~20%)
settings.css: 1384 => 1236 (~10%)
```

So obviously, the bigger the file, the bigger minification.

r? @QuietMisdreavus
2018-06-26 11:35:45 +02:00
Pietro Albini
f2a099b17f
Rollup merge of #51789 - estebank:issue-50577, r=oli-obk
Don't ICE when performing `lower_pattern_unadjusted` on a `TyError`

Fix #50577. CC #51696.

r? @oli-obk
2018-06-26 11:35:44 +02:00
Pietro Albini
8014713805
Rollup merge of #51788 - berkus:fix-typo, r=varkor
Fix typo
2018-06-26 11:35:43 +02:00
Pietro Albini
2348dc5b3f
Rollup merge of #51786 - cuviper:stat64-pointers, r=Mark-Simulacrum
Remove unnecessary stat64 pointer casts

In effect, these just casted `&mut stat64` to `*mut stat64`, twice.
That's harmless, but it masked a problem when this was copied to new
code calling `fstatat`, which takes a pointer to `struct stat`.  That
will be fixed by #51785, but let's remove the unnecessary casts here
too.
2018-06-26 11:35:41 +02:00
Pietro Albini
932db193c2
Rollup merge of #51769 - alexcameron89:update_rustc_guide_links, r=frewsxcv
Update broken rustc-guide links

Recently, there has been some rearrangement of the content in the Rustc
Guide, and this commit changes the urls the match the updated guide.
2018-06-26 11:35:40 +02:00
Pietro Albini
b2cf26eec1
Rollup merge of #51747 - varkor:export_name-null-character, r=estebank
Add error for using null characters in #[export_name]

Fixes #51741.
2018-06-26 11:35:39 +02:00
Pietro Albini
7262824128
Rollup merge of #51731 - varkor:closure-array-break-length, r=estebank
Fix ICEs when using continue as an array length inside closures (inside loop conditions)

Fixes #51707.
Fixes #51708.

r? @estebank
2018-06-26 11:35:38 +02:00
Pietro Albini
b71f6df5dd
Rollup merge of #51730 - MajorBreakfast:pin-get-mut-unchecked, r=withoutboats
New safe associated functions for PinMut

- Add safe `get_mut` and `map`
- Rename unsafe equivalents to `get_mut_unchecked` and `map_unchecked`

The discussion about this starts [in this comment](https://github.com/rust-lang/rust/issues/49150#issuecomment-399604573) on the tracking issue.
2018-06-26 11:35:37 +02:00
Pietro Albini
1215965a12
Rollup merge of #51642 - GuillaumeGomez:fix-unknown-windows-build, r=oli-obk
Fix unknown windows build

Fixes #51618.
2018-06-26 11:35:35 +02:00
Pietro Albini
756b69492b
Rollup merge of #51153 - ogham:panic-and-compile_error-docs, r=GuillaumeGomez
Link panic and compile_error docs

This adds documentation links between `panic!()` and `compile_error!()` as per #47275, which points out that they’re similar. It also adds a sentence to the `compile_error()` docs I thought could be added.
2018-06-26 11:35:34 +02:00
Pietro Albini
d72a67f3bb
Rollup merge of #51104 - zackmdavis:dynamo, r=nikomatsakis
add `dyn ` to display of dynamic (trait) types

~~I'm not sure we want the `dyn` in the E0277 "trait bound [...] is not satisfied" messages ("bound" sounds like a different thing in contrast to the names of specific trait-object types like `Box<dyn Trait>`), but I'm finding the code I would need to change that hard to follow—the [display object seems to](f0805a4421/src/librustc/traits/error_reporting.rs (L600)) be a [`Predicate::Trait`](f0805a4421/src/librustc/ty/mod.rs (L962)) variant, whose [`Display` implementation](f0805a4421/src/librustc/util/ppaux.rs (L1309)) calls `.print` on its `PolyTraitPredicate` member, [which is a type alias](f0805a4421/src/librustc/ty/mod.rs (L1112)) for `ty::Binder<TraitPredicate<'tcx>>`, whose [`Display` implementation](f0805a4421/src/librustc/util/ppaux.rs (L975-L985)) ... _&c._— so maybe it's time to pull-request this and see what reviewers think.~~

 Resolves #49277 (?).

r? @nikomatsakis
2018-06-26 11:35:33 +02:00
bors
309fd8a6fb Auto merge of #49469 - Nokel81:allow-irrefutable-let-patterns, r=nikomatsakis
Implementation of RFC 2086 - Allow Irrefutable Let patterns

This is the set of changes for RFC2086. Tracking issue #44495. Rendered [here](https://github.com/rust-lang/rfcs/pull/2086)
2018-06-26 09:20:33 +00:00
bors
773ce53ce7 Auto merge of #51613 - nnethercote:ob-forest-cleanup, r=nikomatsakis
Obligation forest cleanup

While looking at this code I was scratching my head about whether a node could appear in both `parent` and `dependents`. Turns out it can, but it's not useful to do so, so this PR cleans things up so it's no longer possible.
2018-06-26 07:06:18 +00:00
bors
7d2fa4a4d2 Auto merge of #50630 - sharkdp:fix-50619, r=sfackler
Fix possibly endless loop in ReadDir iterator

Certain directories in `/proc` can cause the `ReadDir` iterator to loop indefinitely. We get an error code (22) when calling libc's `readdir_r` on these directories, but `entry_ptr` is `NULL` at the same time, signalling the end of the directory stream.

This change introduces an internal state to the iterator such that the `Some(Err(..))` value will only be returned once when calling `next`. Subsequent calls will return `None`.

fixes #50619
2018-06-26 03:49:37 +00:00
bors
fdd9cdc879 Auto merge of #50966 - leodasvacas:self-in-where-clauses-is-not-object-safe, r=nikomatsakis
`Self` in where clauses may not be object safe

Needs crater, virtually certain to cause regressions.

In #50781 it was discovered that our object safety rules are not sound because we allow `Self` in where clauses without restrain. This PR is a direct fix to the rules so that we disallow methods with unsound where clauses.

This currently uses hard error to measure impact, but we will want to downgrade it to a future compat error.

Part of #50781.

r? @nikomatsakis
2018-06-26 01:42:14 +00:00
Niko Matsakis
91680347a7
make the while let loop terminate 2018-06-25 17:33:49 -04:00
Guillaume Gomez
f7485df05b Minify css 2018-06-25 23:28:20 +02:00
Mark Simulacrum
557d05b49d Do not build LLVM tools for any of the tools
None of the tools in the list should need LLVM tools themselves as far as I can
tell; if this is incorrect, we can re-enable the tool building later.

The primary reason for doing this is that rust-central-station uses the
BuildManifest tool and building LLVM there is not cached: it takes ~1.5
hours on the 2 core machine. This commit should make nightlies and
stable releases much faster.
2018-06-25 15:21:13 -06:00
Esteban Küber
7aab3bf863 Don't ICE when performing lower_pattern_unadjusted on a TyError 2018-06-25 13:49:34 -07:00
Berkus Karchebnyy
07479688b2 Fix typo 2018-06-25 23:44:48 +03:00
Guillaume Gomez
e3b258324b Remove unused variable 2018-06-25 21:47:44 +02:00
bors
2a1c4eec40 Auto merge of #51785 - cuviper:fstatat64, r=Mark-Simulacrum
Use fstatat64 where available

None
2018-06-25 19:40:56 +00:00
Josh Stone
490f49fd2a Remove unnecessary stat64 pointer casts
In effect, these just casted `&mut stat64` to `*mut stat64`, twice.
That's harmless, but it masked a problem when this was copied to new
code calling `fstatat`, which takes a pointer to `struct stat`.  That
will be fixed by #51785, but let's remove the unnecessary casts here
too.
2018-06-25 12:34:33 -07:00
Josh Stone
65d31d7269 Use fstatat64 where available 2018-06-25 11:42:27 -07:00