Commit Graph

2034 Commits

Author SHA1 Message Date
bors
fd18d2537d Auto merge of #50758 - varkor:stabilise-inclusive_range_methods, r=SimonSapin
Stabilise inclusive_range_methods

r? @SimonSapin

Closes #49022.
2018-05-18 08:10:23 +00:00
bors
612ca14b81 Auto merge of #50593 - nikomatsakis:nll-no-location, r=nikomatsakis
stop considering location when computing outlives relationships

This doesn't (yet?) use SEME regions, but it does ignore the location for outlives constraints. This makes (I believe) NLL significantly faster -- but we should do some benchmarks. It regresses the "get-default" family of use cases for NLL, which is a shame, but keeps the other benefits, and thus represents a decent step forward.

r? @pnkfelix
2018-05-17 21:36:43 +00:00
varkor
edad2eff0c Stabilise inclusive_range_methods 2018-05-17 20:58:28 +01:00
bors
90463a6bdc Auto merge of #50629 - Mark-Simulacrum:stage-step, r=alexcrichton
Switch to bootstrapping from 1.27

It's possible the Float trait could be removed from core, but I couldn't tell whether it was intended to be removed or not. @SimonSapin may be able to comment more here; we can presumably also do that in a follow up PR as this one is already quite large.
2018-05-17 16:44:38 +00:00
Mark Simulacrum
9e3432447a Switch to 1.26 bootstrap compiler 2018-05-17 08:47:25 -06:00
Irina Popa
b63d7e2b1c Rename trans to codegen everywhere. 2018-05-17 15:08:30 +03:00
bors
b559710e58 Auto merge of #50807 - kennytm:rollup, r=kennytm
Rollup of 17 pull requests

Successful merges:

 - #50170 (Implement From for more types on Cow)
 - #50638 (Don't unconditionally set CLOEXEC twice on every fd we open on Linux)
 - #50656 (Fix `fn main() -> impl Trait` for non-`Termination` trait)
 - #50669 (rustdoc: deprecate `#![doc(passes, plugins, no_default_passes)]`)
 - #50726 (read2: Use inner function instead of closure)
 - #50728 (Fix rustdoc panic with `impl Trait` in type parameters)
 - #50736 (env: remove unwrap in examples in favor of try op)
 - #50740 (Remove LazyBTreeMap.)
 - #50752 (Add missing error codes in libsyntax-ext asm)
 - #50779 (Make mutable_noalias and arg_align_attributes be tracked)
 - #50787 (Fix run-make wasm tests)
 - #50788 (Fix an ICE when casting a nonexistent const)
 - #50789 (Ensure libraries built in stage0 have unique metadata)
 - #50793 (tidy: Add a check for empty UI test files)
 - #50797 (fix a typo in signed-integer::from_str_radix())
 - #50808 (Stabilize num::NonZeroU*)
 - #50809 (GitHub: Stop treating Cargo.lock as a generated file.)

Failed merges:
2018-05-17 02:05:39 +00:00
kennytm
02aedec722
Rollup merge of #50808 - SimonSapin:nonzero, r=alexcrichton
Stabilize num::NonZeroU*

Tracking issue: https://github.com/rust-lang/rust/issues/49137
2018-05-17 05:18:21 +08:00
bors
2f2a11dfc4 Auto merge of #50710 - Zoxc:value_to_constvalue, r=oli-obk
Fix conversion from Miri Value to ConstValue

This fixes an error compiling the `immeta` 0.3.6 crate. https://github.com/rust-lang/rust/issues/50707 may be fixed too.

r? @oli-obk
2018-05-16 21:01:31 +00:00
Simon Sapin
89d9ca9b50 Stabilize num::NonZeroU*
Tracking issue: https://github.com/rust-lang/rust/issues/49137
2018-05-16 19:11:31 +02:00
est31
5665980ad8 Make the compiler support the label-break-value feature
No error checking or feature gating yet
2018-05-16 13:56:24 +02:00
est31
11f5893610 label-break-value: Parsing and AST/HIR changes 2018-05-16 13:56:24 +02:00
bors
75a00490c9 Auto merge of #50750 - est31:master, r=eddyb
Remove ScopeTarget and LoopIdResult

* Remove ScopeTarget in preparation of label-break-value (PR #50045)
* Replace LoopIdResult by Result which is possible now thanks to commit 8ac65af81f " Implement Encodable and Decodable for Result."

r? @eddyb
2018-05-16 04:00:33 +00:00
est31
235e7c1b43 Remove LoopIdResult
It's redundant as Result already implements Encodable
as well as Decodable.
2018-05-15 15:47:32 +02:00
est31
3ef481a520 Remove hir::ScopeTarget
When we want to implement label-break-value,
we can't really decide whether to emit ScopeTarget::Loop or
ScopeTarget::Block in the code that is supposed to create it.
So we get rid of it and reconstruct the information when
needed.
2018-05-15 15:47:31 +02:00
varkor
0a9371ab77 Add mk_param_from_def 2018-05-15 14:22:25 +01:00
varkor
e9c28b2564 Use Kind instead of UnpackedKind in Substs methods 2018-05-15 14:22:25 +01:00
varkor
d9190da982 Refactor Substs methods on generic parameters 2018-05-15 14:22:11 +01:00
varkor
fd8e284a20 Rename param_counts to own_counts 2018-05-15 14:21:32 +01:00
varkor
7b45a892a4 Use GenericParamCount instead of FxHashMap 2018-05-15 14:21:31 +01:00
varkor
b75f421ee9 Generalise more cases of explicit iteration of specific kinds 2018-05-15 14:21:03 +01:00
varkor
15d2759d90 Rename has_type_parameters to requires_monomorphization 2018-05-15 14:20:19 +01:00
varkor
a9622dc5c6 Fix generics type parameter handling in miri 2018-05-15 14:20:19 +01:00
varkor
e5825c29c3 Prefer iterator to vec 2018-05-15 14:20:19 +01:00
varkor
de1c29c95e Reduce parent_params to parent_count 2018-05-15 14:20:19 +01:00
varkor
fe0c119e7d Consolidate ty::Generics 2018-05-15 14:20:19 +01:00
John Kåre Alsaker
41a032db90 Fix conversion from Miri Value to ConstValue 2018-05-13 19:03:49 +02:00
Mark Simulacrum
d7f5e1f5d1
Rollup merge of #50550 - llogiq:fmt-result, r=petrochenkov
use fmt::Result where applicable

This is a quite boring PR, but I think the type alias improves readability, so why not use it?
2018-05-12 07:32:27 -06:00
John Kåre Alsaker
0aa92acda7 Add a query to convert from ConstValue to Allocation 2018-05-11 13:01:44 +02:00
John Kåre Alsaker
fdd9787777 Introduce ConstValue and use it instead of miri's Value for constant values 2018-05-11 13:01:44 +02:00
bors
0a223d139c Auto merge of #50395 - Zoxc:small-tys, r=michaelwoerister
Optimize layout of TypeVariants

This makes references to `Slice` use thin pointers by storing the slice length in the slice itself. `GeneratorInterior` is replaced by storing the movability of generators in `TyGenerator` and the interior witness is stored in `GeneratorSubsts` (which is just a wrapper around `&'tcx Substs`, like `ClosureSubsts`). Finally the fields of `TypeAndMut` is stored inline in `TyRef`. These changes combine to reduce `TypeVariants` from 48 bytes to 24 bytes on x86_64.

r? @michaelwoerister
2018-05-10 14:14:35 +00:00
Niko Matsakis
c990309f61 rustfmt to pacify the mercilous tidy 2018-05-10 05:52:43 -04:00
Niko Matsakis
434d59a2c9 ignore the point where the outlives requirement was added 2018-05-09 23:21:24 -03:00
Niko Matsakis
accfdcc905 rename add to add_element 2018-05-09 23:21:24 -03:00
Niko Matsakis
ed72950fde rework causal tracking to explore outlives relationships
Instead of tracking the "cause" of each bit that gets added, try to
recover that by walking outlives relationships. This is currently
imprecise, since it ignores the "point" where the outlives relationship
is incurred -- but that's ok, since we're about to stop considering that
overall in a later commit. This does seem to affect one error message
negatively, I didn't dig *too* hard to find out why.
2018-05-09 23:21:24 -03:00
Niko Matsakis
1fb17aba69 generalize blame_span 2018-05-09 23:21:24 -03:00
Andre Bogus
e333725664 use fmt::Result where applicable 2018-05-09 02:01:37 +02:00
John Kåre Alsaker
c9d9c249ec Insert fields from TypeAndMut into TyRef to allow layout optimization 2018-05-08 16:21:58 +02:00
John Kåre Alsaker
710b4ad2a5 Store the GeneratorInterior in the new GeneratorSubsts 2018-05-08 16:21:58 +02:00
John Kåre Alsaker
0edc8f4270 Store generator movability outside GeneratorInterior 2018-05-08 16:21:58 +02:00
Oliver Schneider
5258871825
Fix thinning pointers to extern types in miri 2018-05-08 13:52:20 +02:00
Samuel Wilson
38a6eca29d issue-49938: Reference tagged unions discr(iminant) as tag
Refer https://github.com/rust-lang/rust/issues/49938

Previously tagged unions' tag was refered to as a discr(iminant).
Here the changes use tag instead which is the correct terminology
when refering to the memory representation of tagged unions.
2018-05-06 14:52:38 +12:00
bors
2d847dc90f Auto merge of #50370 - nikomatsakis:nll-alias-analysis-flat, r=pnkfelix
introduce `-Znll-facts` to dump base-facts for the NLL analysis

r? @pnkfelix
2018-05-05 11:05:23 +00:00
Niko Matsakis
b36cbcb0c4 add a comment about Locations::All 2018-05-05 06:03:25 -04:00
Niko Matsakis
9788479784 remove #[allow(dead_code)] 2018-05-05 06:03:25 -04:00
Niko Matsakis
eaac10ec0d add -Znll-facts switch that dumps facts for new analysis 2018-05-05 06:03:25 -04:00
Niko Matsakis
74bb9171cc add location table
This will be used in fact generation.
2018-05-05 05:03:56 -04:00
Niko Matsakis
53eb9e582f add Locations::All as a concept
In particular, type annotations given by the user must hold at all
points in the program. This doesn't affect current analysis but
will affect fact generation later.
2018-05-05 05:03:56 -04:00
Niko Matsakis
81905a15c1 use crate visibility modifier 2018-05-05 05:03:56 -04:00
Niko Matsakis
2b4675b1fc add Location::START const 2018-05-05 05:03:56 -04:00