Jared Roesch
81e5c1ff06
Remove the mostly unecessary ParamBounds struct
2015-06-23 00:10:19 -07:00
Eduard Burtescu
0b58fdf925
rustc: remove Repr and UserString.
2015-06-19 01:39:26 +03:00
Eduard Burtescu
dfbc9608ce
rustc: replace Repr/UserString impls with Debug/Display ones.
2015-06-19 01:36:20 +03:00
Eduard Burtescu
a3727559c6
rustc: use the TLS type context in Repr and UserString.
2015-06-19 01:32:44 +03:00
Ariel Ben-Yehuda
21fd312043
Normalize associated types in closure signatures
...
Fixes #25700 .
2015-06-18 23:04:57 +03:00
Eli Friedman
33b7386d39
Split TyArray into TyArray and TySlice.
...
Arrays and slices are closely related, but not that closely; making the
separation more explicit is generally more clear.
2015-06-12 16:50:13 -07:00
Eli Friedman
3c69db4c3c
Cleanup: rename middle::ty::sty and its variants.
...
Use camel-case naming, and use names which actually make sense in modern Rust.
2015-06-12 11:07:16 -07:00
Ariel Ben-Yehuda
39b9bea4ba
Skip useless recursion in freshening and late-bound-region substitutio
...
Before:
581.72user 4.75system 7:42.74elapsed 126%CPU (0avgtext+0avgdata 1176224maxresident)k
llvm took 359.183
After:
550.63user 5.09system 7:20.28elapsed 126%CPU (0avgtext+0avgdata 1165516maxresident)k
llvm took 354.801
2015-06-08 12:29:22 +03:00
Ariel Ben-Yehuda
014bf0df34
Clean-up some junk
2015-05-26 11:38:56 +03:00
Eduard Burtescu
4e8e64140f
eddyb's refactoring of coercions/adjustments
2015-04-14 21:55:42 +12:00
Niko Matsakis
8403b82ddb
Port over type inference to using the new type relation stuff
2015-03-31 09:51:18 -04:00
Niko Matsakis
5f5ed62298
Remove subtyping for object types and replace with an *upcast* coercion.
...
This upcast coercion currently preserves the vtable for the object, but
eventually it can be used to create a derived vtable. The upcast
coercion is not introduced into method dispatch; see comment on #18737
for information about why. Fixes #18737 .
2015-03-17 08:34:25 -04:00
Niko Matsakis
cd50b4e0b1
Generalize the code so we can handle multiple supertraits.
...
Fixes #10596 . Fixes #22279 .
2015-03-04 15:06:33 -05:00
Niko Matsakis
00fcf79448
Remove the synthetic "region bound" from closures and instead update how
...
type-outlives works for closure types so that it ensures that all upvars
outlive the region in question. This gives the same guarantees but
without introducing artificial regions (and gives better error messages
to boot).
2015-03-02 05:45:41 -05:00
Niko Matsakis
36d04711b7
Remove bounds struct from TypeParameterDef. Bounds information is now
...
exclusively stored in the where clauses.
2015-02-24 16:27:22 -05:00
Eduard Burtescu
7a8a5172a5
Remove ty_open and treat Unsized lvalues as *Unsized.
2015-02-24 08:40:14 +02:00
Flavio Percoco
d38aab397e
Rename DefTrait to DefaultImpl
2015-02-22 02:14:25 +01:00
Flavio Percoco
4b09209efe
Ensure default trait impls hold
2015-02-22 02:14:25 +01:00
Flavio Percoco
a962d47ef8
look for default trait candidates
2015-02-22 02:14:24 +01:00
Niko Matsakis
931a3c4f9d
Detect and store object-lifetime-defaults.
2015-02-16 10:55:36 -05:00
Niko Matsakis
3e88b5bbf9
Rote changes to fix fallout throughout the compiler from splitting the
...
predicates and renaming some things.
2015-02-12 13:29:51 -05:00
Niko Matsakis
25a27977fa
Add Clone to the list of bounds for a TypeFolder. (Kill?)
2015-01-28 05:15:24 -05:00
Niko Matsakis
006f3eacae
Fix a latent bug in trait dispatch where we sometimes counted associated types
...
when constructing the vtable-index. Not good.
2015-01-28 05:15:23 -05:00
Eduard Burtescu
11ef6f1349
Remove "unboxed" attribute in code referring to new closures.
2015-01-26 04:15:09 +02:00
Huon Wilson
000dc07f71
Store a method-from-trait's impl in some cases when it is known.
...
This allows one to look at an `ExprMethodCall` `foo.bar()` where `bar`
is a method in some trait and (sometimes) extract the `impl` that `bar`
is defined in, e.g.
trait Foo {
fn bar(&self);
}
impl Foo for uint { // <A>
fn bar(&self) {}
}
fn main() {
1u.bar(); // impl_def_id == Some(<A>)
}
This definitely doesn't handle all cases, but is correct when it is
known, meaning it should only be used for certain linting/heuristic
purposes; no safety analysis.
2015-01-24 13:01:21 +11:00
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