Ariel Ben-Yehuda
34942331a3
remove ty::{VariantInfo, FieldTy}
2015-08-06 17:02:23 +03:00
Jared Roesch
ed3fbba797
Fix error message spans
2015-07-25 19:57:59 -07:00
Niko Matsakis
1e2677be72
Introduce ClosureSubsts rather than just having random fields in the
...
TyClosure variant; thread this through wherever closure substitutions
are expected, which leads to a net simplification. Simplify trans
treatment of closures in particular.
2015-07-24 04:53:17 -04:00
Niko Matsakis
69d62e04e5
introduce a Vec<Ty> to TyClosure for storing upvar types
2015-07-24 04:50:45 -04:00
Niko Matsakis
de6b3c282e
Transition to the new object lifetime defaults, replacing the old
...
defaults completely.
2015-07-14 19:36:15 -04:00
Jared Roesch
1a268f4d1b
Rename TypeWithMutability to TypeAndMut
2015-07-10 18:27:06 -07:00
Jared Roesch
754aaea88c
Remove snake_case names from ty.rs
2015-07-08 12:38:19 -07:00
Eduard Burtescu
536e71b78f
rustc: compute the vtable base of a supertrait during selection. Fixes #26339 .
2015-07-04 17:51:30 +03:00
Eduard Burtescu
70365ed911
rustc: simplify ty::MethodOrigin and avoid trait item indices.
2015-07-04 06:21:00 +03:00
Eduard Burtescu
fe354e58bd
rustc: remove unused MethodStaticClosure variant of MethodOrigin.
2015-07-04 06:21:00 +03:00
Niko Matsakis
909957793e
Add a boolean flag to ExistentialBounds tracking whether the
...
region-bound is expected to change in Rust 1.3, but don't use it for
anything in this commit. Note that this is not a "significant" part of
the type (it's not part of the formal model) so we have to normalize
this away or trans starts to get confused because two equal types wind
up with distinct LLVM types.
2015-07-03 19:42:35 -04:00
Niko Matsakis
ef85338175
Code up the new lifetime default rules, but leave them disabled
...
for now.
2015-07-03 19:42:35 -04:00
Ariel Ben-Yehuda
bf164bc6e3
Fix lifetime elision region accounting
...
This merges accumulate_regions_in_type with ty_fold::collect_regions.
Fixes #26638
2015-06-30 01:33:16 +03:00
Eduard Burtescu
6db5126240
rustc: make ty::mk_* constructors into methods on ty::ctxt.
2015-06-26 07:34:56 +03:00
Eduard Burtescu
aa03871a6e
rustc: combine type-flag-checking traits and fns and into one trait.
2015-06-26 07:34:56 +03:00
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