Niko Matsakis
00cf176a5e
Add FIXMEs relating to caching of projection results
2014-12-30 09:36:22 -05:00
Niko Matsakis
3657ae13f5
Don't normalize associated types when in region binders, wait until we instantiate
...
them. Also fix some assertions and handling of builtin bounds.
2014-12-30 09:36:22 -05:00
Niko Matsakis
b7c6e317b0
Make projected types select out of the trait bounds.
2014-12-30 09:36:22 -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
Flavio Percoco
fb803a8570
Require types to opt-in Sync
2014-12-26 17:26:32 +01:00
Corey Farwell
98af642f5c
Remove a ton of public reexports
...
Remove most of the public reexports mentioned in #19253
These are all leftovers from the enum namespacing transition
In particular:
* src/libstd/num/strconv.rs
* ExponentFormat
* SignificantDigits
* SignFormat
* src/libstd/path/windows.rs
* PathPrefix
* src/libstd/sys/windows/timer.rs
* Req
* src/libcollections/str.rs
* MaybeOwned
* src/libstd/collections/hash/map.rs
* Entry
* src/libstd/collections/hash/table.rs
* BucketState
* src/libstd/dynamic_lib.rs
* Rtld
* src/libstd/io/net/ip.rs
* IpAddr
* src/libstd/os.rs
* MemoryMapKind
* MapOption
* MapError
* src/libstd/sys/common/net.rs
* SocketStatus
* InAddr
* src/libstd/sys/unix/timer.rs
* Req
[breaking-change]
2014-12-21 09:26:41 -08: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
3cf0fbeee9
Create distinct types for a PolyTraitRef (with bindings) and a normal TraitRef.
2014-12-19 03:29:30 -05:00
Niko Matsakis
124e1e18cc
Improve comments and address nits.
2014-12-12 20:25:21 -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
2be6c4f1ca
Write code for registering region obligations (but don't use it yet).
2014-12-12 20:24:34 -05:00
Niko Matsakis
70be49d2c7
Move the list of region obligations into the fulfillment context.
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
db75f8aa91
Move infer out of middle::typeck
and into just middle
.
2014-12-04 10:04:51 -05:00
Niko Matsakis
d85ff16173
Treat builtin bounds like all other kinds of trait matches. Introduce a simple hashset in the fulfillment context to catch cases where we register the exact same obligation twice. This helps prevent duplicate error reports but also handles the recursive obligations created by builtin bounds.
2014-12-02 19:05:14 -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
Niko Matsakis
8e44688889
Deduce the argument types based on the expected type, trawling through the fulfillment contect if necessary.
2014-11-19 05:52:59 -05:00
Eduard Burtescu
5bc98954d5
rustc: fix fallout of adding the 'tcx
lifetime to Ty
.
2014-11-19 06:24:34 +02:00
Niko Matsakis
6fb68f1c81
Introduce machinery for higher-ranked TraitRefs
2014-11-18 12:32:38 -05:00
Niko Matsakis
1da73ff126
Avoid O(n^2) performance by reconsidering the full set of obligations only when we are about to report an error ( #18208 ). I found it is still important to consider the full set in order to make tests like let x: Vec<_> = obligations.iter().collect()
work.
2014-10-28 08:18:21 -04:00
Niko Matsakis
effb3636cc
Integrate builtin bounds fully into the trait checker
2014-09-25 07:06:27 -04:00
Nick Cameron
ce0907e46e
Add enum variants to the type namespace
...
Change to resolve and update compiler and libs for uses.
[breaking-change]
Enum variants are now in both the value and type namespaces. This means that
if you have a variant with the same name as a type in scope in a module, you
will get a name clash and thus an error. The solution is to either rename the
type or the variant.
2014-09-19 15:11:00 +12:00
Aaron Turon
fc525eeb4e
Fallout from renaming
2014-09-16 14:37:48 -07:00
Niko Matsakis
c5754f3971
Guts of the new trait matching algorithm, not yet in use
2014-09-15 14:58:49 -04:00