Ariel Ben-Yehuda
8e1e0f0b57
Remove onceness & bounds - they don't do anything.
2015-01-20 00:50:14 +02:00
Ariel Ben-Yehuda
e0eb3ccba0
Kill TraitStore
2015-01-20 00:43:15 +02:00
Jared Roesch
6a66b32270
Refactor compare_impl_method to use all bounds
...
Refactor compare_impl_method into its own file. Modify the
code to stop comparing individual parameter bounds.
Instead we now use the predicates list attached to the trait
and implementation generics. This ensures consistency even
when bounds are declared in different places (i.e on
a parameter vs. in a where clause).
2015-01-14 13:43:17 -08:00
Niko Matsakis
47424cda1e
Normalize bounds that we extract from where clauses. Fixes #20765 .
2015-01-12 09:23:50 -05:00
Alex Crichton
11e265c2e0
rollup merge of #20707 : nikomatsakis/issue-20582
2015-01-07 17:44:24 -08:00
Alex Crichton
bcebec5084
rollup merge of #20706 : nikomatsakis/assoc-types-projections-in-structs-issue-20470
...
Conflicts:
src/librustc_trans/trans/expr.rs
2015-01-07 17:35:00 -08:00
Niko Matsakis
4dd368b90a
Normalize associated types in with_field_tys
2015-01-07 20:26:20 -05:00
Niko Matsakis
bdc1bfd8f1
Rename common::normalize to common::erase_regions
2015-01-07 14:07:58 -05:00
bors
c0216c8945
Merge pull request #20674 from jbcrail/fix-misspelled-comments
...
Fix misspelled comments.
Reviewed-by: steveklabnik
2015-01-07 15:35:30 +00:00
Joseph Crail
e3b7fedc20
Fix misspelled comments.
...
I cleaned up comments prior to the 1.0 alpha release.
2015-01-06 20:53:18 -05:00
Alex Crichton
0b3b957554
rollup merge of #20645 : nikomatsakis/rustbook-ice
...
Conflicts:
src/librustc/middle/mem_categorization.rs
src/librustc/middle/ty.rs
src/librustc_trans/trans/base.rs
src/librustc_trans/trans/expr.rs
src/librustc_trans/trans/foreign.rs
src/librustc_typeck/check/mod.rs
2015-01-06 15:29:09 -08:00
Alex Crichton
e2f97f51ad
Register new snapshots
...
Conflicts:
src/librbml/lib.rs
src/libserialize/json_stage0.rs
src/libserialize/serialize_stage0.rs
src/libsyntax/ast.rs
src/libsyntax/ext/deriving/generic/mod.rs
src/libsyntax/parse/token.rs
2015-01-06 15:24:24 -08:00
Niko Matsakis
2486d93e5b
Fix ICE that @steveklabnik encountered in rust-ice. The problems turned out to be that were being very loose with bound regions in trans (we were basically just ignoring and flattening binders). Since binders are significant to subtyping and hence to trait selection, this can cause a lot of problems. So this patch makes us treat them more strictly -- for example, we propagate binders, and avoid skipping past the Binder
by writing foo.0
.
...
Fixes #20644 .
2015-01-06 13:42:42 -05:00
Jorge Aparicio
5f7f2c9a05
remove ty_closure
2015-01-05 17:22:15 -05:00
Niko Matsakis
537139ee00
Convert the TODO into a FIXME.
2015-01-04 12:01:19 -05:00
Niko Matsakis
71cdf76240
Fix ICE in WF checker when we encounter bound regions in object types.
2015-01-04 12:01:19 -05:00
Jorge Aparicio
56dcbd17fd
sed -i -s 's/\bmod,/self,/g' **/*.rs
2015-01-03 22:42:21 -05:00
Niko Matsakis
dabd7507b6
Ensure that, for every trait Foo
, the predicate Foo : Foo
holds.
2015-01-02 12:09:38 -05:00
Niko Matsakis
1b3734f8ae
Fix fallout from change, adding explicit Sized
annotations where necessary.
2015-01-02 12:06:59 -05:00
Niko Matsakis
1e3214ba33
Normalize the associated types in closure and closure upvar types.
2015-01-01 18:48:26 -05:00
Niko Matsakis
b7c6e317b0
Make projected types select out of the trait bounds.
2014-12-30 09:36:22 -05:00
Niko Matsakis
becbd81aaa
Integrate projection bounds to ExistentialBounds
but do not use them for anything.
2014-12-30 09:36:21 -05:00
Niko Matsakis
82787c2252
Convert to use Rc<TraitRef>
in object types (finally!).
2014-12-30 09:36:21 -05:00
Niko Matsakis
4404592f36
Implement associated type projection and normalization.
2014-12-30 09:36:21 -05:00
Niko Matsakis
986f654f3b
Rename trait_ref
field to predicate
, since trait_ref
is really
...
overly general, and the value is always *some* sort of predicate.
2014-12-30 09:32:42 -05:00
Huon Wilson
91db254c81
More rebase fixes.
2014-12-30 00:11:30 +11:00
Huon Wilson
a33a7d20de
Switch Region information from uint to u32.
...
This reduces memory use for building librustc with -O from 1.88 to 1.76
GB.
2014-12-29 23:55:24 +11:00
Huon Wilson
4f2b0f032a
Store Substs in an arena in the tcx.
...
This current inflates memory use more than 3 times.
2014-12-29 23:55:24 +11:00
Flavio Percoco
fb803a8570
Require types to opt-in Sync
2014-12-26 17:26:32 +01:00
Niko Matsakis
f46099575a
Make ty_bare_fn carry an optional def-id indicating whether it is the
...
type of a fn item or a fn pointer, which are now differentiated.
Introduce coercion from fn item to fn pointer.
2014-12-22 12:27:07 -05:00
Eduard Burtescu
e0d44386d3
rustc: use Ty instead of passing ty::sty around.
2014-12-20 07:04:42 +02:00
Niko Matsakis
1085012cd2
Kill some warnings about shadowed lifetimes
2014-12-19 03:29:59 -05:00
Niko Matsakis
f45c0ef51e
Implement "perfect forwarding" for HR impls ( #19730 ).
2014-12-19 03:29:31 -05:00
Niko Matsakis
c2ca1a4b62
Make all predicates higher-ranked, not just trait references.
2014-12-19 03:29:30 -05:00
Niko Matsakis
1205fd88df
Centralize on using Binder
to introduce new binding levels, rather than having FnSig carry an implicit binding level. This means that we be more typesafe in general, since things that instantiate bound regions can drop the Binder to reflect that.
2014-12-19 03:29:30 -05:00
Niko Matsakis
3cf0fbeee9
Create distinct types for a PolyTraitRef (with bindings) and a normal TraitRef.
2014-12-19 03:29:30 -05:00
Niko Matsakis
3efc9d2c55
Fix bug in higher-ranked code that would sometimes leak skolemized regions and/or cause incorrect results.
2014-12-19 03:29:29 -05:00
Niko Matsakis
1718cd6ee0
Remove all shadowed lifetimes.
2014-12-15 10:23:48 -05:00
Niko Matsakis
092d04a40a
Rename FnStyle trait to Unsafety.
2014-12-14 11:11:55 -05:00
Jorge Aparicio
1195708f64
librustc: use unboxed closures
2014-12-13 17:03:47 -05:00
Niko Matsakis
9f492fefef
Switch to using predicates to drive checking. Correct various tests --
...
in most cases, just the error message changed, but in some cases we
are reporting new errors that OUGHT to have been reported before but
we're overlooked (mostly involving the `'static` bound on `Send`).
2014-12-12 20:25:21 -05:00
Niko Matsakis
9409bd9ff8
Introduce predicates but don't use them.
2014-12-12 20:24:34 -05:00
Niko Matsakis
4efaddf7c9
Start restructuring to support generalized where clauses etc.
2014-12-12 20:24:34 -05:00
Niko Matsakis
7c44561ad6
Move various data structures out of typeck and into ty.
2014-12-04 10:04:26 -05:00
Niko Matsakis
39221a013f
Implement the Fn
trait for bare fn pointers in the compiler rather than doing it using hard-coded impls. This means that it works also for more complex fn types involving bound regions. Fixes #19126 .
2014-12-04 01:49:42 -05:00
Alex Crichton
e8d743ec1d
rollup merge of #19329 : steveklabnik/doc_style_cleanup2
2014-11-26 16:51:02 -08:00
Steve Klabnik
cd5c8235c5
/*! -> //!
...
Sister pull request of https://github.com/rust-lang/rust/pull/19288 , but
for the other style of block doc comment.
2014-11-26 16:50:14 -08:00
Steve Klabnik
f38e4e6d97
/** -> ///
...
This is considered good convention.
2014-11-25 21:24:16 -05:00
Eduard Burtescu
9f7aa7fa76
rustc: middle: remove obsolete ty::get.
2014-11-19 06:24:35 +02:00
Eduard Burtescu
5bc98954d5
rustc: fix fallout of adding the 'tcx
lifetime to Ty
.
2014-11-19 06:24:34 +02:00